Couple Questions: JOIN and OFFSET

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Mon Apr 24 22:55:06 EDT 2006


Paul Dugas wrote:
> Got a couple questions:
> 
> Is it possible to use the JOIN capability to combine shape features from
> a shapefile with classification data in a CSV file?  If so, could
> someone provide an example?

The best way to do this is via postgis. I also believe you might be able 
to do this in a limited way via GDAL features in Mapserver, but you can 
not do it using just mapserver.

> Is there a way to have a line feature drawn with an OFFSET so that it
> appears parallel to the original line?  I am working on code to convert
> polylines into parallel polygons to depict traffic data via color.  I'm
> wondering how hard it'd be to have something similar built into MS where
> we could define an OFFSET and a WIDTH to get the same effect without
> having to pre-generate the polygons for different scales.  I'll be happy
> to share my polyline-to-polygon code once it's working if that'd help.

I think you might be able to do this with the new GEOS buffer function 
that has been integrated with the most recent Mapserver release or it 
might only be in CVS. The buffer function takes a polyline and turns it 
into a sausage based on an offset distance. Search the archives for GEOS 
and buffer and you should find more info on it.

I think you will probably want to look at mapscript to glue all of this 
together.

-Steve W.

> Paul



More information about the mapserver-users mailing list