[mapserver-users] Postgis/mapserver error

Paul Maddock Paul.Maddock at ijus.net
Thu Apr 26 13:51:40 PDT 2012


Dear all,

I'm currently trying to have mapserver v6.0.1 grab data from my postgis database v 2.0.0  .  When I request the layer through mapserver using cgi commands I get the following error message:

msDrawMap(): Image handling error. Failed to draw layer named 'aep_polygon_polyline'. msPostGISLayerWhichShapes(): Query error. Error (ERROR: function geomfromtext(unknown, integer) does not exist LINE 1: ...gid" from aep_polygon_polyline where geom_3754 && GeomFromTe... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. ) executing query: select encode(ST_AsBinary(ST_Force_2D("geom_3754"),'NDR'),'hex') as geom,"gid" from aep_polygon_polyline where geom_3754 && GeomFromText('POLYGON((980934.251404232 125495.986,980934.251404232 1038792.604,2809561.55559577 1038792.604,2809561.55559577 125495.986,980934.251404232 125495.986))',3754)


my mapfile looks like this:

LAYER
   NAME "aep_polygon_polyline"
   STATUS ON
   TYPE line
   CONNECTIONTYPE postgis
   CONNECTION "host=localhost dbname=aep_columbus user=****** password=******** port=5432"


   DATA "geom_3754 from aep_polygon_polyline using unique gid using srid=3754"
   PROJECTION
                "init=epsg:3754"
   END
   CLASSITEM 'gid'
    CLASS
                STYLE
                                COLOR 200 200 200
                                OUTLINECOLOR 200 200 200
                                SIZE 2
                END
    END
END


I used the following command to create my shapefile:

shp2pgsql -s 3754 -g geom_3754 /path/to/my/shpfile | psql -h localhost -U postgres -p 5432 -d aep_columbus

3754 is Ohio State Plane South.  Does this mean that I need to use the -G geography option to make my data properly render?

Thank you so much,
Paul






Paul A. Maddock
Mapping Technician
IJUS LLC
560 Officenter Place
Gahanna, OH 43230
Cell: (513) 404-6476
[cid:image001.gif at 01CD23C8.5F79EDB0]<http://www.ijus.net/index.html>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120426/8f7b1229/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 3201 bytes
Desc: image001.gif
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120426/8f7b1229/attachment.gif>


More information about the MapServer-users mailing list