rustprooflabs / pgosm-flex

PgOSM Flex provides high quality OpenStreetMap datasets in PostGIS (Postgres) using the osm2pgsql Flex output.
MIT License
101 stars 20 forks source link

Strange tag value "width": "highway=traffic_signals" appearing #326

Closed jacopofar closed 1 year ago

jacopofar commented 1 year ago

What version of PgOSM Flex are you using?

The current stable, fresh from Docker Hub

Docker image

latest

What operating system, osm2pgsql, and PostgreSQL/PostGIS versions are you using?

PostGIS 15, but I think it's a parsing problem

What did you do exactly?

I used the command rustprooflabs/pgosm-flex python3 docker/pgosm_flex.py --ram 4 --debug --input-file /app/data.pbf --layerset everything

What did you do to try analyzing the problem?

I looked at the element in OSM.

Hello! Not a big issue, more like a curiosity.

I ingested the latest PBF extract for Berlin, Germany, and found that the tags for way 515109948 in the tags table are:

{
  "name": "Ilsensteinweg",
  "width": "highway=traffic_signals",
  "highway": "footway",
  "segregated": "no", "postal_code": "14129",
  "name:etymology:wikidata": "Q1659244",
  "name:etymology:wikipedia": "de:Ilsestein"
}

the value for width is clearly wrong, but the element on OSM looks fine and it was not modified recently. I cannot figure out where this value is from. The way is correctly placed in the road_line table and marked as a footway. It's the only such case for width in the whole file, it's not a problem for my analysis but I was curious about the origin of this value.

rustprooflabs commented 1 year ago

@jacopofar - that is puzzling! Though I wasn't able to reproduce with a fresh Berlin extract. I wonder if there's an issue in your PBF file? Is the file you're defining in --input-file a direct download from Geofabrik or have you done other processing to get to that file? I can't explain how you have that strange width tag, though it also seems your data is missing the lit tag too.

I ran this command:

docker exec -it \
    pgosm python3 docker/pgosm_flex.py \
    --ram=8 \
    --region=europe/germany \
    --subregion=berlin \
    --layerset=everything

When I query osm.tags I get the following.

SELECT jsonb_pretty(tags)
    FROM osm.tags
    WHERE osm_id = 515109948
;
{
    "lit": "yes",
    "name": "Ilsensteinweg",
    "highway": "footway",
    "segregated": "no",
    "postal_code": "14129",
    "name:etymology:wikidata": "Q1659244",
    "name:etymology:wikipedia": "de:Ilsestein"
}
jacopofar commented 1 year ago

Yes, I just noticed that the file I loaded was not the recent one but an older version -_-

Sorry, hope you didn't spend too much time on this :)