1

This question already has an answer here:

I've some lat/long in EPSG:4326 coordinate system like Eiffel Tower position : ["lat" : 48.858274,"lon" : 2.2944]

For automated tests I would like to get, for every points of my dataset, the x and y coordinate of the location 100 meters Eastern of my dataset's point.

How can I calulate it?

PS : it'll be implemented in Java

marked as duplicate by Spacedman, nmtoken, aldo_tapia, Dan C, Vince Jul 12 '18 at 0:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • If your data is in Web Mercator, it is not in {lon,lat} pairs. You should not ever trust distances in a Mercator, so first you need to deproject to a geographic coordinate system, then, depending on the range of values either use an appropriate equidistant or equal area projection, or use a geodetic calculation tool. Please Edit the question to specify the exact GIS software you intend to use for this task. – Vince Jul 11 '18 at 11:21
  • @Vince Ok I have both EPSG:4326 and EPSG:3857 position, if it's easier to work with it I can use it. I'm implementing it on Java so I can use libs like Geotools... – Fractaliste Jul 11 '18 at 12:17
  • Where is 100 meters east of the North pole? – Spacedman Jul 11 '18 at 14:57
  • @Spacedman I'm working below 70th north parallel – Fractaliste Jul 11 '18 at 15:08
  • Okay, where is 100m east of the South pole? – Spacedman Jul 11 '18 at 15:23
1

You can't just add an constant value to geograghic coordinates in EPSG:4326: WGS 84 coordinate system, because the length of two arcs between two different pairs of point on a sphere is depend on latitude.

To solve your problem you must change your coordinate system into metric coordinate system (for example EPSG:32643: WGS 84 / UTM zone 43N) and then shift your points.

P.S. Some coordinate systems have zones (like the one in example above), so before you reproject your data you have to know the zone number. Using the wrong zone may cause huge errors in area/length estimations.

  • It is possible to solve the partial differential equation on a spheroid without using a projected coordinate system. The US Geodetic Survey has FORTRAN 77 code for this very purpose. Solving the problem on a sphere is less accurate, but much faster. – Vince Jul 11 '18 at 12:51
1

As explained by Mr. Che, general answer is to project in a metric system (for example, for Europe, you can use EPSG 3035).

However, if all your points are within a small area (~some dozens of km), an acceptable approximation can be to add a constant to your WGS84 points. As a rule of thumb, for Paris :

  • 1 degree of latitude corresponds to 111km
  • 1 degree of longitude corresponds to 73km

Thus, to get the point located 100 meters Eastern to your original point, you can add 73m*1°/80km ~ 0.001° of longitude.

To use this rule in other regions, you have find the distance corresponding to 1 degree of latitude and longitude and adapt the previous computation.

Please keep in mind to only use this rule in not too big areas!

  • The degree of longitude distance is basically cos(latitude)*111km (on a sphere). – AndreJ Jul 11 '18 at 17:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.