<div dir="ltr">Thank you Mateusz, <br>I called CPLLoad() to initialize a list of strings and then called ImportFromEsri() with that string and it worked. Thanks again.<br><br>kss<br><br><div class="gmail_quote">On Fri, Aug 1, 2008 at 1:42 PM, Mateusz Loskot <span dir="ltr"><<a href="mailto:mateusz@loskot.net">mateusz@loskot.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">Kyle Shannon wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello all,<br>
I am using OGR Spatial references to reproject points to plot in google<br>
earth. I read an ascii raster and an associated prj file to define the<br>
source and destination spatial references. My program gets hung up with a<br>
certain *.prj file containing the text:<br>
<br>
PROJCS["USA_Contiguous_Albers_Equal_Area_Conic_USGS_version",<br>
GEOGCS["GCS_North_American_1983",<br>
DATUM["D_North_American_1983",<br>
SPHEROID["GRS_1980",6378137.0,298.257222101],TOWGS84[0.0, 0.0, 0.0, 0.0,<br>
0.0, 0.0, 0.0]],<br>
PRIMEM["Greenwich",0.0],<br>
UNIT["Degree",0.0174532925199433]],<br>
PROJECTION["Albers"],<br>
PARAMETER["False_Easting",0.0],<br>
PARAMETER["False_Northing",0.0],<br>
PARAMETER["Central_Meridian",-114.9786],<br>
PARAMETER["Standard_Parallel_1",45.54426],<br>
PARAMETER["Standard_Parallel_2",46.12414],<br>
PARAMETER["Latitude_Of_Origin",45.8342],<br>
UNIT["Meter",1.0]]<br>
<br>
<br>
I assume this is a valid prj, although importFrom Wkt() returns 5, which is<br>
OGRERR_CORRUPT_DATA. Any advice would be greatly appreciated. Thank you<br>
for your time.<br>
</blockquote>
<br></div>
Kyle,<br>
<br>
Yes, this is valid .prj file but the WKT definition it stores<br>
is not OGC WKT;<br>
<br>
It reminds this (compare with ESRI WKT link output):<br>
<br>
<a href="http://spatialreference.org/ref/epsg/102003/" target="_blank">http://spatialreference.org/ref/epsg/102003/</a><br>
<br>
but parameters are slightly different.<br>
<br>
<br>
I'd suggest you to try to call ImportFromESRI instead of ImportFromWkt.<br>
It should handle it, I hope,<br>
<br>
Best regards<br><font color="#888888">
-- <br>
Mateusz Loskot, <a href="http://mateusz.loskot.net" target="_blank">http://mateusz.loskot.net</a><br>
Charter Member of OSGeo, <a href="http://osgeo.org" target="_blank">http://osgeo.org</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>Kyle Shannon<br>Physical Science Technician<br>RMRS Fire Sciences Lab<br>Fire, Fuels & Smoke - RWU 4405<br>5775 Highway 10 W.<br>
Missoula, MT 59808<br>(406)829-6954<br><a href="mailto:kshannon@fs.fed.us">kshannon@fs.fed.us</a><br><a href="mailto:ksshannon@gmail.com">ksshannon@gmail.com</a><br>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
</div>