[postgis-users] NumInteriorRing(s) ?
Markus Schaber
schabi at logix-tt.com
Tue Jan 10 08:40:05 PST 2006
Hi, Paul,
Paul Ramsey wrote:
> In any event, we should support the "officially mis-spelled" version as
> well in order to be *completely* true to the spec.
I just committed the attached patch to HEAD adding the mis-spelled
variant and documenting this fact.
Schabi
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org
-------------- next part --------------
? numintrings.diff
Index: CHANGES
===================================================================
RCS file: /home/cvs/postgis/postgis/CHANGES,v
retrieving revision 1.176
diff -u -r1.176 CHANGES
--- CHANGES 9 Jan 2006 12:17:09 -0000 1.176
+++ CHANGES 10 Jan 2006 16:28:07 -0000
@@ -2,6 +2,7 @@
- Source code cleanups
- Solaris 2.7 and MingW support improvements
+ - added NumInteriorRing() alias due to OpenGIS ambiguity
PostGIS 1.1.0
2005/12/21
Index: doc/postgis.xml
===================================================================
RCS file: /home/cvs/postgis/postgis/doc/postgis.xml,v
retrieving revision 1.197
diff -u -r1.197 postgis.xml
--- doc/postgis.xml 31 Dec 2005 15:11:41 -0000 1.197
+++ doc/postgis.xml 10 Jan 2006 16:28:11 -0000
@@ -3457,6 +3457,16 @@
</varlistentry>
<varlistentry>
+ <term>NumInteriorRing(geometry)</term>
+
+ <listitem>
+ <para>Synonym to NumInteriorRings(geometry). The OpenGIS specs
+ are ambigous about the exact function naming, so we provide
+ both spellings.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>InteriorRingN(geometry,integer)</term>
<listitem>
Index: lwgeom/lwpostgis.sql.in
===================================================================
RCS file: /home/cvs/postgis/postgis/lwgeom/lwpostgis.sql.in,v
retrieving revision 1.151
diff -u -r1.151 lwpostgis.sql.in
--- lwgeom/lwpostgis.sql.in 9 Jan 2006 12:56:54 -0000 1.151
+++ lwgeom/lwpostgis.sql.in 10 Jan 2006 16:28:14 -0000
@@ -3036,6 +3036,11 @@
AS '@MODULE_FILENAME@','LWGEOM_numinteriorrings_polygon'
LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
+CREATEFUNCTION NumInteriorRing(geometry)
+ RETURNS integer
+ AS '@MODULE_FILENAME@','LWGEOM_numinteriorrings_polygon'
+ LANGUAGE 'C' _IMMUTABLE_STRICT; -- WITH (isstrict);
+
CREATEFUNCTION InteriorRingN(geometry,integer)
RETURNS geometry
AS '@MODULE_FILENAME@','LWGEOM_interiorringn_polygon'