[mapserver-users] simplify problem

Puneet Kishor punk.kish at gmail.com
Thu Dec 29 06:01:39 PST 2011



On Dec 29, 2011, at 7:49 AM, ahlah <ahti.lahtela at pp.inet.fi> wrote:

> Hi,
> 
> I'm trying to use ST_Simplify function of Postgis in Mapserver
> 
> This data source works fine in my mapfile of Mapserver:
> DATA 'geom_3067 from lines using srid=3067 using unique id'
> 
> ST_Simplify query works fine inside Postgis:
> select ST_Simplify(geom_3067,100) from lines; 
> 
> But when I'm trying to use simplify function like this in mapfile, mapserver
> throws error:
> DATA 'ST_Simplify(geom_3067,100) from lines using srid=3067 using unique id'


Try using a column alias like so 


DATA 'ST_Simplify(geom_3067, 100) geom FROM lines USING srid=3067 USING UNIQUE id'




> 
> msDrawMap(): Image handling error. Failed to draw layer named 'grid'.
> msPostGISLayerWhichShapes(): Query error. Error (ERROR:  column
> "ST_Simplify(geom_3067,100)" does not exist
> LINE 1: ...status",encode(AsBinary(force_collection(force_2d("ST_Simpli...
>                                                             ^
> This is the query sent by mapserver:
> select
> "status",encode(AsBinary(force_collection(force_2d("ST_Simplify(geom_3067,100)")),'NDR'),'hex')
> as geom,"id" from lines where ST_Simplify(geom_3067,100) &&
> GeomFromText('POLYGON((365203 7272028.2777498,365203 7661628.2777498,724803
> 7661628.2777498,724803 7272028.2777498,365203 7272028.2777498))',3067)
> 
> It seems that mapserver handles "ST_Simplify(geom_3067,100)" like a database
> column. Is there something wrong in my syntax?
> 
> Thanks in advance
> 
> AL
> 
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/simplify-problem-tp7135648p7135648.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> 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