I need the buffered shape to draw it. Once I have it does it make any difference is how I do the query?
Is the enhancement described in Ticket #2753 implemented in 5.6 for PHP mapscript? Or will I need to take my shape to postGIS to simplify before buffer? -----Original Message----- From: Steve Lime [mailto:[email protected]] Sent: Wednesday, November 18, 2009 9:35 AM To: [email protected]; [email protected]; [email protected] Subject: RE: [mapserver-users] PHP mapscript $shape->buffer() takes alongtime You may not need to buffer at all. The shape query honors layer tolerances so you can find parcels within a certain distance. So if $layer->{tolerance} is 500 and $layer->{toleranceunits} is 'meters' then your shape query will find all features within 500 meters. If you don't need to draw the buffered shape then this might be a good option. Steve >>> "Worth Lutz" <[email protected]> 11/18/09 8:23 AM >>> 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. $layer->queryByShape($bufferedShape); Are you telling me that there is a better/faster way to do this? -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Ludwig Kniprath Sent: Wednesday, November 18, 2009 3:01 AM To: [email protected] Subject: Re: [mapserver-users] PHP mapscript $shape->buffer() takes a longtime 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 layers. Pseudo-PHP-PostGIS-SQL: SELECT ... ST_SetSRID(ST_BUFFER(ST_SIMPLIFY($geometery_field,$simplify_tolerance),$buff 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. Regards Ludwig Kniprath > >I'm trying to buffer a shape returned from a point query on a polygon layer >of parcels. > > > >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 a >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 [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
