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

Hi guys,

I would like to show where a beach is. But I cant extract them. From the documentation they seem to be "closed ways" instead of nodes.

I extract nodes succesfully with osmosis and this command line:

osmosis --read-pbf file=planet-latest.osm.pbf --node-key-value keyValueList="amenity.restaurant" -- write-xml restaurant.xml

When I want to extract ways (like beaches) I use this Osmosis command line:

osmosis --read-pbf file=planet-latest.osm.pbf --way-key-value keyValueList="natural.beach" --used-node --write-xml beaches.xml

However this doesnt work. The process starts:

Pipeline executing, waiting for completion.

But after a while a get an error:

java.util.zip.DataFormatException: incorrect data check

I have downloaded 3 planet files to make sure the data isnt currupt but this happens all the time.

How do I extract these beaches?

asked 22 Aug '14, 18:03

NLanaconda's gravatar image

NLanaconda
1111
accept rate: 0%

edited 22 Aug '14, 18:09

Works fine here using the latest osmosis version (0.43.1). Did you compare the MD5 checksum of your download?

(23 Aug '14, 08:49) scai ♦

Checked it with MD5 but the checksum is different, what does that mean? The download is corrupt?

(23 Aug '14, 11:45) NLanaconda

Yes, if the MD5 doesn't match, it's a corrupt download.

(23 Aug '14, 11:53) SomeoneElse ♦

No, I've downloaded an osm.pbf (pbf is compressed?) file and it is 26.6 GB (ftp://ftp.spline.de/pub/openstreetmap/pbf/)

Should I download a .osm.bz2 file instead of .pbf? Those are around 36G.

(23 Aug '14, 13:02) NLanaconda
2

Just to be clear - if the MD5 for the file that you've downloaded doesn't match the value that it is supposed to be, then you have a corrupt download and you need to download it again. A corrupt download will cause the error that you are seeing (see https://help.openstreetmap.org/questions/14206/incorrect-data-check ).

(23 Aug '14, 13:11) SomeoneElse ♦

Thans SomeoneElse for pointing me the right direction. I'm downloading a new 26G file again :) Hopefully it will work out.

(23 Aug '14, 13:20) NLanaconda
showing 5 of 6 show 1 more comments

As you strugle, I'd like to suggest another way to get your data: Overpass API: http://overpass-turbo.eu/s/4Hu

Because as other say, fetching 35GB and process it for hours just to extract a few thousand items (a few MB) doesn't make sense, esp. at the beginning :-)

permanent link

answered 23 Aug '14, 15:58

iii's gravatar image

iii
4.9k84082
accept rate: 10%

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:

×252
×167
×83
×13

question asked: 22 Aug '14, 18:03

question was seen: 5,078 times

last updated: 23 Aug '14, 20:54

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