Consolidate clipping parameters handling in a helper function#45
Merged
Conversation
- added `clipper_scale_factor` to Dggs class
This reverts commit 693cf8b. The fix is not done correctly according to allixender#44 (comment)
- followed the suggestion from allixender#44 (comment) - added the helper function `specify_clip_setting` to handle clip[per] related metafile settings. - But it failed the test case `test_cells_for_geo_points` with cell_ids_only=False.
- fixed the input_address_type is None in `cells_for_geo_points` when the original `output_address_type` is None and zone_id_only is False - changed the value of rf_level_scalefactor dictionary to string instead of int - added test cases for the clipped_scale_factor
-changed the helper function name from `specify_clip_setting` to `specify_clip_settings`
- change the type of clip_geom from AnyGeometry to "AnyGeometry"
- grouped the handling of clip_subset_type under an if block - moved the clipper_scale_factor under the if block - removed the TYPE_CHECKING for AnyGeometry - changed to use AnyGeometery dtype, instead of "AnyGeometry"
bugfix syntax error when using the dictionary get.
…_handling_in_helper_function
- if "clipper_scale_factor" is specified in the conf_extra, it should included in the clip_metafile_settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary :
specify_clip_settingsto consolidate clipping parameters handling in eachgrid_cell_xxxfunction,grid_cellids_for_extentandcells_for_geo_pointsat one place.clipper_scale_factoris added according to the resolution (above 16)clipper_scale_factorcomes from a static dictionary; those values come from the checking onDGGRIDby @fmigneault in the issue The number of zones generated of IGEO7 at refinement level 18 doesn't matched with expected. sahrk/DGGRID#97 (comment):Related issue in DGGRID:
sahrk/DGGRID#97 (comment)