[OSM-talk] osmxapi/bbox question

80n 80n80n at gmail.com
Fri Apr 18 18:08:08 BST 2008


On Fri, Apr 18, 2008 at 4:56 PM, Frederik Ramm <frederik at remote.org> wrote:

> Hi,
>
>  That way you can call the osmxapi url with [polygon=belgium] or
> > > [polygon:country=belgium]
> > >
> > > What do the osmxapi developers think about it?
> > >
> > >
> > It's a nice idea.  I just need to implement the algorithm described
> > earlier
> > in this thread :)
> >
>
> Not only do you need to implement the algorithm, you also need a computing
> environment that will be able to execute the algorithm in an acceptable
> timeframe. A halfway "correct" border polygon of a landlocked state easily
> runs into five-digit numbers of polygon nodes, and then for each of the 250
> million nodes in the database, you have to find out whether it lies in that
> polygon.
>
> (An obvious optimization is to compute the largest rectangle contained in,
> and the largest rectangle containing, the polygon. First check if point is
> outside the outer bbox - if yes, you're done. Then check if point is inside
> the inner bbox - if yes, you're done. Only after that do the actual polygon
> test.)
>

Yes, the algorithm is simple, it's implementation is a little more
challenging.



>
> Bye
> Frederik
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20080418/0c652674/attachment.html>


More information about the talk mailing list