Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom EPSG should use traditional coord order #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions openaddr/conform.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,10 @@ def ogr_source_to_csv(source_config, source_path, dest_path):
_L.debug("SRS tag found specifying %s", srs)
inSpatialRef = osr.SpatialReference()
inSpatialRef.ImportFromEPSG(int(srs[5:]))

if int(osgeo.__version__[0]) >= 3:
# GDAL 3 changes axis order: https://github.com/OSGeo/gdal/issues/1546
inSpatialRef.SetAxisMappingStrategy(osgeo.osr.OAMS_TRADITIONAL_GIS_ORDER)
else:
# OGR is capable of doing more than EPSG, but so far we don't need it.
raise Exception("Bad SRS. Can only handle EPSG, the SRS tag is %s", srs)
Expand Down