[mapserver-users] cannot able to test the mapfile-database eror
ritesh ambastha
ritesh.linux at gmail.com
Mon Mar 16 06:43:31 PDT 2009
Hey Syed,
You should also check whether geometry functions are available with your
installed postgres. Its the most common error. Check whether this function
exists or not - force_2d(geom)
Cheers,
Ritesh
syed mohseen wrote:
>
> hi all,
> i am a new bie to fgs and i want to test one of my mapfile with
> connecting to my database.
> here is my mapfile
>
>
> NAME "test"
> SIZE 800 600
> IMAGECOLOR 249 245 186
> IMAGETYPE png
> EXTENT -1.00 -1.00 1.00 1.00
> LAYER
> CONNECTIONTYPE postgis
> NAME "test"
> CONNECTION "user=postgres password=hellopostgres dbname=postgres
> host=localhost"
> DATA "geom FROM test"
> STATUS ON
> TYPE POINT
> END
> END
>
>
>
> whenever i test the file as *shp2img** *i get the following error
>
>
> msDrawMap(): Image handling error. Failed to draw layer named 'test'. <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') )'
>
> 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?
> '
>
> More Help:
>
> Error with POSTGIS data variable. You specified 'check your .map file'.
> Standard ways of specifiying are :
> (1) 'geometry_column from geometry_table'
> (2) 'geometry_column from (sub query) as foo using unique column name
> using
> SRID=srid#'
>
> Make sure you put in the 'using unique column name' and 'using SRID=#'
> clauses in.
>
> For more help, please see http://postgis.refractions.net/documentation/
>
> Mappostgis.c - version of Jan 23/2004.
> <br>
>
>
>
>
> any solutions will be appreciated
>
>
> regards
> SyedMohseen
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
--
View this message in context: http://n2.nabble.com/cannot-able-to-test-the-mapfile-database-eror-tp2484211p2486081.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
More information about the MapServer-users
mailing list