GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
how to find coordinates of bounding box ?  XML
Forum Index -> General
Author Message
ina



Joined: 07/10/2009 16:56:11
Messages: 2
Offline

I guess I am totally stuck. To use the cities webservice, I have to enter the
"coordinates of bounding box" north, east, west, and south

I have the coordinates of a city/place e.g.
lat=52.516900
lng=13.400831

How do I "translate"?
marc



Joined: 08/12/2005 07:39:47
Messages: 4412
Offline

If you don't have a bounding box, then I don't think you want to use the cities webservice, you are probably more interested in the findNearbyPlaceName service.
http://www.geonames.org/export/web-services.html#findNearbyPlaceName

Marc

[WWW]
ina



Joined: 07/10/2009 16:56:11
Messages: 2
Offline

Thanks for you answer.

marc wrote:
I don't think you want to use the cities webservice, you are probably more interested in the findNearbyPlaceName service. 


No, I AM interested in the cities webservice, I want to find neighborcities, ordered by population. Using findNearbyPlaceName returns all kind of stuff, even with a given featureClass or featureCode.

http://ws.geonames.org/findNearbyPlaceName?lat=52.4981713016771&lng=13.3974838256836&radius=150&featureCode=PPLA&featureCode=PPLC&featureCode=PPLG

would work, but is limited to a) some sort of capital cities and b) the radius, which can be different depending on the area (rural areas need a bigger radius to find an appropriate amount of bigger cities than highly populated areas)

How do I get a bounding box?
fred_kuijper



Joined: 24/01/2008 22:08:39
Messages: 35
Location: The Netherlands
Offline

I'm sorry for interrupting but I happened to read this,

The result is limited because PPL has not been specified:

http://ws.geonames.org/findNearbyPlaceName?lat=52.4981713016771&lng=13.3974838256836&radius=150&featureCode=PPLA&featureCode=PPLC&featureCode=PPLG&featureCode=PPL

If the radius depends on the city's population size than this data item can be requested first and used to determine the radius.

btw I don't understand the problem with the bounding box. East is lng+x and west is lng-x, north is lat+y and south is lat-y.

Fred Kuijper
The Netherlands
nikey



Joined: 13/10/2010 02:38:20
Messages: 4
Offline

Nevermind
saad786



Joined: 14/08/2011 20:02:09
Messages: 2
Offline

fred_kuijper wrote:
I'm sorry for interrupting but I happened to read this,

The result is limited because PPL has not been specified:

http://ws.geonames.org/findNearbyPlaceName?lat=52.4981713016771&lng=13.3974838256836&radius=150&featureCode=PPLA&featureCode=PPLC&featureCode=PPLG&featureCode=PPL

If the radius depends on the city's population size than this data item can be requested first and used to determine the radius.

btw I don't understand the problem with the bounding box. East is lng+x and west is lng-x, north is lat+y and south is lat-y. 


hi, i liked your thought. but could you please explain what are the X and Y values if you say :
East is lng+x and west is lng-x, north is lat+y and south is lat-y 

For example :
my latand lng values are as below:
Latitude 48.8553996
Longitude 2.3341415
How can i get
East lng + x West lng -x North lat+y Sout lat-y
what are x and y in above?
saphir



Joined: 05/06/2010 22:44:39
Messages: 130
Offline

Hi Saad

It is impossible to have a general "worldwide" number for x and y, it is up to you to determine the dimensions of the bounding boxes needed for your purposes >>>
For your Paris sample the height of the box from Orly to St-Denis should be some 25km – if you apply this big value to a rural region or a state border region, the box will contain some distinct villages or cities...
You will have to take individual or compromise distances from the center.
As fred_kuijper wrote, you may try with the city population numbers to evaluate some specific compromise distances…

In the North-South direction, one degree of latitude is invariably a distance of 60 nautical miles or 111.12 km.
For the northern bounding, you add your chosen value in decimal degrees to the center latitude… or subtract for the southern one.

For Paris with my 25km-sample or 12.5km to north and south >
48.8553996° [=Center] plus (12.5km / 111.12km) = 48.9679° for the northern limit or
48.8553996° minus (12.5km / 111.12km) = 48.7429° for the southern one


The East-West direction is neither invariable nor linear, an equatorial longitude degree is 60 nautical miles too – but a pole longitude degree is zero.
You will have to divide your chosen distance converted to degrees by the cosinus of the latitude >>> with my 25km box >

2.3341415° [=Center] plus (12.5km / 111.12) / 0.65796164 [=cosinus 48.8553996°] = 2.5051° for the eastern limit or
2.3341415° minus (12.5km / 111.12) / 0.65796164 = 2.1632° for the western one

Regards
Urs
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team