Accessors¶
- Geometry.type()¶
Returns: geometry type Return type: string Returns geometry type name.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.2.2.
tarantool> gis.Point({37.17284, 55.74495}, 4326):type() --- - Point ...
- ST.GeometryType(geometry)¶
This function is a SQL/MM-compatible alias for Geometry.type(). SQL-MM 3: 5.1.4.
- Geometry.typeid()¶
Returns: geometry type id Return type: integer Returns geometry type id.
tarantool> gis.LineString({{37.279357, 55.849493}, {37.275152, 55.865005}}, 4326):typeid() --- - 1 ...
- ST.GeometryTypeId(geometry)¶
This function is an alias for Geometry.typeid().
- Geometry.srid()¶
Returns: Spatial Reference System Identifier Return type: uint32 Returns the spatial reference identifier.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.2.2.
tarantool> gis.Point({37.17284, 55.74495}, 4326):srid() --- - 4326 ...
- ST.SRID(geometry)¶
This function is a SQL/MM-compatible alias for Geometry.srid(). SQL-MM 3: 5.1.5.
- Geometry.boundary()¶
Returns: closure Return type: Geometry Returns the closure of the combinatorial boundary of this geometric object. Because the result of this function is a closure, and hence topologically closed, the resulting boundary can be represented using representational Geometry primitives.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.2.2.
tarantool> gis.Polygon({ {{10, 130}, {50, 190}, {110, 190}, {140, 150}, {150, 80}, {100, 10}, {20, 40}, {10, 130}}, > {{70, 40}, {100, 50}, {120, 80}, {80, 110}, {50, 90}, {70, 40}} }, 0):boundary() --- - MULTILINESTRING ((10 130, 50 190, 110 190, 140 150, 150 80, 100 10, 20 40, 10 130), (70 40, 100 50, 120 80, 80 110, 50 90, 70 40)) ...
- ST.Boundary(geometry)¶
This function is a SQL/MM-compatible alias for Geometry.boundary(). SQL-MM 3: 5.1.14.
- Geometry.envelope()¶
Returns: minimum bounding box Return type: Polygon Returns the minimum bounding box for this Geometry.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.2.2.
tarantool> gis.Polygon({{{10, 130}, {50, 190}, {110, 190}, {140, 150}, {150, 80}, {100, 10}, {20, 40}, {10, 130}}}, 0):envelope() --- - POLYGON ((10 10, 150 10, 150 190, 10 190, 10 10)) ...
- ST.Envelope(geometry)¶
This function is a SQL/MM-compatible alias for Geometry.boundary(). SQL-MM 3: 5.1.15.
- Geometry.iscollection()¶
Returns: true if geometry is collection Return type: boolean Returns true if geometry is a collection. See Types for details.
tarantool> gis.Point({37.17284, 55.74495}, 4326):iscollection() --- - false ... tarantool> gis.MultiPoint({{37.279357, 55.849493}, {37.275152, 55.865005}}, 4326):iscollection() --- - true ...
- ST.IsCollection(geometry)¶
This function is a PostGIS-compatible alias for Geometry.iscollection().
- Point.x()¶
Returns: x-coordinate Return type: double Returns the x-coordinate value for this point.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.4.2.
tarantool> gis.Point({37.17284, 55.74495}, 4326):x() --- - 37.17284 ...
- Point.y()¶
Returns: y-coordinate Return type: double Returns the y-coordinate value for this point.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.4.2.
tarantool> gis.Point({37.17284, 55.74495}, 4326):y() --- - 55.74495 ...
- Point.z()¶
Returns: z-coordinate Return type: double or nil Raises: on error Returns the z-coordinate value for this point if it has one. Returns nil otherwise.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.4.2.
tarantool> gis.Point({37.17284, 55.74495}, 4326):z() --- - null ... tarantool> gis.Point({2867223.8779605, 2174199.925114, 5248510.4102534}, 4328):z() --- - 5248510.4102534 ...
- Curve.numpoints()¶
Returns: the number of points in a curve Return type: integer Raises: on error Returns the number of points in a Curve.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.7.2.
See Curve.point() for examples.
- ST.NumPoints(curve)¶
This function is a SQL/MM-compatible alias for Curve.numpoints(). SQL-MM 3: 7.2.4.
- Curve.point(n)¶
- Curve.pointn(n)¶
Parameters: n (integer) – one-based index Returns: Nth point of a curve Return type: Point Returns Nth point of a curve. Returns nil if n is out of bounds.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.7.2.
tarantool> linestring = gis.LineString({{37.279357, 55.849493}, {37.275152, 55.865005}}, 4326) --- ... tarantool> linestring:numpoints() --- - 2 ... tarantool> linestring:pointn(1) --- - POINT (37.279357 55.849493) ... tarantool> linestring:pointn(3) --- - null ... tarantool> linestring:points() --- - - POINT (37.279357 55.849493) - POINT (37.275152 55.865005) ... tarantool> for i, point in linestring:iterpoints() do print(i, point) end 1 POINT (37.279357 55.849493) 2 POINT (37.275152 55.865005) --- ...
- ST.PointN(curve)¶
This function is a SQL/MM-compatible alias for Curve.pointn(). SQL-MM 3: 7.2.5.
- Curve.points()¶
Returns: array of points of a curve Return type: [Point] Raises: on error Returns a Lua table with points of this collection. This method also supports non-collections geometric types.
See Curve.pointn() for examples.
- Curve.iterpoints()¶
Returns: iterator over points of this curve Return type: Lua iterator (gen, param, state) Raises: on error Returns a Lua iterator (gen, param, state) over points of this curve.
See Curve.pointn() for examples.
- Polygon.shell()¶
- Polygon.exteriorring()¶
Returns: a linear ring representing the exterior ring of a polygon Return type: LinearRing Returns a linear ring representing the exterior ring of a polygon.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.11.2.
tarantool> shell = { > {37.279357, 55.849493}; > {37.275152, 55.865005}; > {37.261676, 55.864041}; > {37.279357, 55.849493}; > } --- ... tarantool> gis.Polygon({shell}, 4326) --- - POLYGON ((37.279357 55.849493, 37.275152 55.865005, 37.261676 55.864041, 37.279357 55.849493)) ... tarantool> polygon:exteriorring() --- - LINEARRING (37.279357 55.849493, 37.275152 55.865005, 37.261676 55.864041, 37.279357 55.849493) ...
- ST.ExteriorRing(polygon)¶
This function is a SQL/MM-compatible alias for Polygon.exteriorring(). SQL-MM 3: 8.2.3.
- Polygon.numholes()¶
- Polygon.numinteriorrings()¶
Returns: return the number of interior rings of a polygon Return type: integer Returns the number of interior rings of a polygon.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.11.2.
See Polygon.hole() for examples.
- ST.NumInteriorRings(polygon)¶
This function is a SQL/MM-compatible alias for Polygon.numinteriorrings(). SQL-MM 3: 8.2.5.
- Polygon.hole(n)¶
- Polygon.interiorring(n)¶
- Polygon.interiorringn(n)¶
Parameters: n (integer) – one-based index Returns: Nth interior ring of a polygon Return type: LinearRing Returns Nth interior ring of a polygon. Returns nil if n is out of bounds.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.11.2.
tarantool> shell = { > {37.279357, 55.849493}; > {37.275152, 55.865005}; > {37.261676, 55.864041}; > {37.279357, 55.849493}; > } --- ... tarantool> hole = { > {37.267856, 55.853781}; > {37.269401, 55.858502}; > {37.273864, 55.854937}; > {37.267856, 55.853781}; > } --- ... tarantool> gis.Polygon({shell, hole}, 4326) --- - POLYGON ((37.279357 55.849493, 37.275152 55.865005, 37.261676 55.864041, 37.279357 55.849493), (37.267856 55.853781, 37.269401 55.858502, 37.273864 55.854937, 37.267856 55.853781)) ... tarantool> polygon:numholes() --- - 1 ... tarantool> polygon:hole(1) --- - LINEARRING (37.267856 55.853781, 37.269401 55.858502, 37.273864 55.854937, 37.267856 55.853781) ... tarantool> polygon:hole(2) --- - null ...
- ST.InteriorRingN(polygon)¶
This function is a SQL/MM-compatible alias for Polygon.interiorringn(). SQL-MM 3: 8.2.6.
- Polygon.holes()¶
- Polygon.interiorrings()¶
Returns: array of interior rings of a polygon Return type: [LinearRing] Raises: on error Returns a Lua table with interior rings of this polygon.
See also Polygon.iterholes() and Polygon.hole().
tarantool> polygon:holes() --- - - LINEARRING (37.267856 55.853781, 37.269401 55.858502, 37.273864 55.854937, 37.267856 55.853781) ...
- Polygon.iterholes()¶
- Polygon.iterinteriorrings()¶
Returns: iterator over interior rings of this polygon Return type: Lua iterator (gen, param, state) Returns a Lua iterator (gen, param, state) over interior rings of this polygon.
See also Polygon.holes() and Polygon.hole().
tarantool> for i, hole in polygon:iterholes() do print(i, hole) end 1 LINEARRING (37.267856 55.853781, 37.269401 55.858502, 37.273864 55.854937, 37.267856 55.853781) --- ...
- GeometryCollection.numgeometries()¶
Returns: the number of geometries in the collection Return type: integer Raises: on error Returns the number of geometries in this GeometryCollection. This method also supports non-collections geometric types.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.3.2.
See GeometryCollection.geometryn() for examples.
- ST.NumGeometries(collection)¶
This function is a SQL/MM-compatible alias for GeometryCollection.NumGeometries(). SQL-MM 3: 9.1.4.
- GeometryCollection.geometry(n)¶
- GeometryCollection.geometryn(n)¶
Parameters: n (integer) – one-based index Returns: idx-geometry of a collection Return type: Geometry Raises: on error Returns Nth-geometry of this collection. Returns nil if n is out of bounds. This method also supports non-collections geometric types.
This method implements OpenGIS® Simple Feature Access specification. OGC 06-103r4 6.1.3.2.
tarantool> collection = gis.MultiPoint({{37.279357, 55.849493}, {37.275152, 55.865005}}, 4326) --- ... tarantool> collection:numgeometries() --- - 2 ... tarantool> collection:geometryn(1) --- - POINT (37.279357 55.849493) ... tarantool> collection:geometryn(3) --- - null ... tarantool> collection:geometries() --- - - POINT (37.279357 55.849493) - POINT (37.275152 55.865005) ... tarantool> for i, geom in collection:itergeometries() do print(i, geom) end 1 POINT (37.279357 55.849493) 2 POINT (37.275152 55.865005) --- ...
- ST.GeometryN(collection)¶
This function is a SQL/MM-compatible alias for GeometryCollection.geometryn(). SQL-MM 3: 9.1.5.
- GeometryCollection.geometries()¶
Returns: array of geometries of this collection Return type: [Geometry] Returns a Lua table with geometries of this collection. This method also supports non-collections geometric types.
See also GeometryCollection.geometry() for examples.
- ST.Dump(collection)¶
This function is a PostGIS-compatible alias for GeometryCollection.geometries().
- GeometryCollection.itergeometries()¶
Returns: iterator over geometries in this collection Return type: Lua iterator (gen, param, state) Returns a Lua iterator (gen, param, state) over geometries of this collection.
See also GeometryCollection.geometry() for examples.