GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Messages posted by: marc  XML
Profile for marc -> Messages posted by marc [4486] Go to Page: Previous  1, 2, 3 ... 222 , 223, 224, 225 Next 
Author Message
Hi xavi

It is planned to move from fips to isocodes. The challenge with this is that there is no 1<->1 relationship between fips and iso codes, it has to be sorted out country by country. We therefore don't have something like allCountries.zip with iso codes.

Any help with this is welcome ...

Marc
Hi Sameer

The service findNearbyPlaceName takes now an argument "style" with the possible values SHORT,MEDIUM,LONG,FULL (default = MEDIUM).

http://www.geonames.org/export/#findNearbyPlaceName

Regards,

Marc
Hi Dirk

It was a quick fix indeed. Thanks for reporting it.

Marc

Thomas wrote:
I don't know if you have check only the french database but it seems that others countries are concerned by the same problem. 

I have restored admin1 code for all countries.
It is just the admin2 update running now that is for france.

Good luck with your project.

Marc
The process updating the population has accidentally removed the admin1 code. I have now restored the admin1 code where it has disapeared.

Thanks for finding this bug and letting us know.

I am now running an admin2 update on the French dataset. In the dump of tomorrow you will find the restored admin1 code and new admin2 codes for many records. The admin2 code here is the iso code for the French Départments.
http://www.insee.fr/fr/nom_def_met/nomenclatures/cog/dbf/2005/txt/depts2005.txt

Let me know if the admin2 code is useful, I will then run the update for other european countries as well.
Posting errors like this one here in the forum or in an email is fine. I will fix them. Thanks a lot.

Marc

Edit :
It is fixed now : http://www.geonames.org/search.html?q=Castilla+La+Mancha&country=
Hallo Eddie

Da habe ich aber Glück gehabt, dass Du deinen Beitrag noch gespeichert hattest. Den Letzten Satz über die Länderdaten habe ich beim erstenmal gar nicht gesehen.

Genau, habe ich gesehen! Da fehlt dann ggf. noch die "Zwischenebene" mit überregionalen Einteilungen.  

Richtig, so ist es gedacht. Oder sogar mehrere Spalten wie beim Ländercode, falls mehrere Standards unterschieden werden sollen. (Was Du unten ja auch schreibst.)

Prinzipiell ist das Ziel schon, obige Datei countryInfo.txt ganz im normalen DB-Dump aufgehen zu lassen, oder?  

Sicher wird jeder Regionen-Eintrag eine geonameId erhalten. Wenn man sich auf einen Standard einigen kann wird die Haupttabelle einfach um eine Spalte erweitert, wo dann der RegionenCode steht. Fall aber mehrere sich widersprechende Standards untersützt werden sollen muss diese Info zwangsläufig separat gespeichert sein.
Die Datei countryInfo.txt wird sicher länger (oder immer) bestehen da wahrscheinlich noch mehr Länderinfos dazukommen werden wie Telefonvorwahl(en), Währung(en), Landesprachen, Nachbarn, Postleitzahlformat etc. Gut wäre wenn man das CIA Worl Factsbook in einem besseren Format als HTML erhalten könnte.

Das wuerde mich ohnehin interessieren, wie ist das mit den Namen? In der name-Spalte steht immer der Name in Landessprache, oder?  


Es steht eher der international gängige Name in der Namesspalte. Bei den Alternativnamen gibt es noch kein Sortierkriterium. Das muss ich noch einbauen. Auf der Datenbank bereits vorhanden aber noch nirgends angezeigt ist die Spalte 'isOfficialName'.

Marc

Anonymous wrote:

<script type="text/javascript" src="jsr_class.js"> </script>
<script type="text/javascript">
// Define the callback function
function getGeo(jsonData) {
alert('...');
}
// The web service call
var req = 'http://ws.geonames.org/findNearbyPostalCodesJSON?lat=45&lng=-123';
 

You have to add a parameter callback=getGeo to tell our werbservice the name of the function where you are processing the result.
http://ws.geonames.org/findNearbyPostalCodesJSON?lat=45&lng=-123&callback=getGeo
The code was broken. Thanks for letting us know about the problem.

Please try again, it is fixed now and should work.

Marc
Who is 'they'? Is it a company starting with 'Y'? If yes, I don't think 'they' offer reverse geocoding.
But this is no problem as you can use our service for this

Marc
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
 
Profile for marc -> Messages posted by marc [4486] Go to Page: Previous  1, 2, 3 ... 222 , 223, 224, 225 Next 
Go to:   
Powered by JForum 2.1.5 © JForum Team