[Tile-serving] [osm2pgsql-dev/osm2pgsql] New feature: Check location of OSM objects against list of regions (PR #2333)

Jochen Topf notifications at github.com
Fri May 30 17:51:44 UTC 2025


joto left a comment (osm2pgsql-dev/osm2pgsql#2333)

> Does the current implementation implement any type of sort, or is the returned set's order completely arbitrary?

It is completely arbitrary. It would be much more expensive to do this in any sorted way.

For the use case you describe you'd do it differently anyways: You'll only use the smallest divisions and use that data for the rest of the information. You don't have to check a point against all states of the USA and against the USA boundary, you check it against all states and if it is in a state it must also be in the USA. If there is any area left that is in the USA but in no state, you'll have to also check against that. It needs a bit of pre-processing but that saves you a lot of checks later.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2333#issuecomment-2923031315
You are receiving this because you are subscribed to this thread.

Message ID: <osm2pgsql-dev/osm2pgsql/pull/2333/c2923031315 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20250530/ddd4ebed/attachment-0001.htm>


More information about the Tile-serving mailing list