[Featureserver] Fwd: PostGIS config help needed
Jonathan Huxley
jon at jonhuxley.com
Mon Aug 18 17:33:44 EDT 2008
Seems this is what's causing the problem:
An error occurred: new row for relation "scribble" violates check
constraint "enforce_geotype_the_geom"
File "/opt/lampp/htdocs/featureserver/FeatureServer/Server.py",
line 298, in cgiHandler
format, content = service.dispatchRequest( params, path_info,
host, post_data, request_method, accepts )
File "/opt/lampp/htdocs/featureserver/FeatureServer/Server.py",
line 145, in dispatchRequest
result = method(action)
File "/opt/lampp/htdocs/featureserver/FeatureServer/DataSource/
PostGIS.py", line 142, in create
cursor.execute(str(sql), self.feature_values(feature))
Begin forwarded message:
> From: Jonathan Huxley <jon at jonhuxley.com>
> Date: August 18, 2008 2:20:25 PM PDT
> To: featureserver at openlayers.org
> Subject: PostGIS config help needed
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/featureserver/attachments/20080818/31382d82/attachment.html
More information about the Featureserver
mailing list