PostgreSQL postgis: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Example for Ubuntu and osmdb | Example for Ubuntu and osmdb | ||
apt install postgis | apt install postgis | ||
sudo -u postgres createuser osmuser | |||
sudo -u postgres createdb --encoding=UTF8 --owner=osmuser osm | |||
sudo -u postgres psql osm --command='CREATE EXTENSION postgis;' | |||
CREATE EXTENSION postgis; | psql -d osm | ||
SELECT PostGIS_Version(); //verify install | SELECT PostGIS_Version(); //verify install | ||
quit; | |||
apt install osm2pgsql //https://osm2pgsql.org/doc/install/linux.html | |||
wget https://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf | |||
osm2pgsql -d osm -s berlin-latest.osm.pbf //osm2pgsql took 302s (5m 2s) overall. |
Latest revision as of 2025-08-12T14:53:19
Example for Ubuntu and osmdb
apt install postgis sudo -u postgres createuser osmuser sudo -u postgres createdb --encoding=UTF8 --owner=osmuser osm sudo -u postgres psql osm --command='CREATE EXTENSION postgis;' psql -d osm SELECT PostGIS_Version(); //verify install quit; apt install osm2pgsql //https://osm2pgsql.org/doc/install/linux.html
wget https://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf osm2pgsql -d osm -s berlin-latest.osm.pbf //osm2pgsql took 302s (5m 2s) overall.