Opened 6 years ago

Closed 3 years ago

#3959 closed enhancement (worksforme)

ST_SetM, ST_SetZ, (ST_SetX, ST_SetY?) functions

Reported by: komzpa Owned by: komzpa
Priority: medium Milestone: PostGIS 3.2.0
Component: postgis Version: master
Keywords: Cc:

Description

I have a multipoint that I'd like to assign M to before ST_Collect'ing it with other multipoints and pushing into ST_GeometricMedian.

I see no way to do it without complete deconstruction of geometry into sets of x/y coordinates and building them back with ST_MakePoint with an extra argument.

It would be cool to have ST_SetM (and in other cases ST_SetZ) that will allow getting Z/M value for all objects in geometry from some other calculation/column.

Change History (5)

comment:1 by dbaston, 6 years ago

Could ST_GeometricMedian be made into a multi-column aggregate function, instead of abusing the M ordinate?

This seems like a useful addition regardless.

comment:2 by komzpa, 6 years ago

Milestone: PostGIS 2.5.0PostGIS 3.0.0

comment:3 by robe, 5 years ago

Milestone: PostGIS 3.0.0PostGIS 3.1.0

comment:4 by komzpa, 3 years ago

Milestone: PostGIS 3.1.0PostGIS Fund Me

comment:5 by komzpa, 3 years ago

Milestone: PostGIS Fund MePostGIS 3.2.0
Resolution: worksforme
Status: assignedclosed

This is actually doable via ST_Force3D / ST_Force4D optional arguments now.

Note: See TracTickets for help on using tickets.