update README and docs

main
Motiejus Jakštys 2021-05-19 23:09:05 +03:00 committed by Motiejus Jakštys
parent 696a1c268b
commit 657461b818
2 changed files with 32 additions and 17 deletions

View File

@ -1,13 +1,20 @@
WangMüller algorithm in PostGIS
--------------------------------
This is a work-in-progress implementation following "Line generalization based
on analysis of shape characteristics" by Wang and Müller, 1998.
This is WangMüller line generalization algorithm implementation in PostGIS.
Following "Line generalization based on analysis of shape characteristics" by
the same author, 1998.
Status
------
It mostly works. Read `mj-msc-full.pdf` for visual examples and possible
gotchas.
Structure
---------
There will be 2 deliverables from this folder:
There are be 2 deliverables:
- `wm.sql`, the implementation.
- paper `mj-msc-full.pdf`, a MSc thesis, explaining it.
@ -49,6 +56,10 @@ To execute the algorithm, run:
data source (e.g. use a different country instead of Lithuania) by changing
the `Makefile` and the test files. Left as an exercise for the reader.
N.B. the `make test-rivers` fails (see `test-rivers.sql`), because with higher
`dhalfcircle` values, the unionized river (`salvis`) is going on top of itself,
making the resulting geometry invalid.
Building the paper (pdf)
------------------------
@ -57,24 +68,19 @@ Building the paper (pdf)
```
`mj-msc.tex` results in `mj-msc-full.pdf`, which will be at some point
published. It needs quite a few dependencies, including a functioning Docker
environment, postgresql client, geopandas, pygments, osm2pgsql, poppler, and a
"quite extensive" LaTeX installation. This was tested on Debian 11.
published to this repo. It needs quite a few dependencies, including a
functioning Docker environment, postgresql client, geopandas, pygments,
osm2pgsql, poppler, and a "quite extensive" LaTeX installation. Tested on
Debian 11.
Contributing
------------
Please reach out to me before contributing. As of writing, this is not ready to
accept broader contributions, TODO:
- [x] Elimination operator.
- [x] Exaggeration operator.
- [ ] Combination operator.
- [ ] CI (unlikely to happen).
- [x] Known bug in `wm_self_crossing`: the program crashes with a river in
Lithuania.
This repository is frozen and will not accept contributions. Please fork it.
If fork has improved the algorithm substantially, feel free to ping me, I will
link to it in this README.
License
-------
GPL 2.0 or later, same as PostGIS.
GPLv2 or later.

View File

@ -1,7 +1,16 @@
\set ON_ERROR_STOP on
SET plpgsql.extra_errors TO 'all';
-- This fails with real rivers since dcf4c02307baeece51470a961a113a8fad68fad5
-- This fails with real rivers since this:
-- commit dcf4c02307baeece51470a961a113a8fad68fad5
-- Merge: 44ee741 3638033
-- Author: Motiejus Jakštys <motiejus@uber.com>
-- Date: Tue May 11 20:29:41 2021 +0300
--
-- Merge branch 'gdb10lt'
--
-- This breaks "test-rivers" for Nemunas.
--
-- (adding GDB10LT data). The same rivers from OpenStreetMaps work.
-- There seems to be a bug in wm_exaggeration.