postgis using COLLECT() in layer data...

Schuyler Erle schuyler at NOCAT.NET
Thu Jun 16 17:09:52 EDT 2005


There used to be a bug in MapServer 4.4 (there might still be?) where
the msPOSTGIS code wasn't doing case-insensitive pattern matching on
the SQL query. Change your query to read 'the_geom FROM (...)' (and
maybe change the case in the subquery also) and it *should* work.

I patched this bug in my local MapServer install but never got round
to submitting the patch. If the problem still exists, please let me
know and I will update my patch against the latest CVS and actually
submit it this time.

SDE

* On 15-Jun-2005 at  8:44AM PDT, John Cole said:
> Hello,
>   I'm trying to un-clutter street labels by using a COLLECT() and grouping
> on the street name, but I'm running into a problem getting MapServer 4.4 to
> work with the data line.
> 
> Here is my layer
> 
> 	LAYER
> 		NAME Highways_anno
> 		STATUS default
> 		GROUP roads
> 		CONNECTIONTYPE postgis
> 		CONNECTION "user=mapserver password=mapserver
> dbname=florence host=localhost" 
> 		DATA "the_geom from (select collect(the_geom) as the_geom,
> rd_name from tgr_roads group by rd_name) AS new_table USING UNIQUE rd_name
> USING SRID=-1"
> 		TYPE annotation
> 		LABELITEM "rd_name"
> 		MAXSCALE 12000
> 	
> 		CLASS
> 			LABEL
> 				COLOR 0 0 0
> 				TYPE TRUETYPE
> 				ANGLE AUTO
> 				FONT arial
> 				SIZE 8
> 				ANTIALIAS TRUE
> 				POSITION CC
> 				MINDISTANCE 10
> 				BUFFER 5
> 			END
> 		END
> 	END
> 
> The query returns, but no labels are drawn.  Using a DATA "the_geom from
> tgr_roads" does draw labels.
> 
> What am I doing wrong? :-)
> 
> Thanks,
> 
> John Cole
> 
> -------------------------------------
> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.



More information about the mapserver-users mailing list