Problem retrieving data from PostGIS

Edward Fialkowski wef1 at CEC.WUSTL.EDU
Tue Aug 21 13:38:10 EDT 2007


Hi List, I have finally managed to get mapserver to connect to my postGIS
database, but when I try to retrieve data, i get the following error:

prepare_database(): Query error. Error executing POSTGIS DECLARE (the actual
query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
asbinary(force_collection(force_2d(geometry)),'NDR'),OID::text from temp
WHERE geometry && setSRID('BOX3D(-2200000 -712631,3072800 3840000)'::BOX3D,
find_srid('','temp','geometry') )'

Postgresql reports the error as 'ERROR:  find_srid() - couldnt find the
corresponding SRID - is the geometry registered in the GEOMETRY_COLUMNS
table?  Is there an uppercase/lowercase missmatch?
'

So, the problem is cannot find corresponding SRID, can anyone help me out a
bit with this set up.
I have lots of data I will eventually be serving.  To start, I can just use
some point data, or i can go straight to polygons.

Either way, I can't seem to find the correct way to insert my data.
So, I have a database with 'data', 'geometry_columns', 'and
spatial_ref_sys', I insert my data into 'data', and then I have to add
something to geometry_columns?  What columns should I store in 'data'?

I've read the postGIS documentation, it just doesn't seem to answer the
question for me, so if anyone would be willing to help out, i would GREATLY
appreciate it.

Thanks.
-Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070821/da872252/attachment.html


More information about the mapserver-users mailing list