Skip to content

Commit

Permalink
docs: info about visual testing using geojson.io
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Feb 8, 2024
1 parent fe87c73 commit 3fb98ea
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,21 @@ fmtm-splitter -v -b AOI -s PG:colorado
- fmtm-splitter scripts can be used via the pre-built container images.
- These images come with all dependencies bundled, so are simple to run.
- They do however require a database, to in this case we use docker compose.
Run a specific command:
```bash
docker run --rm -v $PWD:/data ghcr.io/hotosm/fmtm-splitter:latest fmtm-splitter <flags>
docker compose run --rm splitter fmtm-splitter <flags>
```
Run interactively (to use multiple commands):
```bash
docker run --rm -it -v $PWD:/data ghcr.io/hotosm/fmtm-splitter:latest
docker compose run -it splitter bash
fmtm-splitter
```
> Note: the output directory should always be /data/... to persist data.
> Note: the `output` directory in this repo is mounted in the container
> to `/data/output`. To persist data, input and output should be placed here.
24 changes: 24 additions & 0 deletions docs/testing-visually.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Testing FMTM Splitter Visually

Sometimes a GeoJSON printed to the terminal just doesn't cut it...

If you wish to view the split data output in a more visual way:

## Option 1: GeoJSON.io

1. Generate a geojson bbox via [geojson.io](https://geojson.io)
2. Copy the content into `output/input.geojson` in this repo.
3. Create a data extract and place inside `output/extract.geojson`.
4. Run the splitting algorithm:

```bash
docker compose run --rm splitter fmtm-splitter \
--boundary output/input.geojson \
--extract output/extract.geojson \
--outfile output/output.geojson \
--number 50
```

5. Copy the data from `output/output.geojson` to geojson.io to visualise.

## Option 2: FMTM
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ nav:
- About: about.md
- Usage: usage.md
- API: api.md
- Testing Visually: testing-visually.md
- License: LICENSE.md
- Code of Conduct: https://docs.hotosm.org/code-of-conduct
- Changelog: CHANGELOG.md
Expand Down

0 comments on commit 3fb98ea

Please sign in to comment.