[postgis-users] Optimizations: splitting large features
Bruce Rindahl
rindahl at lrcwe.com
Fri Apr 27 07:51:32 PDT 2007
Jeff
I am not sure if this is what you are asking but...
When I display data in a Web display using SVG the request to a PHP script
includes the bounding box information. Then the query first checks the
bounding box using the && operator and then uses the intersection operator
to just sent the data clipped by the bounding box. Performance is excellent
but the suggestions you give below are good ones to speed it up depending on
the application. A great tutorial on the scripts used in this application
is at:
http://www.carto.net/papers/svg/postgis_geturl_xmlhttprequest/
Bruce Rindahl
-----Original Message-----
From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Jeff
Dege
Sent: Friday, April 27, 2007 8:44 AM
To: PostGIS Users Discussion
Subject: [postgis-users] Optimizations: splitting large features
There were two ideas I'd had with respect to manipulating geometries so
as to make the draw faster on a map. The first was simplifying them -
reducing the number of points. If your map resulution is 1km per pixel,
there's no point in sending to the drawing engine points that are 10m
apart. I'm told that PostGIS has functions to support this.
The other is to split features apart. Instead, for example, of having
one feature representing a river that snakes around over a large area,
and hence has to be included in nearly every spatial query, break it
apart into multiple features each of which represents a short segment of
the river.
I asked, as an aside in an earlier post, if PostGIS provided functions
to support this, but no one addressed the question. (Though I did get
detailed responses for the main question, for which you have my thanks.)
But it is a question that I'd like an answer to, so I'm asking it by
itself. Does PostGIS provide functions for splitting apart geometries?
I see functions in the manual for doing intersections and differences
between geometries, but I don't see anything that would handle the
problem directly. I could see how we could define a set of clipping
gemoetries to tile the plane, and then use the intersection function to
clip our starting features, but I'm not sure this would be the best
approach.
Is this a common optimization? Is there a usual approach? Does anyone
have code for doing this?
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list