[mapserver-users] No Postgresql mapserver images

Michael McInnis mmcinnis59 at msn.com
Fri Jul 26 16:01:47 PDT 2013



Problem: Although I can use my mapserver install to draw
shapefile maps I can’t draw maps from my postgres source. I can also display
the postgres points in QGIS so I’m not sure what the problem is in mapserver.

 

Ideas? Thanks in Advance !


 

http://mapserver0/cgi-bin/mapserv?map=/media/D_Drive/www/gis/postgresMap.map&layer=airports&mode=map

 

msDrawMap(): Image handling error. Failed to draw layer
named 'airports'. msPostGISLayerWhichShapes(): Query error. Error (ERROR:
function geomfromtext(unknown, integer) does not exist LINE 1: ...,'hex') as
geom,"oid" from airports where geom && 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"),'NDR'),'hex')
as geom,"oid" from airports where geom &&
GeomFromText('POLYGON((-180.180360721443 -90,-180.180360721443
90,180.180360721443 90,180.180360721443 -90,-180.180360721443
-90))',find_srid('','airports','geom'))

 

postgresMap.map file:

 

MAP
NAME airports EXTENT -180 -90 180 90

    SIZE 1000 500

    #SHAPEPATH "./data"

    

    SYMBOL

        NAME "circle-filled"

        TYPE ELLIPSE

        FILLED TRUE

        POINTS 1 1 END

    END

    LAYER

        CONNECTIONTYPE POSTGIS

        NAME airports

        CONNECTION "host=localhost
dbname=Airports user=xxxx password=xxxx port=5432"

        PROCESSING
"CLOSE_CONNECTION=DEFER"

        DATA "geom From airports" 

        #DATA "geom From (select icao,
geom From airports) as subquery using unique icao using srid=4326" 

        STATUS ON

        TYPE POINT

        CLASS

            NAME "airportsClass"

            SYMBOL 'circle-filled'

                SIZE 2

                COLOR 255 22 22

            END

        END # Class

    END # Layer

END #
Map File

 



Michael McInnis
6033 44th Ave. N.E.
Seattle, WA 98115
206 517-4701 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130726/50783df1/attachment.htm>


More information about the MapServer-users mailing list