[OpenLayers-Users] WFS & Spherical Mercator

Jennifer Strahan jennifer at greeninfo.org
Mon Feb 11 19:07:43 EST 2008


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

-- 
Jennifer Strahan
GIS Specialist
GreenInfo Network
116 New Montgomery St. Ste. 738
San Francisco, CA 94105
(415)979-0343x306





More information about the Users mailing list