zedalaye / geonames_pg_import

Import GeoNames datasets into any PostgreSQL database
MIT License
4 stars 1 forks source link

Add PostGIS points #1

Open zedalaye opened 2 years ago

zedalaye commented 2 years ago
SELECT AddGeometryColumn ('public','geoname','the_geom',4326,'POINT',2);

UPDATE geoname SET the_geom = ST_PointFromText('POINT(' || longitude || ' ' || latitude || ')', 4326);

CREATE INDEX idx_geoname_the_geom ON public.geoname USING gist(the_geom);

From: https://medium.com/pixel-heart/howto-dump-geonames-into-postgresql-and-postgis-395fab58f4bc

zedalaye commented 2 years ago

Also : https://event.ifi.uni-heidelberg.de/wp-content/uploads/2017/03/geonames_installation.pdf