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

Editing OSM attributes #3

Open
code-geek opened this issue Dec 19, 2017 · 2 comments
Open

Editing OSM attributes #3

code-geek opened this issue Dec 19, 2017 · 2 comments

Comments

@code-geek
Copy link
Member

I've implemented an automatic OSM extraction module in the Nepal GeoNode, basing it off of Malawi's implementation here: https://github.com/MalawiGeospatialTools/osm-extract

Been trying to edit the ini files in order to only extract the attributes we need. However, it's throwing this error:

ERROR 1: Could not parse configuration file for OSM import
FAILURE:
Unable to open datasource `nepal/aerodromes_point.pbf' with the following drivers.
......
Makefile:142: recipe for target 'aerodromes_point.sql' failed
make: *** [aerodromes_point.sql] Error 1111
@ingenieroariel
Copy link
Member

ingenieroariel commented Dec 19, 2017 via email

@ppasq
Copy link

ppasq commented Jan 9, 2018

I've made a test using your conf files.
I've downloaded a nepal-latest.osm.pbf from GeoFabrik and run the script step by step.

$ osmosis --read-pbf-fast file=nepal-latest.osm.pbf --nkv keyValueList="aeroway.aerodrome" --write-pbf file=aerodromes_point.pbf
Jan 09, 2018 5:17:34 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Osmosis Version 0.45
Jan 09, 2018 5:17:35 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Preparing pipeline.
Jan 09, 2018 5:17:35 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Launching pipeline execution.
Jan 09, 2018 5:17:35 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline executing, waiting for completion.
Jan 09, 2018 5:17:53 PM org.openstreetmap.osmosis.core.Osmosis run
INFO: Pipeline complete.
Jan 09, 2018 5:17:53 PM org.openstreetmap.osmosis.core.Osmosiss run
INFO: Total execution time: 18349 milliseconds.
$ ogr2ogr -f PGDump aerodromes_point.sql aerodromes_point.pbf -lco COLUMN_TYPES=other_tags=hstore --config OSM_CONFIG_FILE conf/aerodromes_point.ini

The generated aerodromes_point.sql file is not empty (has about 10 features) and I got no errors.

@code-geek when you get the GDAL list of available drivers, is OSM included?
-> OSM

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

3 participants