Skip to content
On this page

geos.GEOSNormalize ⇒ number

Normalizes a GEOS geometry object in place, so that it has a canonical form. A normalized geometry has points in a LineString deduplicated, members of a collection sorted by type, points in a polygon's rings or a single LinearRing start at the top-left-most point and go clockwise, etc. This can be useful for unit testing or geometry deduplication.

Kind: Exported member
Returns: number - 0 on success, or -1 on exception.
See: https://libgeos.org/doxygen/geos__c_8h.html#a5a7f0c9b3f9a1d0f4e5c2a7b5b3e6a8d

ParamTypeDescription
gnumberThe GEOS geometry object to normalize.

geos.GEOSNormalize_r ⇒ number

Normalizes a GEOS geometry object in place, so that it has a canonical form (thread-safe version). A normalized geometry has points in a LineString deduplicated, members of a collection sorted by type, points in a polygon's rings or a single LinearRing start at the top-left-most point and go clockwise, etc. This can be useful for unit testing or geometry deduplication.

Kind: Exported member
Returns: number - 0 on success, or -1 on exception.
See: https://libgeos.org/doxygen/geos__c_8h.html#a5a7f0c9b3f9a1d0f4e5c2a7b5b3e6a8d

ParamTypeDescription
handlenumberA pointer to the GEOS context handle.
gnumberThe GEOS geometry object to normalize.