We use GDAL/OGR/Proj4 in our application: MapWindow GIS.<br><br>We're testing the MapWinGIS.GeoProjection class. It's just a wrapper around OGRSpatialReference class, so it's GDAL behavior infact.<br><br>The test code:
<br>
<pre class="bbcode"> <span style="color:Blue">private</span> <span style="color:Blue">void</span> button8_Click(<span style="color:Blue">object</span> sender, <span style="color:ff2b91af">EventArgs</span> e)
{
MapWinGIS.<span style="color:ff2b91af">GeoProjection</span> proj = <span style="color:Blue">new</span> <span style="color:ff2b91af">GeoProjection</span>();
proj.ImportFromEPSG(4326);
System.Diagnostics.<span style="color:ff2b91af">Debug</span>.Print(proj.ExportToWKT());
<span style="color:Blue">string</span> s = proj.ExportToProj4();
proj.ImportFromProj4(s);
System.Diagnostics.<span style="color:ff2b91af">Debug</span>.Print(proj.ExportToWKT());
s = proj.ExportToProj4();
proj.ImportFromProj4(s);
System.Diagnostics.<span style="color:ff2b91af">Debug</span>.Print(proj.ExportToWKT());
}</pre>
<br>
Results:
<br>
<br>
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],<br>AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],<br>
UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
<br>
<br>
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],
<br>
AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
<br>
UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4326"]]
<br>
<br>
GEOGCS["WGS
84",DATUM["unknown",SPHEROID["WGS84",6378137,298.257223563],TOWGS84[0,0,0,0,0,0,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]
<br>
<br>
If we test the first and the third string with GeoProjection.IsSame() it will return false, but they are the same.<br><br>How should we bypass this?<br>All suggestions are welcome.<br><br>Thanks,<br><br>Paul<br><br><br><div id="WISESTAMP_SIG_2478">
<div style="font-size: 13.3px; font-family: Verdana, Arial, Helvetica, sans-serif;"><div style="border: 1px solid #e5e5e5;background-color: #f8f8f8;padding: 0.8em 0.8em 0.3em 0.8em;"><div style="margin: 0 0 8px 0"><p style="margin:0; ">
<span><strong><img style="float: left; margin-left: 5px; margin-right: 5px;" src="http://www.bontepaarden.nl/bontepaarden/images/newButton.png" alt="" height="120" width="160">Paul Meems </strong><br><span>Release manager, configuration manager</span><br>
<span>and forum moderator of MapWindow GIS.</span><br><a href="http://www.mapwindow.org/" target="_blank"><span>www.mapwindow.org</span></a><br><br><span>Owner of MapWindow.nl - Support for</span><br><span>Dutch speaking users.</span><br>
<a href="http://www.mapwindow.nl/" target="_blank"><span>www.mapwindow.nl</span></a><br></span></p>
<p style="margin:0; "><strong><br></strong></p></div></div><img src="http://p1.wisestamp.com/pixel.png?p=mozilla&v=2.6.1.0&t=1311581133873&u=482737fd0c4ca423" height="1" width="1"></div></div><br>