Open-Historical-Map-Labs / openhistoricaltiles

First iteration of vector tiles from OHM Planet data
BSD 2-Clause "Simplified" License
3 stars 0 forks source link

New building not imported into osm_poi_polygon #15

Closed gregallensworth closed 6 years ago

gregallensworth commented 6 years ago

A new building was submitted last night. Its geometry came across, but not a lot else.

The submitted feature's XML was:

<?xml version='1.0' encoding='UTF-8'?>
<osmChange version="0.6" generator="Osmosis 0.46">
  <create>
    <node id="2083847608" version="1" timestamp="2018-08-08T04:20:14Z" uid="583" user="danrademacher" changeset="3825" lat="40.3975147" lon="-104.7099774"/>
    <node id="2083847609" version="1" timestamp="2018-08-08T04:20:14Z" uid="583" user="danrademacher" changeset="3825" lat="40.397533" lon="-104.7098836"/>
    <node id="2083847610" version="1" timestamp="2018-08-08T04:20:14Z" uid="583" user="danrademacher" changeset="3825" lat="40.3974953" lon="-104.7098742"/>
    <node id="2083847611" version="1" timestamp="2018-08-08T04:20:14Z" uid="583" user="danrademacher" changeset="3825" lat="40.3975259" lon="-104.7097401"/>
    <node id="2083847612" version="1" timestamp="2018-08-08T04:20:14Z" uid="583" user="danrademacher" changeset="3825" lat="40.3974289" lon="-104.709681"/>
    <node id="2083847613" version="1" timestamp="2018-08-08T04:20:14Z" uid="583" user="danrademacher" changeset="3825" lat="40.3973921" lon="-104.7098755"/>
    <node id="2083847614" version="1" timestamp="2018-08-08T04:20:14Z" uid="583" user="danrademacher" changeset="3825" lat="40.397433" lon="-104.7098876"/>
    <node id="2083847615" version="1" timestamp="2018-08-08T04:20:14Z" uid="583" user="danrademacher" changeset="3825" lat="40.3974197" lon="-104.7099546"/>
    <way id="198201500" version="1" timestamp="2018-08-08T04:20:14Z" uid="583" user="danrademacher" changeset="3825">
      <nd ref="2083847608"/>
      <nd ref="2083847609"/>
      <nd ref="2083847610"/>
      <nd ref="2083847611"/>
      <nd ref="2083847612"/>
      <nd ref="2083847613"/>
      <nd ref="2083847614"/>
      <nd ref="2083847615"/>
      <nd ref="2083847608"/>
      <tag k="addr:city" v="Greeley"/>
      <tag k="addr:housenumber" v="1890"/>
      <tag k="addr:postcode" v="80931"/>
      <tag k="addr:street" v="24th Street"/>
      <tag k="building" v="house"/>
      <tag k="building:levels" v="2"/>
      <tag k="start_date" v="1983"/>
    </way>
  </create>
</osmChange>

This did create an entry in osm_building_polygon that looks about right:

That's all good. But...

I was expecting that the building would have a presence in osm_poi_polygon as well, where additional attributes and tags could be had, e.g. name and tags For example, OSM ID 198099771 has a presence in osm_poi_polygon with a name and a set of tags.

I see 4106 records in osm_building_polygon and 2129 records in osm_poi_polygon So about half of building polygons will not get this additional name/tag entry?

What factors determine this?

gregallensworth commented 6 years ago
select *, st_astext(st_transform(geometry,4326)) from osm_building_polygon where osm_id IN (198201500, 198099771);`
  id  |  osm_id   |  area   | webmerc_area | building | buildingpart | buildingheight | buildingmin_height | buildinglevels | buildingmin_level | height | min_height | levels | min_level | start_date | end_date |                                                                                                                                                              geometry                                                                                                                                                              |                                                                                                            st_astext                                                                                                            
------+-----------+---------+--------------+----------+--------------+----------------+--------------------+----------------+-------------------+--------+------------+--------+-----------+------------+----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 4107 | 198099771 | 838.064 |      381.051 | yes      |              |                |                    |                |                   |        |            |        |           |            |          | 0103000020110F0000010000000500000044A5E80E87F969C15AA3279A070B5741B7DD245782F969C1BBF410B2070B57419C60FA4F82F969C146C98D25020B57412928BE0787F969C1E9C4C10C020B574144A5E80E87F969C15AA3279A070B5741                                                                                                                                 | POLYGON((-122.334663668099 47.600249562024,-122.334324620115 47.6002518251379,-122.334322608458 47.6001173794109,-122.334661656442 47.6001150324781,-122.334663668099 47.600249562024))
 4108 | 198201500 | 432.897 |      251.074 | house    |              |                |                    | 2              |                   |        |            |        |           | 1983       |          | 0103000020110F00000100000009000000C240AFAB883B66C12809315379C852419F498C5D873B66C15F4E63FE79C852410727103C873B66C1A269B49D78C8524102705E5E853B66C177ABF7BB79C85241F26AD78B843B66C114A6883076C8524116A9B140873B66C1E74745D874C852413001CC6B873B66C1BCA2E35676C852410144775A883B66C160CD77DA75C85241C240AFAB883B66C12809315379C85241 | POLYGON((-104.7099774 40.3975147,-104.7098836 40.397533,-104.7098742 40.3974953,-104.7097401 40.3975259,-104.709681 40.3974289,-104.7098755 40.3973921,-104.7098876 40.397433,-104.7099546 40.3974197,-104.7099774 40.3975147))
(2 rows)
select * from osm_poi_polygon where osm_id IN (198201500, 198099771);
  id  |  osm_id   |       name        | name_en | name_de |                                tags                                | subclass | mapping_key | station | funicular | information | uic_ref | religion | start_date | end_date |                                                                                              geometry                                                                                              
------+-----------+-------------------+---------+---------+--------------------------------------------------------------------+----------+-------------+---------+-----------+-------------+---------+----------+------------+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 2135 | 198099771 | New England Hotel |         |         | "name"=>"New England Hotel", "tourism"=>"hotel", "building"=>"yes" | hotel    | tourism     |         |           |             |         |          |            |          | 0103000020110F0000010000000500000044A5E80E87F969C15AA3279A070B5741B7DD245782F969C1BBF410B2070B57419C60FA4F82F969C146C98D25020B57412928BE0787F969C1E9C4C10C020B574144A5E80E87F969C15AA3279A070B5741
(1 row)
mojodna commented 6 years ago

https://github.com/OpenHistoricalMap/openmaptiles/blob/d6c85a4e56565bbfe4e2c245f89450b4069d95e1/build/mapping.yaml#L249-L252 says that this feature should be added to osm_building_polygon. It doesn't match any of the mapping rules in https://github.com/OpenHistoricalMap/openmaptiles/blob/d6c85a4e56565bbfe4e2c245f89450b4069d95e1/build/mapping.yaml#L644-L656, so it's expected that this will be missing from osm_poi_polygon.