no PGSQL
This commit is contained in:
parent
9902419b41
commit
7d24fb338a
3 changed files with 15 additions and 86 deletions
30
install.txt
30
install.txt
|
|
@ -1,30 +1,4 @@
|
|||
## packages
|
||||
sudo dnf install postgresql-server postgresql-contrib postgis osmium-tool jq python3-devel pip
|
||||
sudo dnf install osmium-tool jq python3-devel pip
|
||||
|
||||
pip install quackosm[cli] psycopg2-binary pyosmium geoalchemy2 geojson shapely
|
||||
|
||||
## PostgreSQL setup
|
||||
sudo postgresql-setup --initdb
|
||||
sudo -u postgres psql
|
||||
|
||||
CREATE USER osm WITH PASSWORD 'osm';
|
||||
CREATE DATABASE gis_data OWNER osm;
|
||||
\q
|
||||
sudo -u postgres psql -d gis_data
|
||||
|
||||
CREATE TABLE osm_lines (
|
||||
id SERIAL PRIMARY KEY,
|
||||
geometry GEOMETRY(LINESTRING, 4326),
|
||||
tags JSONB
|
||||
);
|
||||
|
||||
CREATE TABLE osm_polygons (
|
||||
id SERIAL PRIMARY KEY,
|
||||
geometry GEOMETRY(POLYGON, 4326),
|
||||
tags JSONB
|
||||
);
|
||||
|
||||
CREATE INDEX idx_osm_lines_geometry ON osm_lines USING GIST(geometry);
|
||||
CREATE INDEX idx_osm_polygons_geometry ON osm_polygons USING GIST(geometry);
|
||||
CREATE INDEX idx_osm_lines_tags ON osm_lines USING GIN(tags);
|
||||
CREATE INDEX idx_osm_polygons_tags ON osm_polygons USING GIN(tags);
|
||||
pip install quackosm[cli] psycopg2-binary pyosmium geoalchemy2 geojson shapely
|
||||
Loading…
Add table
Add a link
Reference in a new issue