[OpenLayers-Users] WFS & Spherical Mercator

Eric Lemoine eric.c2c at gmail.com
Wed Feb 13 00:33:38 EST 2008


On Feb 12, 2008 11:26 PM, Jennifer Strahan <jennifer at greeninfo.org> wrote:
> Hello All,
>
> I figured out what the issue is.  For some reason the generated SQL has
> the wrong SRID.  I figured this out by adding a few lines to PostGIS.py
> to write the sql to a file.  The resulting SQL has 4326 for the SRID
> when it should be 900913.
>
> For example if my request is:
> http://69.59.158.11/featureserver/featureserver.cgi/parkinfo_google?format=WFS&maxfeatures=50&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A900913&BBOX=-40075016.6784,-40075016.50840001,40075016.6784,40075016.8484
>
> The sql is:
> SELECT AsText(the_geom_google) as fs_text_geom, gid, unit_name,
> agncy_nam, access FROM "holdingsfeb08" WHERE the_geom_google &&
> SetSRID('BOX3D(-40075016.678400 -40075016.508400,40075016.678400
> 40075016.848400)'::box3d, 4326) and intersects(the_geom_google,
> SetSRID('BOX3D(-40075016.678400 -40075016.508400,40075016.678400
> 40075016.848400)'::box3d, 4326)) LIMIT 50
>
> If I change line 28 from
>  def __init__(self, name, srid = 4326, fid = "ogc_fid", geometry =
> "the_geom", order = "", attribute_cols = '*', writable = True, **args):
>
> to
>
>  def __init__(self, name, srid = 900913, fid = "ogc_fid", geometry =
> "the_geom", order = "", attribute_cols = '*', writable = True, **args):
>
> All works fine.  So it seems like the parameter from the URL is not
> overwriting the initial value set here.

Hi Jennifer,

Given what you're saying, the issue seems to be on the side of
featureserver. In that case, you may want to report it on the
featureserver mailing list.

Thanks,
--
Eric



More information about the Users mailing list