I have spent about , 26 minutes, looking for a resource that would allow me to query ,key value pairs , on the Nominatim page to check what type of coverage the city has? (I.E if it is a polygon?)


EXAMPLE

Bellevue, Washington https://nominatim.openstreetmap.org/details.php?place_id=172952334

Type    boundary:administrative
Last Updated    2017-06-20 21:45
Admin Level 8
Rank    City
Importance  0.470508128507761
Coverage    Polygon

Where would I even go for this information? "The information that I am looking for is the key, value pair of "Coverage"

What I have searched for:

I looked on this page and was not able to find it because "Coverage" is not a tag. Databases and data access APIs

I know it says this "Quite a few people break this file down into smaller files for different regions and make extracts available separately on mirror servers. Various tools are available to cut the Planet file up into smaller areas if required."

One solution that I that I have found is to setup Nominatim db on a server which I do not want to do if I necessarily do not have too.

Other Solutions

Maybe I can query this with osmosis? But from what I read that , it does is allow you manipulate shape files. If what I seek is not in a shape, how would I be able to know beforehand? Would it not be useful to know what actual shapes are in the file before you manipulate it? Maybe this exists?

That is why I would like to look them up in a nominatum query by coverage. I simply would like to check if a list of city names exist as a polygon against the nominatum api. ( I.e Python: for i is in Mylist: return True) http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.43#Default_Arguments

Maybe I suck at searching, I apologize in advance.

asked 10 Aug, 15:04

Chris_L's gravatar image

Chris_L
21114
accept rate: 0%

edited 10 Aug, 15:06


The database query Nominatim runs is (simplified) SELECT name->'name' from placex where admin_level=8 and ST_GeometryType(geometry) in ('ST_Polygon','ST_MultiPolygon') AS isarea where ...;

Without setting up a Nominatim database you won't be able to run such a query against a whole country.

The next best would be to run queries against the Nominatim API http://nominatim.openstreetmap.org/search.php?city=bellevue&country=united+states&format=jsonv2&polygon_geojson=1 and check the type of the geometry value ('Point', 'Polygon', 'MultiPolygon').

permanent link

answered 10 Aug, 15:40

mtmail's gravatar image

mtmail
1.4k427
accept rate: 26%

@mtmail Thank you for your reply. When you say "check the type of the geometry value of each api call ('Point', 'Polygon', 'MultiPolygon')", would that not be computationally expensive and would I not be breaking the terms of service for nominatim? I would then have to parse each query to see if it contains a certain geometry.I think setting up the database, may be the way to go. Does Nominatim have a fuzzy search for the names? I saw this https://github.com/komoot/photon

(12 Aug, 03:56) Chris_L
Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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:

×453
×201
×167
×88
×36

question asked: 10 Aug, 15:04

question was seen: 315 times

last updated: 12 Aug, 03:59

powered by OSQA