Author |
Message |
|
The problem with your code lies in a browser security feature which makes it impossible to call an xml service from an other server then the one the page has been loaded from.
See this geonames faq entry for details :
http://forum.geonames.org/gforum/posts/list/11.page
Instead of calling the xml service :
http://ws.geonames.org/findNearbyPostalCodes?postalcode=6020&country=CH
you can call the JSON variant of the same service :
http://ws.geonames.org/findNearbyPostalCodesJSON?postalcode=6020&country=CH
For the JSON format there is no security restriction on the browser.
Marc
|
|
|
Ich habe aus Versehen auf Edit statt Reply gedrückt und deinen Beitrag editiert. Bitte tausendmal um Entschuldigung. Leider konnte ich deinen Ursprungstext nicht mehr zurücksetzen.
erstmal ein riesen Kompliment für dieses Projekt, ich bin restlos begeistert!
Vielen Dank.
Darum möchte ich den Baum um mehrere Ebenen erweitern: Welt, Kontinente und Regionen (bspw. Südostasien).
Daran habe ich auch schon gedacht, bin aber noch nicht dazu gekommen. Eine erste Einteilung in Kontinente besteht bereits : http://download.geonames.org/export/dump/countryInfo.txt (letzte Spalte)
Ich denke am besten wäre es für die Regionen die UN Einteilung zu übernehmen :
http://unstats.un.org/unsd/methods/m49/m49regin.htm
Oder kennst Du einen besseren Regionen-Standard?
Das Problem das eventuell auftauchen könnte sind Überseeterritorien, frühere Kolonien die auf einem anderen Kontinent sind aber zum Mutterland gehören. In den Fällen, wo dieses Gebiet einen eigenen ISO-CountryCode hat, ist es in der GeonamesDB als eigenes Land geführt. Aber auch in diesen Fällen könnte es interessant sein diese Abhängigkeit zu modellieren.
Darum aber grundsätzlich die Frage: worauf sollte ich bei der Modellierung dieser DB besonders achten, um auch spätere Änderungen[1] leicht integrieren zu können?
Wärst Du allenfalls bereit deine Regionen-DB dem Geonames-Projekt beizusteuern? Dann hast du sicher am wenigsten ärger. Für den Anfang würde ich mir eine zusätzliche Spalte in der Datei countryInfo.txt mit dem Regionencode vorstellen. Später brauchen die Regionen dann auch Namen in allen Sprachen und eine id in der GeonamesDB.
Marc
|
|
|
Hi Pete
For a close integration with googlemaps into your own site, you should look at the JSON version of the full text search:
http://www.geonames.org/export/#fulltextSearch
A very basic example is here :
http://www.geonames.org/maps/json-googlemaps-example.html
I have fixed and improved a couple of things with the 'show on map' function. The following code snippet should work :
Code:
<script type="text/javascript">
function searchOnMap() {
if (document.searchForm.q.value == '') {
alert('Please enter a name.');
return;
}
var q = encodeURIComponent(document.searchForm.q.value);
if (document.searchForm.country.value != '') {
q = q + '+country:' + document.searchForm.country.value;
}
window.open('http://www.geonames.org/maps/showOnMap?q='+ q,'geonames');
}
</script>
The url should look like this :
http://www.geonames.org/maps/showOnMap?q=sydney+country:AU
Please come back to me if it does not work or if you have other questions.
Marc
|
|
|
Geonames has been updated today with the newest nga dump 20060410.
See also the geonames blog :
http://geonames.wordpress.com/2006/04/23/nga-load/
Code:
Updates :
8370 Afghanistan
767 Indonesia
351 Taiwan
114 Peru
75 Lebanon
68 Turkey
39 Haiti
30 China
28 Russia
26 Venezuela
20 Seychelles
17 Armenia
13 Algeria
11 Brazil
5 Pakistan
5 Iran
5 Chile
5 Mexico
4 Argentina
4 Croatia
4 Central African Republic
4 Colombia
3 Somalia
3 Saudi Arabia
3 Panama
3 Serbia And Montenegro
3 India
3 Iraq
3 Finland
3 French Guiana
3 Albania
2 Greece
2 Australia
2 Nepal
2 Ecuador
2 United Kingdom
2 Georgia
2 Romania
2 Israel
1 Palestinian Territory
1 Hungary
1 Bulgaria
1 Cuba
1 Bolivia
1 British Virgin Islands
1 Norway
1 Martinique
1 Ethiopia
1 Sri Lanka
1 El Salvador
1 Ukraine
1 Japan
1 Nigeria
1 Uruguay
1 Bhutan
------------
10024 total updates
Inserts :
1404 Indonesia
653 Taiwan
333 Lebanon
223 Afghanistan
141 Peru
21 Nepal
15 Haiti
2 Iran
2 Central African Republic
1 Sudan
------------
2795 total inserts
12819 total inserts and updates
1155 deletes
The numbers for the previous load 2006-02-22 are here :
http://forum.geonames.org/gforum/posts/list/21.page
|
|
|
Thanks to Lucien geonames is now supporting postal codes for Monaco.
|
|
|
Hallo frx
Für die Umkreissuche haben wir zwei Webservices :
* Find nearby postal codes / reverse geocoding : gibt Orte und Postleitzahlen in einem Umkreis zurück.
* Find nearby place name / reverse geocoding : gibt Orte in einem Umkreis zurück.
http://www.geonames.org/export/
Wenn du es auf der eigenen Datenbank machen möchtest musst du die Möglichkeiten deiner Datenbank anschauen. heutzutage haben die meisten Datenbanken Gis-Funktionen.
Bsp für postgres : http://www.postgresql.org/docs/8.1/interactive/functions-geometry.html
Für die Distanzberechnung in PHP findest du ein Bsp hier :
http://www.weberdev.com/PrintExample.php?count=3548&mode=color
(für km musst du den Erdradius in km ersetzen)
Marc
|
|
|
Hi Hugo
Thank you for your kind words. I am glad you like geonames.
Regards from Switzerland.
Marc
|
|
|
Sure, we have a mailing list :
http://groups.google.com/group/geonames
To post to the list just write to : geonames@googlegroups.com
No registration is required for posting.
|
|
|
The example is using a JSON script utility class written by Jason Levitt.
one of the first lines of the html page of the example :
<script type="text/javascript" src="/export/jsr_class.js"></script>
You have to copy the file http://www.geonames.org/export/jsr_class.js to your server and change the line accordingly.
Reference :
http://www.xml.com/pub/a/2005/12/21/json-dynamic-script-tag.html?
An other JSON example (with yahoo instead of geonames) is here :
http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/
You don't have to subscribe for geonames. The service is entirely free. But we reserve the right to come back to you with this once your site is the 'Next Big Thing' and your users are hammering our servers with search requests
|
|
|
Hi
There is a very basic example using the geonames JSON full text search with google maps :
http://www.geonames.org/maps/json-googlemaps-example.html
The JSON fullt text search :
http://www.geonames.org/export/#fulltextSearch
It is important to url encode the search parameters :
http://forum.geonames.org/gforum/posts/list/8.page
Marc
|
|
|
Hello
The data for the US is from the U.S. Board on Geographic Names. It is updated once per year.
http://geonames.usgs.gov/index.html
We have upgraded today to googlemaps version 2. Some users have reported misalignments compared to version 1.
http://groups.google.com/group/Google-Maps-API/browse_thread/thread/b464d59d668def62/331cd3d342d7b4e1#331cd3d342d7b4e1
Do you see a systematic error in our data? If yes we would like to know it and report it to google. If only some points are inaccurate you can directly change it on our site using the 'move' link or you can report it to the U.S. Board on Geographic Names.
Marc
|
|
|
I have deleted the duplicate entry and fixed the bug preventing you from deleting it. (At least I hope so, it is the second fix for this bug this evening.)
Marc
|
|
|
I think you are right. A category for 'University' does make sense.
It has just now been added to geonames.
Marc
|
|
|
This is definitely an interesting question. You might also post it to our mailing list to discuss it : geonames@googlegroups.com, archives are at http://groups.google.com/group/geonames
We don't yet have "authoritative names" for Finland.
Please feel free to change and correct the 'main' name, but don't forget to add is as "alternate name" if you change it.
Luistxo from the Geonative project is preparing lists to be integrated in geonames.org :
http://www.geocities.com/Athens/9479/welcome.html
or Finland :
http://www.geocities.com/Athens/9479/sve.html
Marc
|
|
|
The edit functions are on top of the google maps interface.
Use the search function to find the place where you live. Then click on the small balloon on the map. A new window will open over the map and in this window you have several edit functions available. Just click on one of the menus at the bottom of that window.
With the 'edit' function you can correct elevation, population and others. With the 'alternate names' you can correct spelling and add names for this place in other languages.
With the 'move' function you can correct the location of the place.
The most recent modifications are visible here :
http://www.geonames.org/recent-changes.html
Marc
|
|
|
Hi Hari
An Article on the O'Reilly Network about consuming a Yahoo REST web service should help to get you started. The article desribes how to make a request and how to parse the xml :
http://www.oreillynet.com/pub/a/network/2005/02/28/yahoo.html
The important part looks like this :
# Make the request
my $yahoo_response = get($req_url);
# Parse the XML
my $xmlsimple = XML::Simple->new();
my $yahoo_xml = $xmlsimple->XMLin($yahoo_response);
The article does not cover url encoding. If you use one of the geonames services whith a placename as parameter you have to url encode the placename before constructing the final url:
use URI::Escape;
$escapedParameter = uri_escape("new york");
Hope this helps.
Marc
|
|
|
We have added swedish postal codes today.
The complete list of supported postal codes is here :
http://www.geonames.org/postal-codes/
http://www.geonames.org/export/free-geocoding.html
|
|
|
I have now also added the alternate name 'Chernobil' to the geonames database. The result returned by the query above will thus be a geonames listing and no longer a wikipedia one.
You have to use the wikipedia search to see the wikipedia entries for this search term :
http://www.geonames.org/wikipedia-search.html?q=Chernobil
|
|
|
Bezüglich der "anderen Repräsentation" der Daten, hast du schon konkrete Vorstellungen wie es aussehen könnte?
|
|
|
Umrissdaten gibt es schon. Aber leider sind die nicht frei zugänglich.
Gut beschrieben wird die Problematik im Guardian (auf Englisch) :
http://technology.guardian.co.uk/weekly/story/0,,1726229,00.html
Eine weitere Petition gibt es hier :
http://petition.publicgeodata.org/
|
|
|