Skip to content

Commit 5f49618

Browse files
Update B13346_05_09-reprojection.py
Added tgt_spatRef.SetAxisMappingStrategy(0) to account for the latest GDAL axis updated which flips the data.
1 parent 1a1d205 commit 5f49618

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Chapter05/B13346_05_09-reprojection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
# Target spatial reference
1515
tgt_spatRef = osr.SpatialReference()
1616
tgt_spatRef.ImportFromEPSG(4326)
17+
# Account for the flipped axis change in the latest GDAL
18+
tgt_spatRef.SetAxisMappingStrategy(0)
1719

1820
# Source shapefile
1921
driver = ogr.GetDriverByName("ESRI Shapefile")

0 commit comments

Comments
 (0)