[Featureserver] postgis connection

Bobby Braswell rob.braswell at unh.edu
Fri Oct 19 14:53:42 EDT 2007


Hi-

I am trying to set up a postGIS backend to featureserver. I was  
previously using the DBM option, and this worked for me (it's  
awesome, by the way, thanks) with no problems. With postgis I am  
missing something, perhaps obvious, but I'm sorry that I couldn't  
find the answer in the archives or docs.

My config file looks like the example in the documentation:

[metadata]
default_service=GeoJSON

[scribble]
type=PostGIS
dsn=dbname=mydata
layer=mylayer
fid=ogc_fid
geometry=wkb_geometry

I believe I have settled access and permissions issues, and I have a  
postGIS database called mydata, with a table called mylayer, defined  
as follows:

CREATE TABLE mylayer (ogc_fid INTEGER, wkb_geometry GEOMETRY;
GRANT ALL ON TABLE mylayer TO www;

The database was built using a postgis template and has the usual  
geometry_columns and spatial_ref_sys tables.

However I get the following error from the browser:
Error: invalid label
Source File: https://portsmouthresponse.unh.edu/cgi/featureserver.cgi/ 
scribble/all.json?maxfeatures=20&callback=load_list
Line: 1, Column: 11
Source Code:
{"features": []}

This line is what I get if I issue the create command using curl. I'm  
not sure what "invalid layer" is referring to.

One question is: should I indeed be creating the table myself? In the  
DBM case, featureserver created the database in /tmp.

Also: I feel like the table should have more columns corresponding to  
the attributes of the geometric objects I am uploading, for some  
reason I'm not clear on how many those are or where they are coming  
from. I hope I have provided a clear explanation of my problem and  
that it is not

Rob Braswell






-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/featureserver/attachments/20071019/b5587125/attachment.html


More information about the Featureserver mailing list