Opened 13 years ago

Closed 8 years ago

#1768 closed enhancement (fixed)

ST_Normalize

Reported by: strk Owned by: strk
Priority: medium Milestone: PostGIS 2.3.0
Component: postgis Version: master
Keywords: Cc: nw

Description

It may be useful to have a function reordering items inside a GEOMETRY in a predictable way so to be immune to ordering changes that do not affect point-set composition.

Such a function is available in GEOS though the C-API.

Change History (12)

comment:1 by robe, 12 years ago

Owner: changed from pramsey to strk

strk - are you going to do this or punt?

comment:2 by strk, 12 years ago

Milestone: PostGIS 2.1.0PostGIS Future

punt

comment:3 by nw, 12 years ago

Cc: nw added

There's a function in GEOS

extern int GEOS_DLL GEOSNormalize(GEOSGeometry* g1);

But no documentation on what it actually does, except for the following from the C++ api reference:

Converts this Geometry to normal form (or canonical form).

Which is not really helpful. However, if this function is what is wanted, it would be pretty easy to expose it to the SQL layer.

comment:4 by strk, 12 years ago

It's useful to compare expected/obtained result in tests, in case the implementation changes order of vertices. Not urgent at all.

comment:5 by nw, 12 years ago

What I meant was I can't tell from the documentation if the GEOSNormalize() function actually does what this ticket is requesting. I don't know if "normal form (or canonical form)" is the same as "reordering items inside a GEOMETRY in a predictable way so to be immune to ordering changes that do not affect point-set composition".

comment:6 by strk, 12 years ago

That's what GEOSNormalize does, yes.

comment:7 by robe, 12 years ago

Milestone: PostGIS FuturePostGIS 2.2.0

comment:8 by strk, 10 years ago

Milestone: PostGIS 2.2.0PostGIS Future

comment:9 by strk, 8 years ago

Milestone: PostGIS FuturePostGIS 2.3.0

lwgeom_normalize is also present in liblwgeom. I'm on this, will be in 2.3.0

comment:10 by strk, 8 years ago

Resolution: fixed
Status: newclosed

In 14949:

Add ST_Normalize function

Includes tests and documentation

Closes #1768

comment:11 by robe, 8 years ago

Resolution: fixed
Status: closedreopened

The docs have ST_Normalized in the function def which is breaking the builds. Since the function should be ST_Normalize.

So getting:

psql:/var/lib/jenkins/workspace/postgis/branches/2.3/regress/00-regress-install/share/contrib/postgis/postgis_comments.sql:314: ERROR: function st_normalized(geometry) does not exist

comment:12 by strk, 8 years ago

Resolution: fixed
Status: reopenedclosed

In 14951:

Fix typo in documentation

Closes #1768 again

Note: See TracTickets for help on using tickets.