Skip to content

Commit 92143d9

Browse files
committed
Add more docs
1 parent 082df22 commit 92143d9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Before running any commands, it is necessary to create a `config.json` file to s
4747
- `imagery`: One of:
4848
- A template string for a tiled imagery service. Note that you will generally need an API key to obtain images and there may be associated costs. The above example requires a [Mapbox access token](https://www.mapbox.com/help/how-access-tokens-work/)
4949
- A GeoTIFF file location. Works with both local and remote files. Ex: `'http://oin-hotosm.s3.amazonaws.com/593ede5ee407d70011386139/0/3041615b-2bdb-40c5-b834-36f580baca29.tif'`
50+
- A WMS endpoint `GetMap` request. Fill out all necessary parameters except `bbox` which should be set as `{bbox}`. Ex:
51+
`'https://basemap.nationalmap.gov/arcgis/services/USGSImageryOnly/MapServer/WMSServer?SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.1&LAYERS=0&STYLES=&FORMAT=image%2Fjpeg&TRANSPARENT=false&HEIGHT=256&WIDTH=256&SRS=EPSG%3A3857&BBOX={bbox}'`
5052
- `background_ratio`: For single-class classification problems, we need to download images with no matching class. We will download `background_ratio` times the number of images matching the one class.
5153
- `ml_type`: One of `"classification"`, `"object-detection"`, or `"segmentation"`. For the final label numpy arrays (`y_train` and `y_test`), we will produce a different label depending upon the `type`.
5254
- `"classification"`: An array of the same length as `classes`. Each array value will be either `1` or `0` based on whether it matches the class at the same index

label_maker/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ def get_tile_tif(tile, imagery, folder, imagery_offset):
8989
def get_tile_wms(tile, imagery, folder, imagery_offset):
9090
"""
9191
Read a WMS endpoint corresponding to a TMS tile
92+
93+
Converts the tile boundaries to the spatial reference system (SRS) specified
94+
by the WMS query parameter.
9295
"""
9396
query_dict = parse_qs(imagery)
9497
image_format = query_dict['format'][0].split('/')[1]

0 commit comments

Comments
 (0)