smellman / ogr2poly

5 stars 6 forks source link

swap latitude and longitude order #2

Closed gka closed 3 years ago

gka commented 4 years ago

Hi, and thanks for this!

We ran into some issues when converting GeoJSON files to Poly using this script. According to the OSM wiki page the order must be longitude, latitude.

The third and subsequent lines in the section contain the coordinates of the polygon points in the order longitude, latitude, separated by whitespace.

After some debugging I figured out that in the generated Poly files the order was latitude, longitude. After I swapped x and y everything worked.

Maybe this is useful for anyone using this script.

smellman commented 3 years ago

I merged another pull request(https://github.com/smellman/ogr2poly/pull/5). If this pull request is mean that you want, I want to close this PR.