-
Notifications
You must be signed in to change notification settings - Fork 4
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
GTC-3101 Add documentation for a bunch of operations and creation options #617
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,24 +122,60 @@ class RasterTileSetAssetCreationOptions(StrictBaseModel): | |
"when input files are in different projections from each other." | ||
) | ||
) | ||
pixel_meaning: str | ||
pixel_meaning: str = Field( | ||
..., description="Short description of what the pixel value in the " | ||
"raster represents. This is used to clarify the meaning of the raster " | ||
"and distinguish multiple raster tile sets based on the same dataset " | ||
"version." | ||
) | ||
data_type: DataType | ||
nbits: Optional[int] | ||
calc: Optional[str] | ||
nbits: Optional[int] = Field( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to link to the documentation from GDAL in these? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! |
||
None, | ||
description="Advanced option that lets GDAL compress the data even " | ||
"more based on the number of bits you need." | ||
) | ||
calc: Optional[str] = Field( | ||
None, | ||
description="For raster sources or default assets, a raster algebra " | ||
"expression, similar to gdal_calc, to " | ||
"combine multiple raster layers into a new layer. Each source is " | ||
"treated as a separate band, and is assigned a letter variable A-Z " | ||
"based on the order in the sources. This expression can technically be " | ||
"any valid NumPy expression.\n\nFor vector default assets, an SQL " | ||
"expression specifying a calculation that yields the desired raster " | ||
"value based on the fields of your vector dataset." | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think about this reorganization of the text? I tried to make the two different modes more explicit and clarify the part about band variable assignment: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done, took your suggested reorganization, with just slight modifications. Thanks! |
||
band_count: int = 1 | ||
union_bands: bool = False | ||
no_data: Optional[Union[List[NoDataType], NoDataType]] | ||
rasterize_method: Optional[RasterizeMethod] | ||
rasterize_method: Optional[RasterizeMethod] = Field( | ||
RasterizeMethod.value, | ||
description="For raster sources or default assets, 'value' (the " | ||
"default) means use the value from the last or only band processed, " | ||
"and 'count' means count the number of bands with data values." | ||
) | ||
resampling: ResamplingMethod = PIXETL_DEFAULT_RESAMPLING | ||
order: Optional[Order] | ||
order: Optional[Order] = Field( | ||
None, | ||
description="For vector default assets, order the features by the " | ||
"calculated raster value. For 'asc', the features are ordered by " | ||
"ascending calculated value so that the largest calculated value is " | ||
"used in the raster when there are overlapping features. For 'desc', " | ||
"the ordering is descending, so that the smallest calculated value " | ||
"is used when there are overlaps." | ||
) | ||
overwrite: bool = False | ||
subset: Optional[str] | ||
grid: Grid | ||
symbology: Optional[Symbology] = None | ||
compute_stats: bool = True | ||
compute_histogram: bool = False | ||
process_locally: bool = True | ||
auxiliary_assets: Optional[List[UUID]] = None | ||
auxiliary_assets: Optional[List[UUID]] = Field( | ||
None, | ||
description="Asset IDs of additional rasters you might want to include " | ||
"in your calc expression." | ||
) | ||
photometric: Optional[PhotometricType] = None | ||
num_processes: Optional[StrictInt] = None | ||
timeout_sec: Optional[StrictInt] = Field( | ||
|
@@ -331,7 +367,7 @@ class RasterTileCacheCreationOptions(TileCacheBaseModel): | |
"default", | ||
description="Name space to use for raster tile cache. " | ||
"This will be part of the URI and will " | ||
"allow to create multiple raster tile caches per version,", | ||
"allow creation of multiple raster tile caches per version,", | ||
) | ||
symbology: Symbology = Field(..., description="Symbology to use for output tiles") | ||
source_asset_id: str = Field( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should you specify it has to lowercase, spaces instead of underscores, not too long, etc.? Right now you'll just get some regex error response, might be useful to state it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!