[OpenLayers-Users] WFS & Spherical Mercator
Josh Livni
mailing_lists at umbrellaconsulting.com
Mon Feb 11 21:25:00 EST 2008
At first glance I see a featureserver issue -- if you try the url that
gets loaded initially (I just checked the firebug console),
featureserver returns an error:
http://69.59.158.11/featureserver/featureserver.cgi/parkinfo_google?format=json&maxfeatures=50&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A900913&BBOX=-40075016.6784,-40075016.50840001,40075016.6784,40075016.8484
I note if you remove the bbox parameter from the url featureserver works
fine.
I also note someone else had a similar problem the other day on the FS
list, but I don't know what happened with that. I recall he also didn't
have simplejson installed. Can you install that, and ensure you are
using the latest featureserver trunk?
-Josh
PS - you may wish to use polygons instead of multipolygons, since
featureserver does not support the latter (though I don't think this is
the problem at hand here), and if using the latest version you can also
put 'attribute_cols' in your config to limit the field results - for
example you may not need your original the_geom column being returned...
Jennifer Strahan wrote:
> Hello,
>
> I'm having trouble overlaying a WFS layer on the Google Spherical
> Mercator layers. For some reason, the BBox query fails. Not sure if
> it's an issue with my data or with the BBOX values that are added to the
> URL.
>
> Here's a link to my test code: http://69.59.158.11/TEST/wfs.html
> The data is in a PostGIS database and I'm using FeatureServer.
> Originally the SRID for the data I'm working with is 4326.
>
> In order to convert to 900913, I followed these steps:
>
> 1. Insert a reference to 900913 into spatial_ref_sys:
> INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text,
> srtext) values ( 900913, 'spatialreference.org', 900913, '+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 +wktext +no_defs',
> 'PROJCS["unnamed",GEOGCS["unnamed
> ellipse",DATUM["unknown",SPHEROID["unnamed",6378137,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Mercator_2SP"],PARAMETER["standard_parallel_1",0],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1],EXTENSION["PROJ4","+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 +wktext +no_defs"]]');
>
> 2. Add a new geometry column to my table:
> select
> addGeometrycolumn('public','holdingsfeb08','the_geom_google',900913,'MULTIPOLYGON',2);
>
> 3. update holdingsfeb08 set the_geom_google = transform(the_geom, 900913);
>
> My FeatureServer config looks like this:
> [parkinfo_google]
> type=PostGIS
> dsn=dbname=parkinfo_review
> layer=holdingsfeb08
> fid=gid
> geometry=the_geom_google
>
> Anyone have any idea how I can get this working?
>
> Thanks,
> Jennifer
>
>
More information about the Users
mailing list