Hi everybody!

I have been trying, for days now, to import a set of osm data into nominatim. These data have been manually generated using the JOSM tool. The import seems to work smoothly, but, at the end I get the following output:

Stopping table: planet_osm_rels
Building index on table: planet_osm_rels
Stopping table: planet_osm_ways
Stopped table: planet_osm_ways in 0s
Stopping table: planet_osm_nodes
Stopped table: planet_osm_nodes in 0s
Stopped table: planet_osm_rels in 0s
node cache: stored: 7(100.00%), storage efficiency: 0.68% (dense blocks: 1, sparse nodes: 0), hit rate: -nan%

Osm2pgsql took 0s overall
ERROR: No Data
No Data

And, in the end, nothing is imported even though it seems.

A small sample of the data I am trying to import:

<node id='-9149' visible='true' lat='51.8386' lon='4.9578'>
   <tag k='electrical_capacity' v='12h' />
   <tag k='general_state' v='normal' />
   <tag k='name' v='Beatrixziekenhuis' />
   <tag k='number_of_men' v='1500' />
   <tag k='resource_availability' v='HIGH' />
   <tag k='state' v='1' />
   <tag k='telecom_availability' v='TRUE' />
   <tag k='type' v='hospital' />
</node>
<node id='-9202'  visible='true' lat='51.8456942144' lon='4.95328903198' />
<node id='-9203'  visible='true' lat='51.83503500628' lon='4.94672298431' />
<node id='-9204'  visible='true' lat='51.83020836571' lon='4.96204376221' />
<node id='-9205'  visible='true' lat='51.83697082115' lon='4.97406005859' />
<node id='-9206'  visible='true' lat='51.84625096935' lon='4.97860908508' />
<node id='-9207'  visible='true' lat='51.8456942144' lon='4.95328903198' />

<way id='-9208' visible='true'>
  <nd ref='-9202' />
  <nd ref='-9203' />
  <nd ref='-9204' />
  <nd ref='-9205' />
  <nd ref='-9206' />
  <nd ref='-9207' />
  <tag k='electricity_availability' v='TRUE' />
  <tag k='flood_vulnerability' v='350' />
  <tag k='general_state' v='normal' />
  <tag k='name' v='Gorinchem' />
  <tag k='number_of_men' v='1000' />
  <tag k='state' v='1' />
  <tag k='telecom_availability' v='TRUE' />
  <tag k='type' v='residentialarea' />
  <tag k='water_availability' v='TRUE' />
</way>

Any suggestions ? Anyone ever encountered this same issue ?

asked 26 May '16, 10:12

GabBurnout's gravatar image

GabBurnout
21223
accept rate: 0%

edited 27 May '16, 22:58

aseerel4c26's gravatar image

aseerel4c26 ♦
32.0k16238549

Forgot to mention, I am trying to import the data using Nominatim.

Thanks again

(26 May '16, 10:17) GabBurnout

I'd compare what's in your data with what's in some data that you can import successfully. I'd specifically look at what enclosing XML tags are in there.

(26 May '16, 10:19) SomeoneElse ♦

Thank for your answer,

Have tried to remove all the tags, leaving only the name, but the problem persists.

(26 May '16, 10:30) GabBurnout

Did the data that you were able to import from some other source have "only the name" in it? If not, try a (small) Nominatim import of some other data, and look at the tags in that.

(26 May '16, 10:40) SomeoneElse ♦
1

I used a group of tags directly from the Faroe-islands downloaded from Geofabrik.

Now something is imported. Finally!

It seems to be a tags-related problem.

Where is a list of supported tags for an osm data that Nominatim does not complain about ? And that can be used for searching operations ?

Thanks again

(26 May '16, 11:20) GabBurnout

Nominatim doesn't index everything with a name (or ref) tag. It looks for places, streets and similar tag combinations. For some tags it uses a positive list of desired values, for others a negative list. That happens in the file output_gazetteer.cpp.

https://github.com/openstreetmap/osm2pgsql/blob/d0af11f267a202c7c1961c2061d121c726d8db3a/output-gazetteer.cpp

You can either change the logic in the process_tags method to treat all electrical lines like places. Or add a tag place=locality to all your data before importing. http://wiki.openstreetmap.org/wiki/Key:place

permanent link

answered 26 May '16, 11:10

mtmail's gravatar image

mtmail
2.6k644
accept rate: 26%

1

thanks for you reply. I played a bit around with tags, and finally managed to get something, the import was successful, and also some research operation works.

Still, it's not how I want yet. I want to have a node representing an hospital, in a specific city (e.g. Gorinchem) in a specific country.

This is the node, in the osm file, that I am using:

<node id='-9149' visible='true' lat='51.8386' lon='4.9578'>
<tag k="is_in" v="Gorinchem, The Netherlands"/>
<tag k="amenity" v="hospital"/>
<tag k="building" v="yes"/>
    <tag k='name' v='Beatrixziekenhuis' />
<tag k='addr:city' v='Gorinchem' />
<tag k='addr:country' v='NL' />
<tag k="addr:street" v="Banneweg"/>
<tag k="addr:postcode" v="4204AA"/>
<tag k="addr:housenumber" v="57"/>
 </node>

I also added information relative to the specific address.

Basically, I want to be able to perform a research operation that could return me the hospital present in that city, or in that country.

As far as I know the query should be:

  q=The+Netherlands[hospitals]

What am I missing in that node ?

Thanks

(27 May '16, 15:22) GabBurnout

Did you import the city and country as well? The is_in key is a hint but the place still needs to exist in the Nominatim database to create a hierarchy.

The query format looks good

http://nominatim.openstreetmap.org/search.php?q=the+nederlands+%5Bhospitals%5D

Here's a list of all 'special phrases' that can be added to those square brackets. http://wiki.openstreetmap.org/wiki/Nominatim/Special_Phrases after you ran the http://wiki.openstreetmap.org/wiki/Nominatim/Installation#Add_special_phrases step of the installation.

(31 May '16, 02:21) mtmail
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:

×549
×232
×167

question asked: 26 May '16, 10:12

question was seen: 1,957 times

last updated: 31 May '16, 02:21

powered by OSQA