hi linux-experts,
relatively new to GIS and Openstreetmap i try out techniques with perl, php, ruby and some other toosl /(osmconvert and filter) in order to get familar with the techniques.
what if i need the a country and not only a part of it what do i need to edit in the boundary-box.
let me say i want to gather data from
a. Belgium b. Argentina c. Colombia d. Denmark
what do i do with the boundary-box (see below in the code)
can i enter some equivalent.
if i need to explain more - just write ...
Code:
require 'open-uri'
require "net/http"
require 'rexml/document'
def query_overpass(object_type, left,bottom,right,top, key, value)
base_url = "http://www.overpass-api.de/api/xapi?"
query_string = "#{object_type}[bbox=#{left},#{bottom},#{right},#{top}][#{key}=#{value}]"
url = "#{base_url}#{URI.encode(query_string)}"
resp = Net::HTTP.get_response(URI.parse(url))
data = resp.body
return data
end
love to hear frrom you - look forward to any and all help!
update:
found out some interesting things- have a closer look here;
User:The Anome/country bounding boxes - Wikipedia, the free encyclopedia
Quote:
User:The Anome/country bounding boxes A first hack, based on all places in the NGA GNS dataset, not (yet) properly handling latitude wrap-round at ±180°. Country names are mapped from FIPS country codes. This works pretty well for all countries that do not cross the 180° meridian. Russia is a notable exception. This dataset does not include the United States.
country longmin latmin longmax latmax
AA -70.983 12.400 -69.850 12.617
Antigua_and_ -62.417 16.817 -61.650 17.750
United_Arab_ 45.000 22.167 59.250 26.133
Afghanistan 60.433 29.150 75.033 38.484
Algeria -8.700 18.027 70.554 37.203
Azerbaijan 44.783 38.417 50.858 41.911
Albania 19.000 39.583 21.050 42.659
Armenia 43.443 38.857 46.589 41.300
Andorra 1.417 42.433 1.783 42.650
Angola 10.000 -33.806 24.350 -3.033
Argentina -73.533 -58.583 -53.367 -21.783
Australia 112.467 -55.050 168.000 -9.133
AT 122.983 -12.667 124.050 -12.000
Austria 1.200 46.373 19.000 49.017
AV -63.667 18.150 -62.917 18.600
Bahrain 45.000 25.000 50.954 26.566
Barbados -59.667 12.967 -59.383 13.333
Botswana 20.000 -28.517 29.350 24.583
BD -64.908 32.233 -64.617 32.417
Belgium 2.367 49.500 6.400 51.683
Bahamas -86.000 20.000 -70.000 29.547
Bangladesh 84.000 20.600 92.683 26.817
Belize -89.950 15.000 -75.000 18.483
Bosnia_and_H 15.746 42.558 19.671 45.268
Bolivia -69.650 -26.867 -57.550 9.678
Burma 91.833 6.000 102.000 28.350
Benin -4.000 5.000 92.219 21.322
Belarus 22.550 50.717 32.850 56.133
Solomon_Isla -130.000 -45.000 170.200 3.751 WRAPPED
Brazil -73.817 -33.733 -28.850 16.800
BS 39.700 -21.417 39.700 -21.417
Bhutan 80.000 26.217 92.717 30.000
|