Skip to main content
Question

Writing Polygon Geom to Spatialite that is on the date line

  • May 25, 2017
  • 1 reply
  • 17 views

rhildebrand
Participant
Forum|alt.badge.img

When I write a polygon geometry whose western edge is equivalent to -180.0, but in Spherical Mercator (-20037508.342789244), the longitude value switches signs and becomes positive. I have tried the same process, but writing to a GeoJSON file and no problem occurs.

Is there any value modification occurring when features are written to the Spatialite format?

I can provide a very simple workspace to replicate this if it is needed.

For what it's worth, I believe this is a precision problem.

Simply changing the western longitude from -20037508.342789244 to -20037508.34278924 "solves" the problem. It does however translate to changing the actually geometry because something that originally was equivalent to -180.0 is now -179.99999999999997.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

david_r
Celebrity
  • May 26, 2017

You could try the tip outlined in this article and see if it helps:

https://knowledge.safe.com/articles/34013/dateline-problem.html