omniscale / imposm3

Imposm imports OpenStreetMap data into PostGIS
http://imposm.org/docs/imposm3/latest/
Apache License 2.0
719 stars 157 forks source link

Missing data #130

Closed andreynovikov closed 7 years ago

andreynovikov commented 7 years ago

I have the following mapping:

tables:
  buildings:
    type: polygon
    fields:
    - name: osm_id
      type: id
    - name: geometry
      type: geometry
    - name: building
      type: mapping_value
    - name: name
      key: name
      type: string
    mapping:
      building: [__any__]

If applied to the following building resulting table contains entry for relation with values only from relation keys but it does not contain the corresponding way. As you see the problem is that most of the data is applied to the way but it's lost.

andreynovikov commented 7 years ago

After some additional investigation I can not understand the import logic at all. For instance, having a mapping 'building:part': [__any__] only one way from this list is imported and it contains the osm_id of the relation, not the way.

ImreSamu commented 7 years ago

As you see the problem is that most of the data is applied to the way but it's lost. ... After some additional investigation I can not understand the import logic at all.

I am not 100% sure, but this is probably related to old style tagging.

'''

so As I understand, your example object has

see more

andreynovikov commented 7 years ago

No, my problem is that these are not multipolygon relations at all. These are grouping relations that describe roles of 3D building parts. But each part should be treated as separate polygon.

ImreSamu commented 7 years ago

These are grouping relations that describe roles of 3D building parts.

Thanks, you are right .. https://wiki.openstreetmap.org/wiki/Simple_3D_buildings

But each part should be treated as separate polygon.

Imho: probably you should use the relation and relation_member type with "3D buildings" and not the type: polygon, see the docs: https://imposm.org/docs/imposm3/latest/relations.html#other-relations

ImreSamu commented 7 years ago

As I see this is related : https://github.com/omniscale/imposm3/issues/129

kekscom commented 6 years ago

Hi @andreynovikov

I think I'm stuck with a similar problem. Location is no coincidence: https://www.openstreetmap.org/way/239494278

My idea was to import building and building:part into one table. I don't need any information from building relations. So this is my mapping:

tags:
  load_all: true
  exclude: ["addr:*"]
areas:
  area_tags: [buildings, landuse, leisure, natural, aeroway]
  linear_tags: [highway, barrier]
tables:
  buildings:
    type: polygon
    columns:
    - name: id
      type: id
    - name: geom
      type: geometry
    - name: area
      type: area
    - name: tags
      type: hstore_tags
    mapping:
      building: [__any__]
      building:part: [__any__]

Expectation is everything is imported according to mapping.

What happens is that the way mentioned above is missing.

Perhaps because it is part of 3 relations with different purpose. But then it should appear at least once.

@ImreSamu if importing relations/members is supposed to help, I lack understanding why. This would also duplicate most of correctly imported building:part items in buildings.

Any advise is appreciated.

ImreSamu commented 6 years ago

Any advise is appreciated.

@kekscom : imho: this is too old issue , and lot of changes since ...

Try the e-mail list for community support: http://groups.google.com/group/imposm

And please give - all basic information: