I need to extract a large area from OSM to import it into my local PostGIS-DB (using osm2pgsql).
For smaller areas I was using http://extract.bbbike.org/ to download OSM-XML-Data. It's possible to select the area by rectangle or by polygon. The maximum size of extract can be 512MB. But now I need to download a larger area - maybe about 1GB - too large for bbbike.org.
QuickOSM seems to be also no option, cause of the size of the area.
The area of interest is a 30km buffer of a 900km-track and runs across 2 Countrys. I could download both Countrys, but that would by a way too much data for my available resources.
How can I get to my data?
Answer
Thanks to Mesa's and mdd's comment I found that sollution:
- Download the whole dataset from download.geofabrik.de (or anywhere else)
- Create a polygon for clipping (in my case a buffer of a line)
- Save the polygon as *.poly using QGIS and the Export OSM Poly plugin (important: the CRS of the polygon must be the same of the OSM dataset - EPSG:4326)
- Using osmconvert to clip the osm-Dataset with the *.poly-polygon from step 3. (for Linux users: you have to install osmctools first!)
- Done!
No comments:
Post a Comment