[mapserver-users] PHP mapscript $shape->buffer() takes a longtime
wal3 at mindspring.com
Wed Nov 18 09:27:02 EST 2009
I'm learning a lot here.
I now understand how to get the buffered geometry quickly.
I am using the buffered geometry to use PHP mapscript to select parcel
intersecting the buffered geometry.
Are you telling me that there is a better/faster way to do this?
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ludwig
Sent: Wednesday, November 18, 2009 3:01 AM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] PHP mapscript $shape->buffer() takes a
We had the same problem. In deed the buffer-algorithm is very expensive,
especially with large polygons and a large buffer-radius. If you use
Postgis, you can simplify the Polygon with ST_Simplify or
ST_SimplifyPreserveTopology in dependency from scale and buffer-radius, this
will make the buffer-process much faster without significant loss of
quality. You can do this on runtime on your original data with dynamic
PostGIS-queries. If you don't use PostGis, you have to create simplified
er_radius, $number_of_segments),$srid)::geometry ...FROM...
And don't use the buffered polygon for geo-queries, there are faster ways in
PostGIS and Mapserver.
>I'm trying to buffer a shape returned from a point query on a polygon layer
>When I try to use:
>$bufferedShape = $shape->buffer(200);
>I get back a fatal error: Maximum execution time of 30 seconds exceeded.
>I know that this is a php error message and that I could increase the
>allowable execution time.
>If I use a buffer distance of 175 I get results.
>Should it take such a long time to but a buffer around this parcel? It is
>large parcel with one corner being a long curve like a quarter of a circle
>and another section on one side being a half circle.
mapserver-users mailing list
mapserver-users at lists.osgeo.org
More information about the mapserver-users