Opened 11 years ago

Closed 11 years ago

#2295 closed patch (fixed)

ST_DumpPoints doesn't support curved geometries

Reported by: robe Owned by: nw
Priority: medium Milestone: PostGIS 2.1.0
Component: postgis Version: 2.0.x
Keywords: history Cc:

Description

As noted in #2293 ST_DumpPoints doesn't support curved geometries.

I'm going to slate this for 2.1, even though our 2.0 seems to fail at it our documentation misstated that it works with curves so its either a documentation bug or a feature bug. Would be nice to just think of it as a feature bug (fixed in 2.1) than a documentation bug :).

So I'm marking this as a defect rather than an enhancement so it just has to be fixed before our 2.1 release (not necessarily when we cut beta 1 next week) :).

Nathan, You think you can fix within the next 2 months or so?

Attachments (1)

dumpcurve.patch (3.4 KB ) - added by nw 11 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by robe, 11 years ago

considered a documentation bug in 1.5 ( r11348 ) and 2.0 ( r11347 ) and corrected docs in those.

comment:2 by nw, 11 years ago

Owner: changed from nw@… to nw
Status: newassigned

by nw, 11 years ago

Attachment: dumpcurve.patch added

comment:3 by nw, 11 years ago

I think the attached patch should provide support for dumping circstrings. I looked over the defined geometry types in lwgeom.h, and there are fifteen, ten of those are collection types. Dumppoints now has support for the remaining five directly, and will treat as a collection anything that lwgeom_is_collection() thinks is one. In other words, unless I have missed something, ST_DumpPoints should now produce reasonable results for all geometry types. Geography types are still not supported, but you could cast to geom first.

I changed the regression tests as appropriate. I will eventually submit a more comprehensive dumppoints test suite, but I don't know when I will get to that.

comment:4 by robe, 11 years ago

thanks I'll apply and test thru garden test again to see if I run into any more issues.

comment:5 by robe, 11 years ago

Type: defectpatch

patch committed at r11349

comment:6 by robe, 11 years ago

Keywords: history added

okay partially supports now. I assume it doesn't support compound curves. just need to note that in docs I think.

comment:7 by nw, 11 years ago

Huh?

postgis_reg=# select path,st_astext(geom) from st_dumppoints('COMPOUNDCURVE(CIRCULARSTRING(0 0, 1 1, 1 0),(1 0, 0 1))'::geometry);

path | st_astext


{1,1} | POINT(0 0) {1,2} | POINT(1 1) {1,3} | POINT(1 0) {2,1} | POINT(1 0) {2,2} | POINT(0 1)

(5 rows)

postgis_reg=#

comment:8 by robe, 11 years ago

Resolution: fixed
Status: assignedclosed

oh so it completely supports :)

I didn't check I just thought you said you didn't have it fully implemented. I'll consider this done then.

Note: See TracTickets for help on using tickets.