Author |
Message |
17/10/2007 02:49:20
|
ptomblin
Joined: 16/10/2007 01:30:57
Messages: 18
Offline
|
I'm using the countrySubdivision webservice, and when I put in locations that I know are in Nunavut or North West Territories, I get an adminName1 of "06". Strangely enough, Yukon Territories works fine.
|
|
|
17/10/2007 12:01:07
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4412
Offline
|
I was not aware of this problem. I have checked and the boundary polygons are missing the codes for Nunavut and North West Territories. Instead they have a dummy code '06' which seems to stand for both territories. We will have to find better or more uptodate boundary information for Canada.
Cheers
Marc
|
|
|
|
17/02/2008 12:28:00
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4412
Offline
|
I found a boundary file for Canadian provinces on the US national weather service website : http://www.weather.gov/geodata/catalog/national/html/province.htm
With the new file it should work fine for Canada.
Marc
|
|
|
|
17/02/2008 14:53:23
|
ptomblin
Joined: 16/10/2007 01:30:57
Messages: 18
Offline
|
marc wrote:
I found a boundary file for Canadian provinces on the US national weather service website : http://www.weather.gov/geodata/catalog/national/html/province.htm
With the new file it should work fine for Canada.
Marc
It improved some of the points I fed into it, and fixed the Nunavut/NWT problem, but it also made some worse. For instance, Comox Airport (N 49.710833 W 124.88667) comes out as not being in any province, as does Prince Rupert Airport (N 54.28611 W 130.447222). Both of these are close to the coast, so I suspect an accuracy problem.
Oh well, I appreciate your efforts.
|
|
|
17/02/2008 15:08:42
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4412
Offline
|
You can add the parameter 'radius' to define a buffer zone. This helps in coastal areas where the boundary may be too simplified :
http://ws.geonames.org/countrySubdivision?lat=54.28611&lng=-130.447222&radius=5
|
|
|
|
17/02/2008 18:55:50
|
ptomblin
Joined: 16/10/2007 01:30:57
Messages: 18
Offline
|
marc wrote:
You can add the parameter 'radius' to define a buffer zone. This helps in coastal areas where the boundary may be too simplified :
http://ws.geonames.org/countrySubdivision?lat=54.28611&lng=-130.447222&radius=5
What does the radius do when something is near or on the border between two provinces? Maybe it should return both?
For instance, this point on the Alberta/Saskatchewan border (N 57.7533 W 110.000) comes out as being in Alberta, even though on Google Maps it appears to be in Saskatchewan.
http://maps.google.com/maps?f=q&hl=en&geocode=&q=N+57.7533+W+110&ie=UTF8&ll=57.754373,-110.00001&spn=0.020699,0.055361&z=14&iwloc=addr
|
|
|
17/02/2008 20:30:49
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4412
Offline
|
If you want to have all results within the radius then you can add the parameter 'maxRows' :
http://ws.geonames.org/countrySubdivision?lat=57.753300&lng=-110.00000&radius=5&maxRows=10
Marc
|
|
|
|
18/02/2008 00:12:14
|
ptomblin
Joined: 16/10/2007 01:30:57
Messages: 18
Offline
|
marc wrote:
If you want to have all results within the radius then you can add the parameter 'maxRows' :
http://ws.geonames.org/countrySubdivision?lat=57.753300&lng=-110.00000&radius=5&maxRows=10
Marc
Man, you thought of everything!
|
|
|
|