Name
ST_InteriorRingN — Given a 1-based index of an interior ring of a polygon, returns the ring. Wrong index is not reported as an error and NULL is returned.
Synopsis
ST_InteriorRingN
(
|
in poligon any , |
in
idx
any
) ; |
Description
Given a 1-based index of an interior ring of a polygon, returns the ring. Wrong index is not reported as an error and NULL is returned.
Parameters
poligon
A given poligon of a type shape.
idx
Index.
Return Types
Returns any.
Examples
Example 24.664. Simple Use
SQL> select ST_InteriorRingN (st_ewkt_read ('POLYGON((1 3,2 4,1 5,0 4,1 3),(1 3.5,1.5 4,1 4.5,0.5 4,1 3.5))'), 1) unnamed VARCHAR NOT NULL _______________________________________________________________________________ RING(1.0 3.500000,1.500000 4.0,1.0 4.500000,0.500000 4.0,1.0 3.500000) SQL> DB.DBA.TTLP (' <point2d> <shape> "POINT(1 3)"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry> . <point4d> <shape> "POINTZM(0 1 2 3)"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry> . <box1> <shape> "BOX(0 0, 2 3)"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry> . <linestring> <shape> "LINESTRING(10 21, 12 23, 10 25)"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry> . <polygon1> <shape> "POLYGON((1 3,2 4,1 5,0 4,1 3))"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry> . <polygon2> <shape> "POLYGON((1.5 3.5,2.5 4.5,1.5 5.5,0.5 4.5,1.5 3.5))"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry> . <polygon3> <shape> "POLYGON((1 3,2 4,1 5,0 4,1 3),(1 3.5,1.5 4,1 4.5,0.5 4,1 3.5))"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry> . <multipolygon> <shape> "MULTIPOLYGON(((1 3,2 4,1 5,0 4,1 3)),((1 2,2 1,1 0,0 1,1 2)))"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry> . <collection> <shape> "GEOMETRYCOLLECTION(POINT(0 0),MULTILINESTRING((1 5,0 1,4 0,5 4),(1 5,1 0,4 0,4 5)),MULTIPOLYGON(((1 3,2 4,1 5,0 4,1 3)),((1 2,2 1,1 0,0 1,1 2))))"^^<http://www.openlinksw.com/schemas/virtrdf#Geometry> . ', 'http://geo-api-demo/', 'http://geo-api-demo/', 0) SQL> SPARQL SELECT ?s, bif:ST_InteriorRingN (?o, bif:ST_NuminteriorRings (?o)) FROM <http://geo-api-demo/> WHERE { ?s ?p ?o . FILTER (bif:ST_NumInteriorRings (?o) > 0) } ORDER BY ASC(str(?s)) s callret-1 VARCHAR VARCHAR _______________________________________________________________________________ http://geo-api-demo/polygon3 RING(1.0 3.500000,1.500000 4.0,1.0 4.500000,0.500000 4.0,1.0 3.500000)