3
1

Here's the background on why I'm asking.

http://forum.openstreetmap.org/viewtopic.php?id=11945

I assume I went to the right place with the detailed problem description and the laundry list of questions. Please feel free to give a short answer here and a more detailed one in the forums (which can otherwise be frustratingly slow to yield answers).

asked 13 Apr '11, 01:45

ponzu's gravatar image

ponzu
2.0k496382
accept rate: 0%

edited 13 Apr '11, 03:16

How about reading the source?

(13 Apr '11, 07:31) petschge

Just like that, huh?

(13 Apr '11, 07:40) ponzu

The code behind details.php retrieves all objects from a table where parent id is equal to the current id. This does not explain to me who and how assigns parent id to each record, or why it works for parent polygons and does not work for parent nodes. I assume it's not a native OSM relation and is something that a Nominatim data loader, if there is such an animal, must be figuring out as it goes. If I need to look elsewhere, let me know.

(13 Apr '11, 07:53) ponzu

Bump. Is there no documentation, wiki, mailing threads, forum section, etc. on Nominatim data schema? I know the code is fairly well documented, but is that really the only way to learn it? If so, please point me to the source that loads the OSM data into Nominatim and build parent/child relations. I could not find it on the first pass.

(14 Apr '11, 20:55) ponzu

The US county borders and county nodes were created directly from whatever source was available at the time - county node placement is also whatever was used at the time. As you have discovered, Nominatim makes use of these because that's all that is available, but the result are not correct.

The correct solution is to convert the county boundary to a relation:

  • type=boundary
  • border_type=county
  • admin_level=6
  • optionally, copy nist:fips_code , nist:state_fips from county boundaries.

  • Add county border ways, with role= outer.

  • If the governmental center location is known, add a node with role = admin_centre
  • Remove the county node.

While you're in there working, you can also combine overlapping county ways into a single way and merge any duplicate nodes. If you are working on a state or US border and know where the true boundary lies, you can combine them also.

For example: http://www.openstreetmap.org/browse/relation/1357318

permanent link

answered 13 Apr '11, 13:13

Mike%20N's gravatar image

Mike N
2.7k21652
accept rate: 17%

Thanks, this is good advice for resolving the specific issue I bumped into. I know I included the link to the forum discussion, and your reply there is very much appreciated. But here I am asking about the Nominatim basics. I want to know how node's children are determined. Or, rather, as my question states, where I can learn how node's children are determined and other stuff. There's got to be more documentation on Nominatim, and if not, discussion, than what made it into the wiki.

(13 Apr '11, 19:15) ponzu

Hi Mike, I also would like to understand how the internals of Nominatim are working. Preferably without browsing through the code. Did you succeed with your quest for a detailed Nominatim documentation? I have only found this high level overview page. But there are no details. e.g., how is the data base schema organized...

I'll appreciate any direction you can point me at!

(12 Apr '13, 18:23) konstantin

I know from Nominatim experimentation:

  1. admin_level in an administrative border relation is how it determines the parents and children. Lowest number is parent.

  2. It doesn't matter what border_type is set to on a relation wrt Nominatim. It has assumed named Ranks, like 'County' for admin_level 6 in the US. If I create a new relation with border_type set to 'parish', result returned STILL is: County Boundary Test Parish.

I might suggest we use border_type as 'whatever the administrative boundary's type "name" is'. E.g., Louisiana has parishes, not counties, so border_type=parish ?

(30 May '14, 22:32) Skybunny
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:

×568

question asked: 13 Apr '11, 01:45

question was seen: 7,162 times

last updated: 30 May '14, 22:32

powered by OSQA