osm-search / TIGER-data

Preprocessing US Census TIGER data for Nominatim geocoder
GNU General Public License v2.0
5 stars 3 forks source link

reverse coordinates in unproject #4

Closed mtmail closed 3 years ago

mtmail commented 3 years ago

I wish I had a good explanation.

I ran the script against 2019 and 2020 data and the coordinate pairs in the output (SQL/WKN) ended up lat,lon instead of the expected lon,lat. The script returned lon,lat for 10 years, as far as I can trace the git history, the input projection didn't change (*.prj file), the hardcoded projection config in the script didn't change either. And I ran the script myself against 2019,2018 data and still had the output files, can't reproduce it.

Maybe in the past the scripts ran under Python2 and now Python3 (or rather updated Python libraries) changed.

lonvia commented 3 years ago

Looks like an issue with updating from GDAL 2.x.x to GDAL 3.x.x: https://gdal.org/tutorials/osr_api_tut.html#crs-and-axis-order

mtmail commented 3 years ago

@lonvia Mystery solved!