[postgis-users] postgis collect() issue

Zhiqiang Zhang zqzhang01 at yahoo.com
Tue Jul 11 11:53:12 PDT 2006


The current postgis implementation of collect()
doesn't seem to work with mapserver. I am using
postgis 1.1.3, but actually the same happens to all
other 1.0 versions as well. The following is a
scenario:

Test SQL query (the_geom field is a MULTILINESTRING,
default type used by shp2pgsql):

select collect(the_geom) as geom from roads where
the_geom && setSRID('BOX3D(-121.934769
37.355285,-121.894769 37.395285)'::BOX3D, -1) group by
name;

This query will return a GEOMETRYCOLLECTION of
MULTILINESTRING as follows:

GEOMETRYCOLLECTION(MULTILINESTRING((-121.909167
37.35634,-121.911667
37.354041)),MULTILINESTRING((-121.901967
37.36404,-121.902167 37.36374)),...)

Mapserver won't be able to draw GEOMETRYCOLLECTION of
MULTILINESTRING but only GEOMETRYCOLLECTION of
LINESTRING. Applying the force_collection to the
output geometry doesn't have any effect. I had a
really old postgis prior to 0.9 the same query will
properly return a GEOMETRYCOLLECTION of LINESTRING,
which mapserver can draw. 

What is the solution for this? Is Mapserver still a
good combination to use with postgis or not?

 



More information about the postgis-users mailing list