Skip to content

Enhance Gen-Vx-Mask shapefile masking to support multiple shapes and specify shape metadata. #1060

@dwfncar

Description

@dwfncar

Describe the Enhancement

This issue arose again via dtcenter/METplus#2155. Recommend at least supporting the specification of multiple -shapeno values. That would make the commands for this discussion MUCH easier.

In met-8.0, the gen_vx_mask tool can read shapefiles to define masking regions. The shape to be used is defined by the -shapeno command line option. Suggest making this more user friendly by...

  1. Add support multiple shape numbers being specified. For example -shapeno 1,2 or -shapeno 1 -shapeno 2.
  2. The gis_dump_dbf tool dumps metadata to the screen, including key=value pairs such as:
BASIN_ID = "MBRFC"

Consider adding a command line option to support specifying this metadata, such as:

-shape 'key="BASIN_ID"; val="MBRFC";'

And support multiple values as:

-shape 'key="BASIN_ID"; val="MBRFC,AKRFC";'

If multiple vals are specified for a given key, use all records whose value appears in the list.
If multiple keys are specified, only use records that match all of them.

Note that these 'key = ...; val = ...; settings can be parsed similar to the parse_conf_key_value_map() function. This map should be a mapping of unique ConcatString keys (BASIN_ID) to a StringArray of values (MBRFC,AKRFC,CNRFC).

Be sure to add detailed debug messages to the let the user know what the tool is doing.

Note that this will require reading the .dbf file.

The -shape option is really just a fancy/convenient way of setting the -shapeno setting. If both -shape and -shapeno are specified, use all unique records that are specified.

Time Estimate

Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.

Sub-Issues

Consider breaking the enhancement down into sub-issues.
No sub-issues needed

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required: John HG
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Repository and/or Organization level Project(s) or add alert: NEED CYCLE ASSIGNMENT label
  • Select Milestone as the next official version or Future Versions

Define Related Issue(s)

Consider the impact to the other METplus components.

Enhancement Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.

Metadata

Metadata

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions