update nodata docs to show cell type conversion behavior and aggregations#230
Conversation
Signed-off-by: Eric Culbertson <eculbertson@astraea.io>
Signed-off-by: Eric Culbertson <eculbertson@astraea.io>
Signed-off-by: Eric Culbertson <eculbertson@astraea.io>
Signed-off-by: Eric Culbertson <eculbertson@astraea.io>
vpipkt
left a comment
There was a problem hiding this comment.
Great contributions. I have a few minor wording things to pick on and a few things to perhaps simplify the code examples.
| It's also nice to view a sample. | ||
|
|
||
| ```python show_masked | ||
| ```python |
There was a problem hiding this comment.
I like the chunk labels, they are somewhat helpful for interactive builds
But I suspect this is a response to #227 ....
There was a problem hiding this comment.
Right yeah I removed them because the text pyweave generates when calling display. I don't know the best way to handle that for now.
|
|
||
| ```python | ||
| masked_rf.select(rf_tile_sum('tile'), rf_tile_sum('tile_nd_1'), rf_tile_sum('tile_nd_2')).show() | ||
| ``` |
There was a problem hiding this comment.
It would be worthwhile to perhaps add a level 3 header ### differentiating the Tile Aggregate, DataFrame Aggregate, and Local Aggregate behaviors. Here you have done Tile Agg, could expand to include the other 2 or just point to the aggreagation.md docs page
Another thought here it may be worth working through the artithmetic for one of the cases to show the reader how to work out the expected sum. it's a block of 25*100 * value for each, right.
FWIW also there is a new section we could add about ND in local algebra; the bug #229 is now fixed to rf_local_add(t1, t2) will work like d + nd = nd.
There was a problem hiding this comment.
The code in that comment can be used as the example in the documentation.
There was a problem hiding this comment.
@vpipkt I added back the section with the local sum and NoData. I'd like you to check to make sure that sum is working correctly.
| rf_added.select(rf_cell_type('xy_sum'), rf_cell_type('y'), rf_cell_type('x')).distinct().show() | ||
| ``` | ||
|
|
||
| Combining tile columns of different cell types gets a little trickier when user defined NoData cell types are involved. Let's create 3 tile columns: one without a defined NoData value, one with a NoData value of 1, and one with a NoData value of 2. |
There was a problem hiding this comment.
the first tile you should say one with the "default NoData value of zero" versus wihtout defined NoData. It's the distinction between uint16 (has nodata, nodata value is 0) and uint16raw (does not have a nodata) .
There was a problem hiding this comment.
My understanding is the int16 does not have a NoData value of 0, while uint16 does
There was a problem hiding this comment.
Oh but that function makes tiles with uint16 nvm
There was a problem hiding this comment.
@vpipkt I changed this section to remove the confusing between uint16 and int16.
| .withColumn('x_nd_2', rf_convert_cell_type('x', get_nodata_ct(2))) | ||
| ``` | ||
|
|
||
| Let's try adding the tile column without a defined NoData value to a tile column with a defined NoData value. When there is an inconsistent NoData value in the two columns, the NoData value of the right-hand side of the sum is kept. In this case, this means the result has no defined NoData value. |
There was a problem hiding this comment.
again let's be careful with wording around "no defined NoData" versus "default NoData" ... if you're confused about it you can always use the CellType() methods has_no_data and no_data_value.
There was a problem hiding this comment.
@vpipkt I believe I made the wording more clear.
Signed-off-by: Jason T. Brown <jason@astraea.earth>
Signed-off-by: Eric Culbertson <eculbertson@astraea.io>
Signed-off-by: Eric Culbertson <eculbertson@astraea.io>
|
@emc5ud when you get all your changes like you like, just ping me or re-request review |
… NoData Signed-off-by: Eric Culbertson <eculbertson@astraea.io>
Signed-off-by: Jason T. Brown <jason@astraea.earth>
Signed-off-by: Eric Culbertson eculbertson@astraea.io