Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^6: searching polygons not merged

by LanX (Cardinal)
on Oct 29, 2018 at 09:45 UTC ( #1224825=note: print w/replies, xml ) Need Help??

in reply to Re^5: searching polygons not merged
in thread searching polygons not merged

> It would be interesting to have an example dataset to compare the performance of any forthcoming pure-perl solution with what postgres indexing can do. Or graphic libraries (like you mentioned earlier).

I'm trying not to cross that road. ;)

If you want you can compare it against a trivial bounding-box approach of spatial indexing.

You add 4 indexed columns for each polygon and use the formula from my first post to eliminate candidates°.

A simplistic pure Perl solution would probably imply sorted arrays, slices and hash intersections for the AND clause.

(Doesn't scale well but can handle 10000 polygons easily)

You already created your test sample, I doubt the OP ever will.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

°) Nota bene: this doesn't calculate overlaps, it's just a poor man's spatial index to eliminate impossible combinations.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1224825]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2020-08-12 03:21 GMT
Find Nodes?
    Voting Booth?
    Which rocket would you take to Mars?

    Results (64 votes). Check out past polls.