Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc updates for cli defaults #44

Merged
merged 6 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions docs/osmox_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ docker build -t "osmox" .
Once you have built the image, the only thing you need to do is add the path to the folder where your inputs are stored to the command, in order to mount that folder (i.e. give the container access to the data in this folder):

```shell
docker run -v DATA_FOLDER_PATH:/MOUNT_PATH osmox CONFIG_PATH INPUT_PATH OUTPUT_NAME -crs epsg:27700 -l
docker run -v DATA_FOLDER_PATH:/MOUNT_PATH osmox CONFIG_PATH INPUT_PATH OUTPUT_NAME -f geopackage -crs epsg:27700 -l
```

For example, if your input data and config is stored on your machine in `/Users/user_1/mydata`, and this is also the directory where you wish to place the outputs:

```shell
docker run -v /Users/user_1/mydata:/mnt/mydata osmox /mnt/mydata/example_config.json /mnt/mydata/isle-of-man-latest.osm.pbf isle-of-man -crs epsg:27700 -l
docker run -v /Users/user_1/mydata:/mnt/mydata osmox /mnt/mydata/example_config.json /mnt/mydata/isle-of-man-latest.osm.pbf example/isle-of-man -f geopackage -crs epsg:27700 -l
```

## Options
Expand All @@ -43,6 +43,8 @@ This can make simple mapping of outputs quite complex, as there are many possibl
To work around this problem, the optional flag `-s` or `--single_use` may be set to instead output unique objects for each activity.
For example, for the above case, extracting two identical buildings, one with `activity: "eating"` and the other with `activity: "shopping"`.

Writing to multiple file formats is supported. The default is geopackage (`.gpkg`), with additional support for `.geojson` and `.parquet`.
val-ismaili marked this conversation as resolved.
Show resolved Hide resolved

## Output

After running `osmox run <CONFIG_PATH> <INPUT_PATH> <OUTPUT_NAME>` you should see something like the following (slowly if you are processing a large map) appear in your terminal:
Expand All @@ -69,17 +71,17 @@ INFO:osmox.main: Assigning distances to nearest shop.
Progress: |██████████████████████████████████████████████████| 100.0% Complete
INFO:osmox.main: Assigning distances to nearest medical.
Progress: |██████████████████████████████████████████████████| 100.0% Complete
INFO:osmox.main: Writing objects to: suffolk2/suffolk_epsg_27700.geojson
INFO:osmox.main: Writing objects to: suffolk2/suffolk_epsg_27700.gpkg
INFO:osmox.main: Reprojecting output to epsg:4326 (lat lon)
INFO:osmox.main: Writing objects to: suffolk2/suffolk_epsg_4326.geojson
INFO:osmox.main: Writing objects to: suffolk2/suffolk_epsg_4326.gpkg
INFO:osmox.main:Done.
```

Once completed, you will find OSMOX has output file(s) in `geojson` format in the same folder as the OSM input file.
If you have specified a CRS, you will find two output files, named as follows:

1. `<OUTPUT_NAME>_<specified CRS name>.geojson`
2. `<OUTPUT_NAME>_epsg_4326.geojson`
1. `<OUTPUT_NAME>_<specified CRS name>.gpkg`
2. `<OUTPUT_NAME>_epsg_4326.gpkg`

We generally refer to the outputs collectively as `facilities` and their properties as `features`.
Note that each facility has a unique id, a number of features (depending on the configuration) and a point geometry.
Expand Down
6 changes: 3 additions & 3 deletions docs/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ First download `isle-of-man-latest.osm.pbf` from [geofabrik](https://download.ge
Then run:

```sh
osmox run configs/example.json example/isle-of-man-latest.osm.pbf isle-of-man -crs epsg:27700 -l
osmox run configs/example.json example/isle-of-man-latest.osm.pbf example/isle-of-man -f geopackage -crs epsg:27700 -l
```

After about 30 seconds, you should find the outputs in geojson format in the same `example` directory as your OSM input file.
The geojson file contains locations for the extracted facilities, and each facility includes a number of features with coordinates given in WGS-84 (EPSG:4326) coordinate reference system (CRS), so that they can be quickly inspected using [geopandas](https://geopandas.org/en/stable) or equivalent.
After about 30 seconds, you should find the outputs in `.gpkg` format in the same `example` directory as your OSM input file.
The geopackage file contains locations for the extracted facilities, and each facility includes a number of features with point geometry in the specified crs. If the user specifies a crs other than WGS-84 (EPSG:4326) coordinate reference system (CRS), OSMOX will write an additional file in WGS-84 (EPSG:4326) so that this can be quickly inspected.

`-l` is short for `--lazy` which helps osmox run a little faster.

brynpickering marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading