-
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
Conversation
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.
Some small comments but otherwise looks good, thanks for doing this!
@@ -122,24 +122,60 @@ class RasterTileSetAssetCreationOptions(StrictBaseModel): | |||
"when input files are in different projections from each other." | |||
) | |||
) | |||
pixel_meaning: str | |||
pixel_meaning: 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!
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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
"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 comment
The 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 are two modes for this field, one for rasterizing vector sources and one for transforming one or more sources that are already raster. For rasterizing vector sources, this field should be an SQL expression that yields the desired raster value (presumably) based on the fields of your vector dataset. For raster sources, this should be a raster algebra expression, similar to that provided to gdal_calc, that transforms one or more input bands into one or more output bands. For use in this expression, each band in the sources is assigned an alphabetic variable (A-Z, then AA-AZ, etc.) in the order it exists in those sources, with those of the first source first, continuing with those of the second, and so on. So with two input sources of two bands each, they would be assigned to variables A and B (for the first source) and C and D (for the second source). NumPy is in scope, as np.
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, took your suggested reorganization, with just slight modifications. Thanks!
This is wonderful, thanks for doing it, Dan! |
Also added documentation for the 'indices' option of VectorSourceCreationOptions.
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #617 +/- ##
========================================
Coverage 81.07% 81.07%
========================================
Files 130 130
Lines 5876 5876
========================================
Hits 4764 4764
Misses 1112 1112
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Merge develop into master (PR #617 - improve documentation)
GTC-3101 Add documentation for a bunch of operations and creation options
I put in doc lines for the most common options/operations that I use that are missing documentation.
Suggestions/corrections welcome!
If anyone can comment on the exact semantics of band_count and union_bands (and when they apply), I'd be happy to add documentation for those options as well.