[Tile-serving] [openstreetmap/osm2pgsql] Missing relation on import (#1545)

samcrawford notifications at github.com
Fri Jul 30 12:51:38 UTC 2021


## Summary

The OSM relation 48399 is missing from planet_osm_line after import.

## What version of osm2pgsql are you using?

```
[root at osm build]# ./osm2pgsql --version
2021-07-30 12:41:45  osm2pgsql version 1.5.1
Build: RelWithDebInfo
Compiled using the following library versions:
Libosmium 2.17.0
Proj [API 4] Rel. 4.8.0, 6 March 2012
Lua 5.1.4 (LuaJIT 2.1.0-beta3)
```

## What operating system and PostgreSQL/PostGIS version are you using?

CentOS 7, Postgres 12.2, PostGIS 3.0

## Tell us something about your system

8GB RAM, 2 core, Linode virtual machine

## What did you do exactly?

1. Build osm2pgsql 1.5.1
2. Imported https://download.geofabrik.de/north-america/us/new-hampshire-latest.osm.pbf using:
```
./osm2pgsql -K -S /opt/routing/postgres/osm2pgsql.style -C 200 --slim --number-processes 2 --create --database staging new-hampshire-latest.osm.pbf
```
3. Open psql and ran:
```
select count(*) from planet_osm_line where osm_id=-48399;
```

## What did you expect to happen?

I expected to get a count of 1 (or more) rows. This would correspond with the relation here: https://www.openstreetmap.org/relation/48399

## What did happen instead?

I got a count of zero rows, which shows that the relation was not imported.

## What did you do to try analyzing the problem?

I see that planet_osm_rels *does* contain the information about the relation:
```
staging=# select * from planet_osm_rels where id=48399;
  id   | way_off | rel_off |                                                                                                                                            parts                              
                                                                                                               |                                                                                           
                                                                                                              members                                                                                      
                                                                                                                    |                                                         tags                         
                                 
-------+---------+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------
---------------------------------
 48399 |       0 |      31 | {28083915,28083918,28083938,28083946,28083917,28083919,252227109,28083920,28083922,28083923,28083924,28083968,28083970,76816415,76816417,28083975,28084012,28083972,28083977,2
52227148,595588446,28083980,28083981,28083982,28083985,28083999,28084019,73805429,252227147,76816414,76816416} | {w28083915,"",w28083918,"",w28083938,"",w28083946,"",w28083917,"",w28083919,"",w252227109,
"",w28083920,"",w28083922,"",w28083923,"",w28083924,"",w28083968,"",w28083970,"",w76816415,"",w76816417,"",w28083975,"",w28084012,"",w28083972,"",w28083977,"",w252227148,"",w595588446,"",w28083980,"",w28
083981,"",w28083982,"",w28083985,"",w28083999,"",w28084019,"",w73805429,"",w252227147,"",w76816414,"",w76816416,""} | {access,permissive,name,"College Woods Trail Network",operator,"University of New Ham
pshire",route,foot,type,network}
(1 row)
```

I also checked my style file to see if I was somehow excluding this relation. I don't think I am. My style file is pasted at https://gist.github.com/samcrawford/e7d79fbf788fab582c07901aa0dbcb4f

I also tried using the default style, which made no difference.

I also tried version 1.0 and 1.4.2 before using 1.5.1. They all had the same issue.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1545
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210730/682aee1e/attachment.htm>


More information about the Tile-serving mailing list