[Featureserver] Problem with PostGIS

Paolo Corti pcorti at gmail.com
Thu Feb 7 09:08:44 EST 2008


Hi!

I am totally new to featureserver, but since what I am seeing looks an
amazing project.
I like the REST-Pythonic architecture

I have successfully installed it, and I can use the demo, query the
layers, and and edit features.

Now I am trying to use some personal dataset, to test it more deeply.
I could add shapefiles with no troubles, the issues came when I tried
to add PostGIS layers.

first I have added this layer to featureserver.cfg:

[zone2]
type=PostGIS
dsn=dbname=gisdb
layer=zone2
fid=gid
geometry=the_geom

first I had problems with accessing the database, I had to create a
www-data role (looks from sources that there is no way to use a
specific postgres user in the featureserver.cfg, so featureserver is
accessing postgis as the www-data user - I am using Apache CGI).

After adding the www-data role, I had this new error:

http://featureserver/featureserver.cgi/zone2/1.gml

I get:

An error occurred: ERROR:  current transaction is aborted, commands
ignored until end of transaction block

SELECT AsText(the_geom) as fs_text_geom, * FROM "zone2" WHERE gid = 1
  File "/home/corti/public_html/featureserver/FeatureServer/Server.py",
line 281, in cgiHandler
    format, content = service.dispatchRequest( params, path_info,
host, post_data, request_method, accepts )
  File "/home/corti/public_html/featureserver/FeatureServer/Server.py",
line 145, in dispatchRequest
    result = method(action)
  File "/home/corti/public_html/featureserver/FeatureServer/DataSource/PostGIS.py",
line 172, in select
    cursor.execute(str(sql), {self.fid_col: action.id})

If I query PostGIS wit the SELECT is causing the error, I correctly
get the feature (with gid=1).

Could you give me some help?

thanks, and again congrats for the wonderfull project!

Paolo



-- 
Paolo Corti
http://www.paolocorti.net



More information about the Featureserver mailing list