<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Sans">
<p>Le Thursday 06 December 2007 15:37:53 Christopher Schmidt, vous avez ecrit :</p>
<p>&gt; On Thu, Dec 06, 2007 at 03:11:02PM +0100, Jacolin Yves wrote:</p>
<p>&gt; &gt; Le Thursday 06 December 2007 14:58:46 Christopher Schmidt, vous avez ecrit :</p>
<p>&gt; &gt; &gt; On Thu, Dec 06, 2007 at 02:54:46PM +0100, Jacolin Yves wr= ote:</p>
<p>&gt; &gt; &gt; &gt; Hi,</p>
<p>&gt; &gt; &gt; &gt;</p>
<p>&gt; &gt; &gt; &gt; One ofmy friend is trying to create a map with a Goo= gle layer as</p>
<p>&gt; &gt; &gt; &gt; baseLayer and he added a GML layer. I converted his = shapefile from</p>
<p>&gt; &gt; &gt; &gt; WGS84 to</p>
<p>&gt; &gt; &gt; &gt; SphericalMercator with ogr then he converted it in G= ML file.</p>
<p>&gt; &gt; &gt; &gt;</p>
<p>&gt; &gt; &gt; &gt; The map is ok except for the GML layer where there i= s still an</p>
<p>&gt; &gt; &gt; &gt; y-offset. Do you know what we forgot to do?</p>
<p>&gt; &gt; &gt;</p>
<p>&gt; &gt; &gt; My first instinct would be to blame your transformation. = How did you</p>
<p>&gt; &gt; &gt; transform it from 4326 to spherical mercator?</p>
<p>&gt; &gt;</p>
<p>&gt; &gt; Something like this :</p>
<p>&gt; &gt;</p>
<p>&gt; &gt; ogr2ogr -f &quot;ESRI Shapefile&quot; -t_srs &quot;+proj=3Dmer= c +a=3D6378137 +b=3D6378137</p>
<p>&gt; &gt; +lat_ts=3D0.0 +lon_0=3D0.0 +x_0=3D0.0 +y_0=3D0 +k=3D1.0 +units= =3Dm +nadgrids=3D@null</p>
<p>&gt; &gt; +no_defs&quot; -s_srs &quot;EPSG:4326&quot; Mono2006_2.shp Mon= o2006_region.shp</p>
<p>&gt;</p>
<p>&gt; Seems sane. Can you confirm that a single non-zero coordinate match= es</p>
<p>&gt; the output of passing the same lat/lon into</p>
<p>&gt; http://dev.openlayers.org/docs/files/OpenLayers/Layer/SphericalMerc= ator-js.</p>
<p>&gt;html#OpenLayers.Layer.SphericalMercator.forwardMercator ?</p>
<p>&gt;</p>
<p>&gt; Regards,</p>
<p>Hi Christopher,</p>
<p></p>
<p>I don't know if I understood what you mean but I tried in firebug console :</p>
<p>&gt;&gt;&gt; google.forwardMercator(4.812402,45.769954);</p>
<p>lon=3D535714.1400579594,lat=3D5743560.513581038 lon=3D535714.1400579594 = lat=3D5743560.513581038</p>
<p></p>
<p>the GML layer shows no data there. 4.812402,45.769954 come from the GML = file in WGS84 (first vertex from first polygon).</p>
<p></p>
<p>The corresponding vertex in the new GML file in 'spherical Mercartor' is= : 535714.140132531,5712913.07157348 which is incorrect (Y-offset).</p>
<p></p>
<p>Does ogr need to supprot datum shifting for creating my file in spherica= l Mercator? (http://proj.maptools.org/faq.html#datumshifting)</p>
<p></p>
<p>Thanks for your help,</p>
<p></p>
<p>Y.</p>
<p>PS : send again, don't know if you receive it, sorry for inconvenience.</p>
<p>-- </p>
<p>Yves Jacolin</p>
<p>---</p>
<p>http://softlibre.gloobe.org</p>
</body></html>