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

3
1

Hi,

Is there any way to extract nodes from only a certain country.

I've used XAPI to do this but that uses a bounding box [bbox]. This is OK but suppose I only want nodes from the UK and not the Republic of Ireland. In this case the square bbox will inevitably rope in Republic of Ireland nodes when I only want UK nodes beacuse in order to get the whole of the UK the box will also cover Ireland.

I see that there is a download location where I can download country specific datasets: http://download.geofabrik.de/osm/europe/

But I'm assuming that they have just collected the data using a bbox as well.

Thanks C

asked 09 Mar '11, 09:57

columboid's gravatar image

columboid
51114
accept rate: 0%

-2

Always try before assuming :)

(09 Mar '11, 10:51) Breki

The Geofabrik extracts do not use a simple rectangular bounding box. Instead they use a polygon, which follows the country borders fairly closely. So if for example you download the England extract, it will just contain England, and none of the surrounding bits of Scotland/Wales/Ireland etc.

Though you say you just want the UK, which it seems Geofabrik do not provide an extract for. They just have extracts for "Great Britain", "Ireland" and "British Isles". So to get all of the UK, you could download the British Isles extract, then use Osmosis to extract just the UK part using a polygon filter.

Or Cloudmade provide UK extracts, though I'm not sure how closely they follow the Northern Ireland border.

permanent link

answered 09 Mar '11, 15:15

Vclaw's gravatar image

Vclaw
9.2k895141
accept rate: 22%

Thanks Vclaw and gnurk, that is most useful. That's plenty for me to read up on and it sounds like the answer is in there. Thanks for your help.

(09 Mar '11, 15:31) columboid

Smaller non-rectangular areas, like cities, can be extracted using the methods described in OSM Server Side Script.

In order to extract big areas, like a whole country, you may download a planet file, or a part of a planet file, and then use Osmosis Polygon Filter File Format.

permanent link

answered 09 Mar '11, 11:11

gnurk's gravatar image

gnurk
6.1k106096
accept rate: 15%

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:

×83
×58
×32
×30

question asked: 09 Mar '11, 09:57

question was seen: 13,981 times

last updated: 06 Apr '15, 13:22

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