Displace Lat/Long by meters

المشرف العام

Administrator
طاقم الإدارة
Sorry for the inflammatory title, Yes, I know these cannot be added.

Problem: I have a vehicle that is reporting LL84, coordinates. It has a sensor that reports footprints of obstacles (LineString, Polygons, etc.) and the vertices are expressed as a meter/centimeter displacement from the sensor. I would like to use the GPS as the orgin, add a displacement to the sensor, and then offset the LineStrings and Polygons to result in vertices that are in LL84. Why? I want to plot them with Leaflet as a GeoJSON layer.

My initial thoughts are to convert the GPS LL84 to UTM, and then compute the absolute values for the vertices, then convert all the vertices back to LL84 (EPSG3857), Web Mercator, so that the Leaflet base maps work properly.

Is this the best way to do things?

Here are some of the constraints I am under

  • This is an add-on to existing code written in C#, DotNet, So I haveto use libraries such as DotSpatial
  • The displacements to the objects are going to be less than 100-200 meters, so it is unlikely to go into the next zone or band of UTM
  • However, if would be nice to deal with those cases, too, and that is looking to be messy
  • I would like as much accuracy as possible, so the less translation the better, it would also help to cut down time, (latency could be an issue)
  • I know that GeoJSON is supposed to support alternative CRS, but I don't think that Leaflet can handle things other than LL84 coordinates in the GeoJSON
Any better suggestions of approach, libraries, etc?



أكثر...
 
أعلى