Chessel
(Chessel)
1
Hello. I want to download all coastline data to my machine. I think this is going to be about 20Gb of data. An overpass query is presumably not the right approach.
Please could someone give me some guidance on a suitable approach?
Kind regards, Chris
PHerison
(P Herison)
2
Hi
Check Coastline - OpenStreetMap Wiki which leads to Coastlines.
Is that what you are looking for?
Chessel
(Chessel)
3
Hi, no. Iām after the basic OSM coastline data in XML format. So Iāve downloaded all UK area coastline data before using a query something like:
area[āISO3166-1ā=āGBā];
(
way"natural"=ācoastlineā;
node(w);
);
out;
Iāve then done my own postprocessing to get this into a SQLite database in the format I want. I now want to extend this to the entire world. What would be the right way to download such a large data set?
Iām blind and typically most GUI tools arenāt accessible with a screen reader so Iām unable to import Shapefiles. And currently I also want to do my own processing to get the data into my SQLite database.
Best, Chris
Iāve never done anything this low level, but would a software library like GDAL be able to get the ānormalā coastline ShapeFiles into a suitable SQLite database without a GUI? I think at its most basic it exists mostly as a set of command line tools.
Do you need additional information that the ShapeFiles just donāt have?
I donāt have a firm grasp on how big a set of all the coastlines is in one of the native OSM formats. The limit on the āmainā Overpass instance is 1GB/day. Iām not sure if it could even handle that in one go. The recommendation for large amounts of data is usually to download a copy of the planet file (or a regional extract) and run your extract locally using something like osmosis. My gut feeling is that if you can find some way of using the existing coastline extracts thatās probably going to be easiest.
Chessel
(Chessel)
5
Thanks for your reply. I just need all the segments that make up coastlines as my application uses this to determine if my userās position is in the sea or on land.
I hadnnāt come across GDAL before so thanks for pointing it out. Your suggested approach sounds sensible. I just have to work out how to use it.
Might still be fun though to try downloading planet data but then Iāll also need to work out how to use Osmosis.
Thanks, Chris