Skip to content
This repository was archived by the owner on Nov 8, 2018. It is now read-only.
This repository was archived by the owner on Nov 8, 2018. It is now read-only.

I saw something: PBF contains geometry outside bbox #290

@missinglink

Description

@missinglink

heya, I keep finding elements outside the specified bbox in my ODES extracts.

as an example, I have an extract of the Wellington Region in New Zealand:
https://mapzen.com/data/metro-extracts/your-extracts/ddb7513ffe47

wellington

# download
wget https://s3.amazonaws.com/mapzen.odes/ex_cHKZYHrMJgXRy66PhSYeV4GmkifLC.osm.pbf -O wellington.pbf

# convert to plain text
osmconvert --out-osm wellington.pbf > wellington.osm

German entries:

$ grep "ß" -B10 wellington.osm | wc -l
8172
	<relation id="89120" version="9" timestamp="2015-02-07T16:45:27Z" changeset="28684786" uid="581934" user="powerpeanut">
...
		<tag k="network" v="Kreisstraßen Harburg"/>

Other entries:

I thought it might be because I live in Germany, but there also appears to be part of the China boundary in there for some reason!?

$ grep "\"270056\"" wellington.osm 
	<relation id="270056" version="514" timestamp="2016-06-19T11:12:57Z" changeset="40133511" uid="571410" user="Павел Гетманцев">

applying a bbox in osmconvert actually reduces the file size by ~15%

osmconvert -b="174.579,-41.454,175.063,-41.058" wellington.pbf --out-pbf > bbox.pbf

$ ls -lah *.pbf
-rw-rw-r-- 1 peter peter 5.7M Dez  6 11:11 bbox.pbf
-rw-rw-r-- 1 peter peter 6.7M Aug 12 22:06 wellington.pbf

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions