Hi Alex,

great work! 

I want to contribute an idea for a little enhancement - getting the location 
coordinates (longitude, latitude) from postal codes (I posted this 08.09.2009 
to the discussion list as "automatically generated Maps with a lot of 
locations"). Basically it would be a little add-on to your work. Maybe you or 
someone at the Dev-Jam can add this so your patches.

...

You can get the geographic locations with the use of postal codes, see 
http://www.geonames.org/postal-codes/ 

Download Postalcodes for your country, which is a rather small file: 
http://download.geonames.org/export/zip/IT.zip     

and add it to the postgres db so you don't need an online connection from your 
network management to the internet (something I don't like...  and besides, you 
don't want your network management to fail if some parts of your net are not 
running, so a distributed network management application is no use for me):

unzip IT.zip

# Add accuracy "0" if accuracy is not there (last column ending with tab) for 
import into db:

sed -e "s/\t$/\t0/" IT.txt >IT_accuracy.txt


# The data format is tab-delimited text in utf8 encoding, with the following 
fields :

CREATE TABLE postalCodes (
country VARCHAR(2),
postalCode  VARCHAR(10),
placeName  varchar(180),
adminName1 varchar(100),
adminCode1 varchar(20),
adminName2 varchar(100),
adminCode2 varchar(20),
adminName3 varchar(100),
latitude decimal(9,7),
longitude  decimal(9,7),
accuracy int
);


COPY postalCodes 
(country,postalCode,placeName,adminName1,adminCode1,adminName2,adminCode2,adminName3,latitude,longitude,accuracy)
 FROM '/home/opennms/src/geonames/postalcodes/IT_accuracy.txt';


Now you can use the information from the asset table (zip, city) to get the 
geolocation coordinates if they are not supplied (probably with a higher 
quality) by provisioning etc.

So if 
- coordinates are provisioned - use those coordinates
- no coordinates provisioned
       - asset information like zip and city available?
             - if yes, try to get coordinates from postal codes


As this approach is already two years old there might be better information 
available now, including street names etc.

- Michael




Ihr starker Gesundheitspartner – die BARMER GEK.
Auch 2011 gilt: kein Zusatzbeitrag! www.barmer-gek.de

Diese Nachricht der BARMER GEK kann vertrauliche firmeninterne Informationen 
enthalten. Sofern Sie nicht der beabsichtigte Empfänger sind, bitten wir Sie, 
den Absender zu informieren und die Nachricht sowie deren Anhänge zu löschen. 
Unzulässige Veröffentlichung, Verwendung, Verbreitung, Weiterleitung und das 
Kopieren dieser Mail und ihrer verknüpften Anhänge sind nicht gestattet.

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

Reply via email to