From 584b3bd48a4cd1634f25586f1e84ddeb8a925ab0 Mon Sep 17 00:00:00 2001 From: Tom Russell Date: Fri, 9 Jun 2023 17:38:37 +0100 Subject: [PATCH] Format --- README.md | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index a085985..ef5b99d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,6 @@ /ˈsnɪkɪt/ – sounds like [snicket](https://en.oxforddictionaries.com/definition/snicket) (noun, Northern English) A narrow passage between houses; an alleyway. - ## Why use snkit? `snkit` helps tidy spatial network data. @@ -25,36 +24,33 @@ For example: ![Unconnected network](docs/source/_static/unconnected-network.png) `snkit` has methods to: + - add endpoints to each edge - connect nodes to nearest edges - split edges at connecting points - create node and edge ids, and add from_id and to_id to each edge - ### Spatial network The output of a snkit data cleaning process might look something like this: ![Connected network](docs/source/_static/connected-network.png) - #### Nodes -geometry | id | other attributes... ----------|----|-- -`POINT (0.03 0.04)` | node_0 | ... -`POINT (0.03 0.03)` | node_1 | ... -`POINT (0.02 0.03)` | node_2 | ... - +| geometry | id | other attributes... | +| ------------------- | ------ | ------------------- | +| `POINT (0.03 0.04)` | node_0 | ... | +| `POINT (0.03 0.03)` | node_1 | ... | +| `POINT (0.02 0.03)` | node_2 | ... | #### Edges -geometry | id | from_id | to_id | other attributes... ----------|----|---------|-------| -- -`LINESTRING (0.04 -0.04...` | edge_0 | node_10 | node_22 | ... -`LINESTRING (0.01 -0.03...` | edge_1 | node_22 | node_21 | ... -`LINESTRING (0.02 -0.02...` | edge_2 | node_21 | node_25 | ... - +| geometry | id | from_id | to_id | other attributes... | +| --------------------------- | ------ | ------- | ------- | ------------------- | +| `LINESTRING (0.04 -0.04...` | edge_0 | node_10 | node_22 | ... | +| `LINESTRING (0.01 -0.03...` | edge_1 | node_22 | node_21 | ... | +| `LINESTRING (0.02 -0.02...` | edge_2 | node_21 | node_25 | ... | ## Getting started @@ -89,14 +85,12 @@ Run the tests: python -m pytest tests/ - ## Testimonials 💯 👍 😊 > With five lines of snkit I replaced four or five hundred lines of custom code! A. Contented Customer (@czor847) - ## Related projects - [`pysal/spaghetti`](https://pysal-spaghetti.readthedocs.io/en/latest/index.html) has methods @@ -105,7 +99,6 @@ A. Contented Customer (@czor847) visualize street networks from OpenStreetMap, including methods to correct and simplify network topology. - ## Acknowledgements ```