A user would like to perform machine learning against an area. They provide an area and the service responds with
1. Available machine learning features for that area: i.e.
* Building Count
* Building Area
* Building Shapes
2. Estimated time to produce requested output
3. Output formats for result.
- TMS
- Vector Tiles
- GeoJson
- Cloud Optimized GeoTiff
Test Location 1: SpaceNet Area of Interest Las Vegas
* s3://spacenet-dataset/AOI_2_Vegas/srcData/rasterData/AOI_2_Vegas_MUL-PanSharpen_Cloud.tif
* s3://spacenet-dataset/AOI_2_Vegas/srcData/rasterData/AOI_2_Vegas_PAN_Cloud.tif
* s3://spacenet-dataset/AOI_2_Vegas/srcData/rasterData/AOI_2_Vegas_MUL_Cloud.tif
* s3://spacenet-dataset/AOI_2_Vegas/resultData/AOI_2_Vegas_MULPS_v13_cloud.tiff
* s3://spacenet-dataset/AOI_2_Vegas/resultData/AOI_2_Vegas_MULPS_v13.geojson
* s3://spacenet-dataset/AOI_2_Vegas/resultData/AOI_2_Vegas_MULPS_v13.mbtiles
Example to pull tiles from COG GeoTIFF
from rio_tiler import main
import mercantile
address = "s3://spacenet-dataset/AOI_2_Vegas/resultData/AOI_2_Vegas_MULPS_v13_cloud.tiff"
# -115.24, 36.1, -115.2, 36.2, 17)
tile_coords = mercantile.tile(-115.24, 36.1986, 18)
tile, mask = main.tile(address,
tile_coords.x,
tile_coords.y,
tile_coords.z
)
1. Create ML-Tile List = 12*z19 Tile (1024pix x 1024 pix tiles) with 1 z19 tile overlap (25% overlap)
2. Pass new ML-Tile to ML-Algorithm:
3. Recieve ML-Algorithm output:
* PNG:
* Band 1: RasterTile_Building_Center
* Band 2: RasterTile_Building_Edge (Optional)
* Threshold_Point: (0,1)
* VectorTile: (Vector Tile)
4. Combine ML-Algorithm output:
* Cloud Optimized GeoTiff
Band 1: RasterTile_Building_Center
Band 2: RasterTile_Building_Edge (Optional)
GEOTIFF_TAG: Threshold_Value
* GeoJSON
* VectorTile: Z18
* RasterTile: Z18
## input:
* List of JSON:
[{'imageId': imageId,
'imageLoc': https://bucket-in/z/x/y.png,
'dst_raster': https://bucket-out/z/x/y.png,
'dst_vector': {https://bucket-out/z/x/y.json,
}]
image tile for imageLoc should return a:
12 * z19 resolution (z17 scope):
|x-2,y-2|x-1,y-2|x+1,y-2|x+2,y-2|
|x-2,y-1|x-1,y-1|x+1,y-1|x+2,y-1|
|x-2,y+1|x-1,y+1|x+1,y+1|x+2,y+1| = (1024x1024 pixel 3-Band png 8 bit jpeg) = Z18 x 4x SR Tile
|x-2,y+2|x-1,y+2|x+1,y+1|x+2,y+2|
## output:
* 1024x1024 x 2 bands
Band 1: RasterTile_Building_Center
Band 2: RasterTile_Building_Edge (Optional)
GEOTIFF_TAG: Threshold_Value
* 1024 x 1024 Vector Tile
* geojson: Pixel Coordinates
- Estimated Time for Production {x seconds/tile}
- Accuracy {Precision/Recall, Mean Error)
- Resolution Required {zoomTile, GSD}
- Output Resolution {zoomTile, GSD}
- Features {'Building Count', 'Building Area', 'Building Bounding Box', 'Building Instance Segmentation'}
- Region Trained: {STAC_Item}
- Test Data:
- src docker container
* endpoint/getmodels
* report registered models
* endpoint/getmodelcapability/{modelname}
* report key pieces above
* endpoint/estimate/{modelname, geobox, datasource}
* report estimated time of completion (Days/Hours/Minutes)
* report estimated cost
* endpoint/status/{processid}
* report process status
* report estimated completion
* endpoint/orderexport/orderid/tms/{x}/{y}/{z}.png
* endpoint/orderexport/orderid/vectortile/{x}/{y}/{z}.pbf
* endpoint/orderexport/{modelversion, geobox, datasource}
* return orderId for status
* endpoint/{modelid}/{x}/{y}/{z}.pbf
* return vector tile for specified model request
* endpoint/{modelid}/{x}/{y}/{z}.png
* return raster tile for specified model request
* endpoint/{modeljson}}
* register new model