[gdal-dev] OGRSpatialReference::importFromWkt ()

Kyle Shannon ksshannon at gmail.com
Fri Aug 1 16:45:53 EDT 2008


Thank you Mateusz,
I called CPLLoad() to initialize a list of strings and then called
ImportFromEsri() with that string and it worked.  Thanks again.

kss

On Fri, Aug 1, 2008 at 1:42 PM, Mateusz Loskot <mateusz at loskot.net> wrote:

> Kyle Shannon wrote:
>
>> Hello all,
>> I am using OGR Spatial references to reproject points to plot in google
>> earth.  I read an ascii raster and an associated prj file to define the
>> source and destination spatial references.  My program gets hung up with a
>> certain *.prj file containing the text:
>>
>> PROJCS["USA_Contiguous_Albers_Equal_Area_Conic_USGS_version",
>> GEOGCS["GCS_North_American_1983",
>> DATUM["D_North_American_1983",
>> SPHEROID["GRS_1980",6378137.0,298.257222101],TOWGS84[0.0, 0.0, 0.0, 0.0,
>> 0.0, 0.0, 0.0]],
>> PRIMEM["Greenwich",0.0],
>> UNIT["Degree",0.0174532925199433]],
>> PROJECTION["Albers"],
>> PARAMETER["False_Easting",0.0],
>> PARAMETER["False_Northing",0.0],
>> PARAMETER["Central_Meridian",-114.9786],
>> PARAMETER["Standard_Parallel_1",45.54426],
>> PARAMETER["Standard_Parallel_2",46.12414],
>> PARAMETER["Latitude_Of_Origin",45.8342],
>> UNIT["Meter",1.0]]
>>
>>
>> I assume this is a valid prj, although importFrom Wkt() returns 5, which
>> is
>> OGRERR_CORRUPT_DATA.  Any advice would be greatly appreciated.  Thank you
>> for your time.
>>
>
> Kyle,
>
> Yes, this is valid .prj file but the WKT definition it stores
> is not OGC WKT;
>
> It reminds this (compare with ESRI WKT link output):
>
> http://spatialreference.org/ref/epsg/102003/
>
> but parameters are slightly different.
>
>
> I'd suggest you to try to call ImportFromESRI  instead of ImportFromWkt.
> It should handle it, I hope,
>
> Best regards
> --
> Mateusz Loskot, http://mateusz.loskot.net
> Charter Member of OSGeo, http://osgeo.org
>



-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kyle Shannon
Physical Science Technician
RMRS Fire Sciences Lab
Fire, Fuels & Smoke - RWU 4405
5775 Highway 10 W.
Missoula, MT 59808
(406)829-6954
kshannon at fs.fed.us
ksshannon at gmail.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080801/d6cb573e/attachment.html


More information about the gdal-dev mailing list