[gdal-dev] coordinate transforms
Luca Sigfrido Percich
sigfrido at tiscali.it
Tue Aug 21 04:21:25 PDT 2012
Hi Al,
have you tried with ImportFromWkt? The string is a Well Known Text
definition of a SpatialReference.
Sig
srs = osr.SpatialReference()
srs.ImportFromWkt("""
PROJCS["unnamed",
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS
1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6269"]],
PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],
AUTHORITY["EPSG","4269"]],
PROJECTION["Albers_Conic_Equal_Area"],
PARAMETER["standard_parallel_1",34],
PARAMETER["standard_parallel_2",40.5],
PARAMETER["latitude_of_center",0],
PARAMETER["longitude_of_center",-120],
PARAMETER["false_easting",0],
PARAMETER["false_northing",-4000000]]
""")
Il giorno lun, 20/08/2012 alle 22.07 -0700, Al Niessner ha scritto:
> Now I need to create my SpatialReference for the UTM (NAD83)
> coordinates. So, I go back to my USGS geo-referenced PDF dataset and
> look at its projection:
> 'PROJCS["unnamed",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4269"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",34],PARAMETER["standard_parallel_2",40.5],PARAMETER["latitude_of_center",0],PARAMETER["longitude_of_center",-120],PARAMETER["false_easting",0],PARAMETER["false_northing",-4000000]]'
>
>
> The projection onto the Albers_Conic is different than the base NAD83
> that is in osr. So, I tried several random swings at doing and
> ImportFrom but none of them work. Some even crash hard. Since I do not
> understand the acronyms it really is just random guessing. I
> understand URL and this is not a URL and same with XML. The rest are a
> bit of a mystery to me.
More information about the gdal-dev
mailing list