function force_2d(geometry) does not exist

591 Views Asked by At

I'm using Centos 7. Have PostgreSQL & PostGIS installed, I want to display mapfile using MapServer to openlayer. I've also added the PostGIS extension to my database, but when I call the mapfile that already has a query, there's no error. Here is the contents of my mapfile

LAYER
METADATA
        "DESCRIPTION" "Border"
        "wms_title"   "Border"
        "wms_enable_request" "*"
        "ows_enable_request" "*"
    END
    
    PROJECTION
        'init=epsg:4326'
    END

    NAME "map_border"
    CONNECTIONTYPE postgis
    CONNECTION "user=# dbname=# host=# port=# password=#"
    #query
    DATA "geom FROM (SELECT st_geomfromtext(geom) as geom, gid FROM border) tmp using unique gid using srid=4326"
    TYPE POLYGON

    CLASS
        NAME "Border"
    END

    PROCESSING "CLOSE_CONNECTION=DEFER"

END

here it says that Postgresql reports the error as 'ERROR: function force_2d(geometry) does not exist, if I check the Postgre database function it should be st_force_2d instead of `` `force_2d```.

please help me with how to fix an error or change this function?

thank you

0

There are 0 best solutions below