postgis general howtos
Postgis je normalnou extenziou postgresu, a zo systemoveho hladiska sa s nim pracuje rovnako, ako s kazdou inou extenziou…
select name, default_version, installed_version from pg_available_extensions where name like ‘postgis%’ or name like ‘address%’;
jak naistalovat postgis s postgresom a spunktovat to dohromady
Instalacia na deb/ubuntu tu
Instalacia na CentOS/RedHat tu
poinstalacii je nutne nahodit extensny:
psql -d yourdatabase -c “CREATE EXTENSION postgis;”
psql -d yourdatabase -c “CREATE EXTENSION postgis_raster;”
psql -d yourdatabase -c “CREATE EXTENSION postgis_topology;”
psql -d yourdatabase -c “CREATE EXTENSION postgis_sfcgal;”
kontrola verzie:
SELECT PostGIS_version();
jak naimportovat .SHP do postgisu
/usr/bin/shp2pgsql -I /path/to/the/shapefile schema.table | psql -d databaza
Je tu jedna zajimavost, ze meno shapefilu sa zadava “genericke”, nakolko shapefile su vacsinou viac suborov (.dbf, .shp, .shx). Inak systemovo to vypada tak, ze uploadnute shp sa konvertuje do standardnej postgresovej/postgisovej tabulky.
Komplementarnou binarkou k uvedenej je pgsql2shp.
jak vypublikovat postgis na geoserver
- nahodit geoserver – quick tutorial zde