[OpenLayers-Users] Google and GML layer

Christopher Schmidt crschmidt at metacarta.com
Thu Dec 6 09:37:53 EST 2007


On Thu, Dec 06, 2007 at 03:11:02PM +0100, Jacolin Yves wrote:
> Le Thursday 06 December 2007 14:58:46 Christopher Schmidt, vous avez ?crit?:
> > On Thu, Dec 06, 2007 at 02:54:46PM +0100, Jacolin Yves wrote:
> > > Hi,
> > >
> > > One ofmy friend is trying to create a map with a Google layer as
> > > baseLayer and he added a GML layer. I converted his shapefile from WGS84
> > > to
> > > SphericalMercator with ogr then he converted it in GML file.
> > >
> > > The map is ok except for the GML layer where there is still an y-offset.
> > > Do you know what we forgot to do?
> >
> > My first instinct would be to blame your transformation. How did you
> > transform it from 4326 to spherical mercator?
> 
> Something like this : 
> 
> ogr2ogr -f "ESRI Shapefile" -t_srs "+proj=merc +a=6378137 +b=6378137 
> +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null 
> +no_defs" -s_srs "EPSG:4326" Mono2006_2.shp Mono2006_region.shp

Seems sane. Can you confirm that a single non-zero coordinate matches
the output of passing the same lat/lon into
http://dev.openlayers.org/docs/files/OpenLayers/Layer/SphericalMercator-js.html#OpenLayers.Layer.SphericalMercator.forwardMercator
?

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list