geos Bufferring mapserver 4.10

Kralidis,Tom [Burlington] Tom.Kralidis at EC.GC.CA
Tue Nov 14 09:25:16 EST 2006


> 
> i am a begainner in the mapserver World... i have completed 
> only one simple project just for viewing map, have no analysis.
> 
> now i contiue a project using php mapsript but now fall in 
> great problem.
> i have shape file(.shp) containnig roads network. i have to 
> create a buffer area of this raods network arround 10 km. 
> using this buffer area i have to clip/select agricultural 
> land from another shape shape file.
> 
> i can create buffer using
> $shp=roadlayer->getshape(-1,0);
> $shp->buffer(10);
> but it create buffer for only one road not the whole network... 
>

buffer works at the shapeObj level, so you have to apply the buffer to
each shape, i.e.:

for(my $i=0; $i<$shapefile->{numshapes}; $i++) {
  # apply buffer
  # ...
}
 
> plz give me the idea which process i have to follow to 
> complete  my project..
> 
> 
> my configuration:
> mapserver 4.10(windows)
> php mapscript
> windows 2k



More information about the mapserver-users mailing list