This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Is it easy to extract the shape of country across API?

2

I read the API documentation for to extract the points (not all of course ;) ) of that make the shape of a country.

For example, I have a website with a map. The map is displayed with OpenLayers and the connection is OpenStreeMap. I want to show the shape of Spain for paint with vector polygon.

asked 13 Dec '10, 20:30

Miguel's gravatar image

Miguel
31113
accept rate: 0%

edited 14 Dec '10, 09:05

Andy%20Allan's gravatar image

Andy Allan
12.5k23128153


One Answer:

7

OpenStreetMap data is very detailed. If you extract the border of Spain from OSM, you will have a polygon with many thousand points, and that will be very slow to draw on OpenLayers. It is better to take such polygons from generalised datasets, for example from the public domain resource Natural Earth Data.

answered 13 Dec '10, 20:36

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .