[postgis-users] optimazing intersection

Markus Schaber schabi at logix-tt.com
Sun Oct 8 08:33:18 PDT 2006


Hi, Toni,

First, please don't reply to an existing message when creating a new
topic. Your mail program still generates the In-Reply-To: header, and
the mail programs of the readers will sort it just into the middle of
the original message (so-called "threaded view"). This will both annoy
the list members (which you expect to help you, right), and increase the
likelyhood that your message gets lost or ignored because those people
that can help you don't read the original discussion because they're not
interested in that topic.

toni hernández wrote:

> I have to intersect lots of Multilinestrings so the process is very time
> consuming.
> I thought that maybe with a tranlation (translate(geom, -400000,-600000)
> of the geometries (to get smaller numbers) it would increase speed but
> the truth is that the difference is not relevant.

I'd expect that, as translating the geometry does not changei its
complexity (number of vertices etc.)

> Do you have any other suggestions to increase the intersection efficiency?

You did not tell us what exactly you want to do.

Do you have to intersect them pair-wise, or all together (to get the
common piece for all of them)?

In the latter case, you could sort them by number of vertices, and begin
with the smallest ones.

In the former case, maybe a bbox-overlap check could sort out those
pairs that don't even come close.

If you need more specific help, please give us more details.

HTH,
Markus




More information about the postgis-users mailing list