edit: I meant overpass not nominatum

Hi there, I have a map where I show small locations. In order to do so I send a query to Overpass-api (for example 'amenity=supermarket') , then when it gets back I filter out all the big brand names (from a local hand typed array) and display the result on the map.

To save time and data usage on both sides it would be great to filter the results on the overpass side before returning the result. For example 'if name and type has more then 10 locations in country x then remove from result'.

My question: is this even possible?

p.s. I know of a 'corporate' or 'chain' tag for shops, but it doesn's seem to be spread much so that's not of use, yet.

asked 15 Apr, 15:48

tijmenheid's gravatar image

accept rate: 0%

edited 2 days ago

You are not saying what infrastructure you are using (your own instance of Nominatim or some public one) nor if you would be able to change that. But what you are trying to do seems to me to be better served by the Overpass API. With that you can search for keys (e. g. amenity=supermarket), look in specific areas, count results and add/subtract result sets.

permanent link

answered 15 Apr, 17:30

TZorn's gravatar image

accept rate: 14%

Oops you're right I meant OVerpass-api, just corrected it. Searches work fine, but do you know of a way to filter searches before returning them? (I mean like the example I posted, not the general ones)

(2 days ago) tijmenheid

I suggest you look at the language guide and the query examples linked to on the Overpass API page I quoted above. There you find examples of how to count and filter. If you still have issues post the query you are starting with here and someone can give you specific help (too advanced for myself).

(2 days ago) TZorn

Thanks for the suggestion TZorn, will take another look, maybe I'll find something to fix it with.

(yesterday) tijmenheid
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 15 Apr, 15:48

question was seen: 85 times

last updated: yesterday

powered by OSQA