hi all,<br> i am a new bie to fgs and i want to test one of my mapfile with connecting to my database.<br> here is my mapfile<br><br><br>NAME "test"<br>SIZE 800 600<br>IMAGECOLOR 249 245 186<br>IMAGETYPE png<br>
EXTENT -1.00 -1.00 1.00 1.00<br>LAYER<br> CONNECTIONTYPE postgis<br> NAME "test"<br> CONNECTION "user=postgres password=hellopostgres dbname=postgres host=localhost"<br> DATA "geom FROM test"<br>
STATUS ON<br> TYPE POINT<br> END<br>END<br><br><br><br>whenever i test the file as <u><b>shp2img</b></u><b> </b>i get the following error<br><br><br>msDrawMap(): Image handling error. Failed to draw layer named 'test'. <br><br>
prepare_database(): Query error. Error executing POSTGIS DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT asbinary(force_collection(force_2d(geom)),'NDR'),OID::text from test WHERE geom && setSRID('BOX3D(-1.3338898163606 -1,1.3338898163606 1)'::BOX3D, find_srid('','test','geom') )' <br>
<br>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?<br>'<br><br>More Help:<br>
<br>Error with POSTGIS data variable. You specified 'check your .map file'.<br>Standard ways of specifiying are : <br>(1) 'geometry_column from geometry_table' <br>(2) 'geometry_column from (sub query) as foo using unique column name using SRID=srid#' <br>
<br>Make sure you put in the 'using unique column name' and 'using SRID=#' clauses in.<br><br>For more help, please see <a href="http://postgis.refractions.net/documentation/">http://postgis.refractions.net/documentation/</a> <br>
<br>Mappostgis.c - version of Jan 23/2004.<br> <br><br><br><br><br><br> any solutions will be appreciated<br><br><br> regards<br> SyedMohseen<br>