IS-AgroSmart / AgroSmart-Web

1 stars 1 forks source link

Low precision on vector layer coordinates #14

Closed jreyesr closed 4 years ago

jreyesr commented 4 years ago

Geoserver seems to report the coordinates of vector layers with only four decimals, which corresponds to approx. 10 meters @ latitude 0. This will perceptibly move vector layer points to be on a 10-meter grid.

bitmap

Directly requesting a GeoJSON output confirms it:

{"type":"FeatureCollection","totalFeatures":8,"features":[{"type":"Feature","id":"camera_locations.1","geometry":{"type":"Point","coordinates":[-79.9639,-2.1392]} ...

jreyesr commented 4 years ago

Solution is to access Geoserver settings on the left sidebar, Global > OGC Services > Number of decimals (GML and GeoJSON output) > Set to 8 or 9.

Warning: must be done on every computer :(

bitmap

{"type":"FeatureCollection","totalFeatures":8,"features":[{"type":"Feature","id":"camera_locations.1","geometry":{"type":"Point","coordinates":[-79.9639108,-2.1391881]},