Repository navigation
Improve support for categorical CPTs - #4446
Merged
Merged
Conversation
We recently made it simpler to add CPT labels via -F+c. Now, we use a similar mechanism to add string keys to replace numerical look up values for cateborical CPTs via -F+kkeys. A few more checks on the number of labels and keys were added as well. Fixed the bug where a categorical request for -T1/n/1 did not include n.
weiji14
reviewed
Nov 12, 2020
joa-quim
reviewed
Nov 12, 2020
Contributor
Author
|
Please give this another look and hopefully approve. |
joa-quim
approved these changes
Nov 13, 2020
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.
Description of proposed changes
See this forum post for one aspect of this PR.
This PR does two things:
Like +c for categorical labels, +k can create sequential keys (such as G, H, I, ...) if just given one letter, it can read a list of keys from the file keys, or it is decoded as a comma-separated list of keys.
To make a categorical cpt for use with plot to plot polygons what have multi-segment headers with -Z entries A, B, or C that stands for wood, water, gold, one can run
for a suitable CPT.