Opened 6 years ago

Closed 6 months ago

#581 closed enhancement (fixed)

Expose getZ to the CAPI via GEOSGeomGetZ

Reported by: darkpanda Owned by: robe
Priority: minor Milestone: 3.7.0
Component: C API Version: master
Severity: Unassigned Keywords: patch
Cc:

Description

I was trying to access a point's z value in the CAPI and noticed that there's no GEOSGeomGetZ function, so I figured I'd have a go at implementing it. Patch attached, along with some tests.

One thing to consider is that the function returns NaN on 2d points. Is this optimal, or should perhaps 0 be returned?

Attachments (1)

0001-Expose-getZ-to-the-CAPI-via-GEOSGeomGetZ.patch (5.8 KB) - added by darkpanda 6 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 6 months ago by robe

Milestone: GEOS FutureGEOS Fund Me

Milestone renamed

comment:2 Changed 6 months ago by robe

Keywords: patch added
Milestone: GEOS Fund Me3.7.0

I'm surprised we don't have this function already but checke dand it seems we still don't.

Is there a reason for that?

For now I'll move to 3.7 and look at the patch to see if it can be applied more or less cleanly.

comment:3 Changed 6 months ago by robe

Owner: changed from pramsey to robe

comment:4 Changed 6 months ago by darkpanda

I just rebased the patch off of master and it applied, a simple merge conflict notwithstanding. I can post the updated patch here or open a PR on gitea if you'd like.

comment:5 Changed 6 months ago by robe

Which ever is easier for you. I'll probably quickly test on my fork before I commit.

comment:8 Changed 6 months ago by Regina Obe <lr@…>

Resolution: fixed
Status: newclosed

In fd24ab4/git:

Add J Smith to credits. Closes #581

Note: See TracTickets for help on using tickets.