0

I have a database of latitude, longitude and radius in the following form:

48180759,11518950,19.0

Both latitude and longitude are expressed in degrees, but then multiplied by 1e6 (or 1000000). Radius, on the other hand, is expressed in meters. What I am trying to do is convert lat/lon into meters so that I can use geometric functions more accurately, especially the one that looks for intersections (overlaps between points).

Unfortunately, I wasn't able to find a complete answer. At least, not on this website. I will use Python for this task. As for the precision, I would like to have as good as possible (a few centimetres deviation at most).

Any ideas?

Taras
36k7 gold badges77 silver badges153 bronze badges
asked Dec 11, 2014 at 11:36
9
  • 1
    This question is asked quite frequently. Could you search on "convert lat lon" and review the existing answers? If there aren't any matches, then you'll need to update this question with the GIS software or programming language you intend to use, with an indication of the kind of precision you'll need (to determine if a spherical or spheroidal solution is needed). Commented Dec 11, 2014 at 12:10
  • Unfortunately, I wasn't able to find a complete answer. At least, not in this web site. I will use python for this task. As for the precision, I would like to have as best as possible (a few centimeters deviation only). Commented Dec 11, 2014 at 13:05
  • Please update the question, so that those who would answer don't need to mine the comments for critical information. Commented Dec 11, 2014 at 13:16
  • 3
    radius = 19 ? This is more likely the height above ellipsoid (or you are not on Earth). Note that for accurate projection you need to know the coordinate system that you are in (e.g. WGS 84) otherwise your efforts for precision will be vain. Could you please add more information about the context of your problem, otherwise there is no good answer. Commented Dec 11, 2014 at 14:01
  • I am not familiar with GIS systems at all, however, I confirm that all data are based on the WGS 84 Ellipsoid coordinate system. A 19 meter radius here means that the actual point could be anywhere within a cycle with center (48.180759 lat, 11.518950 lon) (expressed in decimal degrees) and 19 radius (expressed in meters). Commented Dec 11, 2014 at 14:29

2 Answers 2

1

You can use GeoPandas:

import geopandas as gpd
#Create a pandas dataframe
data = {'longitude': [13058165, 13019717, 13872956, 13773720, 13821951],
 'latitude': [57916481, 57629064, 57868481, 57219213, 57029604],
 'radius': [15.07, 13.16, 12.98, 10.09, 12.1]}
df = gpd.pd.DataFrame(data=data)
#Create point geometries from the lat and lons and a geodataframe
points = gpd.points_from_xy(x=df["longitude"].div(1e6), y=df["latitude"].div(1e6), crs=4326)
df["geometry"] = points
df = gpd.GeoDataFrame(data=df, geometry="geometry")
# df.head(2)
# longitude latitude radius geometry
# 0 13058165 57916481 15.07 POINT (13.05816 57.91648)
# 1 13019717 57629064 13.16 POINT (13.01972 57.62906)
#Reproject the geodataframe to an utm crs and extract the point coordinates
df["x"] = df.to_crs(df.estimate_utm_crs()).geometry.x
df["y"] = df.to_crs(df.estimate_utm_crs()).geometry.y
# df.head(2)
# longitude latitude radius geometry x y
# 0 13058165 57916481 15.07 POINT (13.058165 57.916481) 384962.13048525434 6421063.715096851
# 1 13019717 57629064 13.16 POINT (13.019717 57.629064) 381749.1140658094 6389140.147669594
answered Jul 19 at 8:28
0

A variety of methods are used in this link below, you can choose different methods according to your actual situation.

[https://stackoverflow.com/questions/639695/how-to-convert-latitude-or-longitude-to-meters?answertab=votes#tab-top][1]

answered May 23, 2020 at 6:49
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.