OSM Classic and Google Styling with PostGis and Geoserver
1 Get OSM data and prepare PostGIS and Geoserver
see prev post about it
- install CSS-plugin
2 Important - make PostGIS user right able to 'psql'-login
sudo mcedit /etc/postgresql/13/main/pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all osmuser md5
3 Important - tune Geoserver
Increase memory for drawing:
Services -> WMS ->
4 Google-styling Step 1: download styles
5 Google-styling Step 2: execute sql script
Important Script executing needed to perform through 'psql'-util with 'osmuser'-login
psql -U osmuser -W -h localhost -d <database_name> -a -f /home/user/script.sql
6 Google-styling Step 3: Styling now
Connect layers, add styles, create layer group:
7 OSM-Classic styling Step 1: download SLD and Symbols
download sld_symbols.rar 209kb
8 OSM-Classic styling Step 2: install styles
Install SLD styles via Geoserver web-admin interface.
line for lines and roads polygon for polygon
Copy 'symbols' folder to ~/geoserver/data_dir/workspaces/{your_workspace}/styles
9 OSM-Classic styling Step 3: Styling now
Connect layers, add styles, create layer group
See also
prev post about OSM: https://blog.techsample.ru/post/PostGIS-and-OSM-on-Debian
Google-like styles howto https://github.com/fegyi001/osmgwc
SLD styles https://github.com/melbsurfer/osm-geoserver-styles/tree/master/sld
Создано: 05/05/2022 09:05, Изменено: 11/01/2023 15:15, Просмотров: 74
Назад