dealing with mixed geometry datasets

Frank Warmerdam fwarmerdam at GMAIL.COM
Mon May 9 09:57:12 EDT 2005


On 5/9/05, Bart van den Eijnden <BEN at syncera-itsolutions.nl> wrote:
> Hi list,
> 
> does anybody have some best practices for dealing with mixed geometry datasets within Mapserver?

Bart, 

The best practice is to pre-split them into separate files!

> For instance Mapinfo files which contain both points and polygons.
> 
> Is it possible to do an OGR query based on geometry type and use 2 layers in the MAP file?

There is no mechanism currently for querying based on geometry
type in MapServer or OGR.   I briefly looked into adding some sort
of capability to do this in OGR but it seems pretty involved.  It could
be hacked into the OGR connector for MapServer pretty easiliy
though.  Something along the lines of a PROCESSING directive
that only works for connection type OGR.  

You might want to file an enhancement request to this effect.
Keep in mind that it wouldn't be terrible efficient since it would 
need to scan the source layer once for each map layer, just
discarding features with the wrong geometry type once they have
been read. 

Best regards, 
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list