Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on Bad Münster #2

Open
thadk opened this issue Sep 9, 2018 · 0 comments
Open

Stuck on Bad Münster #2

thadk opened this issue Sep 9, 2018 · 0 comments

Comments

@thadk
Copy link

thadk commented Sep 9, 2018

Hi Patrick,

I wrote a makefile to coordinate all the handoffs, shown at bottom. Thanks for this tool.

I got errors about the following item in the last three steps, prematurely halting each of the steps.

# reconstruct polygons
> ./osm indexlocations data/admin.o5m data/admin-3.db
ERROR Düren(4558)[level=]: cannot handle relation relation: child
converted 98/100
converted 198/200
converted 298/300
converted 398/400
converted 498/500
ERROR Kisko(37376)[level=8]: cannot close ring: 27709383
converted 597/600
...
converted 77920/78000
converted 78020/78100
error: unknown boundary value for Bad Münster am Stein-Ebernburg(611090)[level=7]: obsolete_boundary
Makefile:30: recipe for target 'data/admin-3.db' failed

and similar error for polygons centroids
but finally fails again for the admin.jsonl:

> make data/admin.jsonl
...
converted 22000
error: unknown boundary value for Bad Münster am Stein-Ebernburg(611090)[level=7]: obsolete_boundary

Let me know if there is anything I can do to remove this problem.

I am now looking into converting the jsonl format for what did work into geojson.

The Latest filesizes are:

planet-latest.osm.pbf: 44.15gb
planet.o5m: 88.29gb
admin.o5m: 2.06gb
admin-1.db: 5.64gb
admin-2.db: 5.64gb
admin-3.db: 7.22gb
admin-4.db: 7.22gb
admin.jsonl: 334mb

Makefile:

.PRECIOUS: data/%
.SECONDARY:
	
data/planet-latest.osm.pbf:
	mkdir -p $(dir $@)
	curl https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf -o $@.download
	mv $@.download $@

data/planet.o5m: data/planet-latest.osm.pbf
	mkdir -p $(dir $@)
	osmconvert ../osmboundaries/$< -o=$@

data/admin.o5m: data/planet.o5m
	osmfilter --keep="place=country =state =region =province =district =county =municipality =postcode =city =town =village =hamlet boundary=" $< -o=$@

data/admin-1.db: data/admin.o5m
	# Reconstruct ways from nodes
	./osm indexways $< $@.tmp
	# Reconstruct intermediate relations. These are relations used to build other relations. In theory they do not exist. In practice, France and Germany boundaries are defined that way.
	mv $@.tmp $@

data/admin-2.db: data/admin.o5m data/admin-1.db
	cp data/admin-1.db data/admin-2.db
	./osm indexrelations $< $@

data/admin-3.db: data/admin.o5m data/admin-2.db
	cp data/admin-2.db data/admin-3.db
	# reconstruct polygons
	./osm indexlocations $< $@


data/admin-4.db: data/admin.o5m data/admin-3.db
	cp data/admin-3.db data/admin-4.db
	# Extract/compute polygons centroids
	./osm indexcenters $< $@

data/admin.jsonl: data/admin.o5m data/admin-4.db
	./osm geojson $< $(word 2,$^) $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant