Opened 12 years ago

Closed 6 years 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: main
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 12 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by robe, 6 years ago

Milestone: GEOS FutureGEOS Fund Me

Milestone renamed

comment:2 by robe, 6 years ago

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 by robe, 6 years ago

Owner: changed from pramsey to robe

comment:4 by darkpanda, 6 years ago

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 by robe, 6 years ago

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

comment:8 by Regina Obe <lr@…>, 6 years ago

Resolution: fixed
Status: newclosed

In fd24ab4/git:

Add J Smith to credits. Closes #581

Note: See TracTickets for help on using tickets.