[Featureserver] PostGIS config help needed

Jonathan Huxley jon at jonhuxley.com
Mon Aug 18 17:20:25 EDT 2008


Hi list,

Newbie question:

I think I need some hand-holding here.  Trying to get FeatureServer  
working with a PostGIS back end.

Created a database called "spatial_data".  Create a table called  
"scribble":

create table scribble (id serial, name varchar, description varchar);

select AddGeometryColumn
('spatial_data','scribble','the_geom','4326','MULTIPOLYGON',2);

Updated the featureserver.cfg page so that it looks like this:

[metadata]
default_service=GeoJSON
error_log=error.log

[scribble]
type=PostGIS
dsn=host=localhost dbname=spatial_data user=postgres password=
layer=scribble
fid=id
geometry=the_geom
srid=4326
attribute_cols=id,name,description,the_geom

Using OpenLayers.   I create a polygon and select 'upload to server',  
no error message and when looking at Postgres the table is empty.

featureserver.cgi/scribble/all.atom shows an empty feed / XML output  
is empty also.  Nothing in the Postgres log file.  Confused.  By the  
way, it works great using the default install (DBM) so I know the  
OpenLayers / FeatureServer solution isn't at fault.

Any help would be gratefully received!

Thanks,

Jon



More information about the Featureserver mailing list