<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>GDAL OGRSpatialReference::Validate()</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2 FACE="Arial">Dear all,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I'm having a bit trouble using the method OGRSpatialReference::Validate().</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">When I define a projection Mercator</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">PROJCS["World_Mercator",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],PARAMETER["Standard_Parallel_1",0],UNIT["Meter",1]]</FONT></P>
<P><FONT SIZE=2 FACE="Arial">as it is the exact definition of ESRI, the validate method fails with the error code "OGR_CORRUPT_DATA".</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I use the following steps:</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">1. create a new new OGRSpatialReference myRef</FONT>
<BR><FONT SIZE=2 FACE="Arial">2. call myRef.importFromWkt() with the string above as argument</FONT>
<BR><FONT SIZE=2 FACE="Arial">3. call myRef.morphFromESRI()</FONT>
<BR><FONT SIZE=2 FACE="Arial">4. call myRef.Validate() returning OGR_CORRUPT_DATA</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Do you have any idea what's going wrong?</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">The definition string is taken from ESRI ArcGIS 9.0</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Thanks for any help</FONT>
</P>
<P> <FONT SIZE=2 FACE="Arial">Martin</FONT>
</P>
</BODY>
</HTML>