NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hey I converted a OSM file to CSV, with:

osmconvert64.exe netherlands-latest.osm --max-objects=999999--all-to-nodes --csv="@lat @lon addr:street addr:housenumber addr:postcode addr:city" -o=streets.csv

And I want to import the CSV into MySQL-database, but the file is 3GB. I noticed that in the CSV file their is sometimes lat/lon, but no addr data. Is their a way I can filter out records that don't have the addr data? (To reduce filesize CSV, and unwanted data)

I tried: osmfilter.exe netherlands-latest.osm --keep="@lat= and @lon= and addr:street= and addr:housenumber= and addr:postcode= and addr:city= and @lat!=null and @lon!=null and addr:street!=null and addr:housenumber!=null and addr:postcode!=null and addr:city!=null" -o=netherlands-filtered.osm

osmfilter.exe netherlands-latest.osm --keep="addr:street!=null and addr:housenumber!=null and addr:postcode!=null and addr:city!=null" -o=netherlands-filtered.osm

asked 04 Oct '19, 21:21

JSteen's gravatar image

JSteen
11112
accept rate: 0%

edited 04 Oct '19, 21:23

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×60

question asked: 04 Oct '19, 21:21

question was seen: 890 times

last updated: 04 Oct '19, 21:23

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum