Friday, 7 September 2018

coordinate system - How to test if two GDAL datasets are in the same projection?


I'm attemping to write a funciton to test if a list of datasets are in the same projection. Naively, I thought I could test the text of WKTs, but that does not work in the following case:


'PROJCS["NAD_1983_UTM_Zone_14N",GEOGCS["NAD83",DATUM["North_American_Datum_1983", ...'


'PROJCS["NAD83 / UTM zone 14N",GEOGCS["NAD83",DATUM["North_American_Datum_1983", ...'


Even though the projections are identical, and the rest of the WKT is identical, the tags leading them are not which makes me wonder if there is a formal mechanism for testing the equality of projection systems.


I'm programming with the GDAL extensions in Python, but any answer would be helpful.




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...