jackvarga
![[Avatar]](/gforum/images/avatar/0ae142cf6fefb48cb076a4957ed07882.png)
Joined: 11/12/2012 19:53:39
Messages: 1
Offline
|
Sharing utility for automating creation of geonames in PostGIS, This utility checks timestamps/filesize, grabbing most current data (when its run), creates geometry with GiST indexes, clusters and assigns user defined owner of database. It was designed for use with PostGIS >=2.x (implying Postgres >= 9.x)
Currently only grabs US postal codes but easily adapted to other country postal codes.
Used in conjunction with PostGIS 2's indexed nearest neighbor query, makes a nice location based service foundation. For example, to find the ten closest hotels to downtown Boulder, one might execute this query...
SELECT name, fcode
FROM geonames WHERE fcode = 'HTL'
ORDER BY geom <-> st_setsrid(st_makepoint(-105.27997,40.01789),4326)
LIMIT 10;
Code is here... http://jvarga.github.com/geonames-for-postgis/
|