Skip to content

pygmt.grdmask: Create mask grid from polygons or point coverage(required arguments)#4463

Open
Chuan1937 wants to merge 76 commits intomainfrom
grdmask1
Open

pygmt.grdmask: Create mask grid from polygons or point coverage(required arguments)#4463
Chuan1937 wants to merge 76 commits intomainfrom
grdmask1

Conversation

@Chuan1937
Copy link
Member

Replace #4428

Chuan1937 and others added 30 commits February 25, 2026 20:55
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@Chuan1937 Chuan1937 self-assigned this Mar 21, 2026
@Chuan1937 Chuan1937 added the feature Brand new feature label Mar 21, 2026
@Chuan1937 Chuan1937 added this to the 0.19.0 milestone Mar 21, 2026
@Chuan1937 Chuan1937 linked an issue Mar 21, 2026 that may be closed by this pull request
26 tasks
@Chuan1937 Chuan1937 moved this to Ongoing maintenance in PyGMT: Wrapping GMT modules Mar 21, 2026
Chuan1937 and others added 7 commits March 22, 2026 18:40
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Chuan1937 and others added 3 commits March 22, 2026 19:38
>>> parse(inside="id", id_start=5)
'p5'
>>> parse(edge="id", inside="id", id_start=10)
'P10'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a test for

parse(edge="id", id_start=5, outside=3)

Comment on lines +78 to +83
if not isinstance(id_start, int) or isinstance(id_start, bool) or id_start < 0:
raise GMTValueError(
id_start,
description="id_start",
reason="Must be a non-negative integer.",
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested that id_start can be floating-point numbers and can also be negative.

Suggested change
if not isinstance(id_start, int) or isinstance(id_start, bool) or id_start < 0:
raise GMTValueError(
id_start,
description="id_start",
reason="Must be a non-negative integer.",
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Brand new feature

Projects

Status: Ongoing maintenance

Development

Successfully merging this pull request may close these issues.

pygmt.grdmask: Create mask grid from polygons or point coverage

2 participants