[OpenLayers-Users] drawing WFS features on google satellite map: which EPSG?

Eric Lemoine eric.c2c at gmail.com
Tue Jul 1 09:10:02 EDT 2008


Hi. Yes you need to use spherical mercator and 900913. Then either
configure the WFS service to serve the data in 900913 or rely on
OpenLayers to do the 4326 to 900913 reprojection. To have OL do the
reprojection just pass option "projection: new
OpenLayers.Projection('EPSG:4326')" to the WFS constructor. Hope this
helps. Cheers. Eric

2008/7/1, Fabio D'Ovidio <fabiodovidio at gmail.com>:
> Hi!
> As sad in previous mails, i am drawing PostGIS features trought
> Geoserver WFS-T and OpenLayers using GOOGLE_HYBRID_MAP as background.
> I am not using spherical mercator ad my PostGIS features are in EPSG:4326.
> In order to query my features with GetFeatureInfo request I must display
> them as WMS layers, too.
> The problem is that when I refresh my map after drawing I have a shift
> between WMS and WFS Layers (that are the same feature). I think it is
> due to NOT spherical mercator projection. Is it right?
> So, I have thought to change my map proj using EPSG:900913. Two questions:
>
>     * If i draw features in 4326 on GOOGLE layer without changing my
>       EPSG in spherical mercator, when I serve them trought WMS
>       GeoServer are they shifted respect actual position? Can I consider
>       my features position reliable?
>     * If I must use spherical mercator to draw, have I define
>       EPSG:900913 in spatial_reference table of PostGIS in order to
>       create FeatureTypes correctly in GeoServer?
>
> Thanks a lot!
>
> --
> Ing. Fabio D'Ovidio
>
> INOVA Open Solutions s.r.l.
> Web : http://www.inovaos.it
> Tel.: 081 197 57 600
> mail: fabiodovidio at gmail.com
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



More information about the Users mailing list