[mapserver-users] error accessing PostGIS 2 layer

Donald Kerr donald.kerr at dkerr.co.uk
Thu May 17 15:20:08 EDT 2012


Run one of the ".sql" files in "\PostgreSQL\9.1\share\contrib\postgis-2.0"
to restore legacy funtions to PostGIS 2 e.g. "legacy.sql".
"legacy_minimal.sql" worked for me with my set up.

Regards,

Donald



-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Puneet Kishor
Sent: 17 May 2012 20:06
To: mapserver
Subject: [mapserver-users] error accessing PostGIS 2 layer


I migrated my data to PostGIS 2, and now I am getting the following error
(using the same mapfile as with PostGIS 1.5.3)

	msPostGISLayerWhichShapes(): Query error. Error executing query:
ERROR:  function 
	geomfromtext(unknown, integer) does not exist
	LINE 1: ...e_geom FROM trees.range) a_view where the_geom &&
GeomFromTe...
                                                             ^
	HINT:  No function matches the given name and argument types. You
might need to 
	add explicit type casts.

The offending query in the mapfile is 

	DATA "the_geom FROM (SELECT gid, species_id, species_color, the_geom
FROM trees.range) a_view USING UNIQUE gid USING srid=4326"

So, it seems the MapServer is using that line to construct its own query,
and that query is not compliant with PostGIS 2. Suggestions?




--
Puneet Kishor_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list