Repository navigation
Restricting search by KML/GeoJSON polygon #1102
Replies: 4 comments
|
I’m curious, what is the use usecase? Would the search region change between requests or is the goal to restrict a larger import to one region across many requests? |
|
I'm writing a site for a bicycle courier company that can book jobs in their logistics software via API, and I'm using photon and the leaflet plugin as the address selector. The setup is more to the latter of your question - there is a fixed service area but it follows streets and other geography so it is not a rectangle. The company has KML files tested against the logistics software so only addresses they serve are within the polygon. Thanks for entertaining the idea! |
|
I presume you are running your own instance of Photon and not the demo site. Because the latter is, what the name says: a demo site not for such production use. For your use-case use the JSON dumps and before importing either filter the data by the required area (gives you a super-small and super-fast instance in the end) or tag the affected objects with a category by which you can filter using the A polygon filter isn't likely to ever happen because OpenSearch is not particularly good at that kind of filtering and the parameter specification quickly becomes impossible to use. |
|
Thank you for this insight! I do have it hooked up to the demo site right now while I'm writing it, but have it on my list to set up an instance before it goes out.. Admittedly I didn't realize you could customize the JSONs for an instance so that solves my issue. Thanks y'all for the timely responses <3 |
Uh oh!
There was an error while loading. Please reload this page.
Would it be brutal to implement a way to restrict search results to within a polygon shape defined by a KML or GeoJSON style format? This could be in addition to the bbox method, but work in that realm I suppose. I would be interested in trying but my Java is very rusty 😅. Thanks in advance!
All reactions