Geo::GDAL
2.4
|
Spatial data.
More...
Public Member Functions | |
public method | AddGeometry (scalar other) |
public method | AddGeometryDirectly (scalar other) |
public method | AddPoint (scalar x, scalar y, scalar z) |
public method | AddPointM () |
public method | AddPointZM () |
public method | AddPoint_2D (scalar x, scalar y) |
public method | AddPoint_3D (scalar x, scalar y, scalar z) |
public Geo::OGR::Geometry | ApproximateArcAngles (hash params) |
public scalar | Area () |
public scalar | As (hash params) |
public scalar | AsBinary () |
public scalar | AsText () |
public method | AssignSpatialReference (scalar srs) |
public Geo::OGR::Geometry | Boundary () |
public Geo::OGR::Geometry | Buffer (scalar distance, scalar quadsecs=30) |
public Geo::OGR::Geometry | BuildPolygonFromEdges (scalar BestEffort=0, scalar AutoClose=0, scalar Tolerance=0) |
public list | ByteOrders () |
public Geo::OGR::Geometry | Centroid () |
public Geo::OGR::Geometry | Clone () |
public method | CloseRings () |
public Geo::OGR::Geometry | Collect (array geometries) |
public scalar | Contains (scalar other) |
public Geo::OGR::Geometry | ConvexHull () |
public scalar | CoordinateDimension (scalar dimension) |
public scalar | Crosses (scalar other) |
public method | DelaunayTriangulation () |
public Geo::OGR::Geometry | Difference (scalar other) |
public scalar | Disjoint (scalar other) |
public list | Dissolve () |
public scalar | Distance (scalar other) |
public method | Distance3D () |
public method | Empty () |
public scalar | Equals (scalar other) |
public method | Extent () |
public method | Feature () |
public method | FlattenTo2D () |
public Geo::OGR::Geometry | ForceTo (scalar type, ref options) |
public Geo::OGR::Geometry | ForceToCollection (array geometries) |
public Geo::OGR::Geometry | ForceToLineString () |
public Geo::OGR::Geometry | ForceToMultiLineString (array linestrings) |
public Geo::OGR::Geometry | ForceToMultiPoint (array points) |
public Geo::OGR::Geometry | ForceToMultiPolygon (array polygons) |
public Geo::OGR::Geometry | ForceToPolygon () |
public scalar | Geometry (scalar n) |
public scalar | GeometryCount () |
public scalar | GeometryType () |
public list | GeometryTypes () |
public scalar | GetCoordinateDimension () |
public method | GetCurveGeometry () |
public scalar | GetDimension () |
public list | GetEnvelope () |
public list | GetEnvelope3D () |
public scalar | GetGeometryRef (scalar index) |
public method | GetLinearGeometry () |
public method | GetM () |
public list | GetPoint (scalar index=0) |
public scalar | GetPointCount () |
public method | GetPointZM () |
public scalar | GetPoint_2D (scalar index=0) |
public scalar | GetPoint_3D (scalar index=0) |
public Geo::OSR::SpatialReference | GetSpatialReference () |
public scalar | GetX (scalar index=0) |
public scalar | GetY (scalar index=0) |
public scalar | GetZ (scalar index=0) |
public method | HasCurveGeometry () |
public Geo::OGR::Geometry | Intersection (scalar other) |
public scalar | Intersects (scalar other) |
public method | Is3D () |
public scalar | IsEmpty () |
public method | IsMeasured () |
public scalar | IsRing () |
public scalar | IsSimple () |
public scalar | IsValid () |
public scalar | Length () |
public method | Move (scalar dx, scalar dy, scalar dz) |
public scalar | Overlaps (scalar other) |
public list | Point (scalar index, scalar x, scalar y, scalar z) |
public method | PointOnSurface () |
public array reference | Points (arrayref points) |
public method | Polygonize () |
public method | RemoveGeometry () |
public method | Segmentize (scalar MaxLength) |
public method | Set3D () |
public method | SetCoordinateDimension (scalar dimension) |
public method | SetMeasured () |
public method | SetPoint (scalar index, scalar x, scalar y, scalar z) |
public method | SetPointM () |
public method | SetPointZM () |
public method | SetPoint_2D (scalar index, scalar x, scalar y) |
public method | SetPoint_3D (scalar index, scalar x, scalar y, scalar z) |
public Geo::OGR::Geometry | Simplify (scalar Tolerance) |
public method | SimplifyPreserveTopology () |
public method | SwapXY () |
public Geo::OGR::Geometry | SymDifference (scalar other) |
public scalar | Touches (scalar other) |
public method | Transform (scalar trans) |
public method | TransformTo (scalar srs) |
public Geo::OGR::Geometry | Union (scalar other) |
public Geo::OGR::Geometry | UnionCascaded () |
public method | Value () |
public scalar | Within (scalar other) |
public scalar | WkbSize () |
public Geo::OGR::Geometry | new (hash params) |
Public Member Functions inherited from Geo::OGR | |
public list | ByteOrders () |
public Geo::GDAL::Driver | Driver (scalar name) |
public list | DriverNames () |
public list | Drivers () |
public method | Flatten () |
public scalar | GeometryTypeModify (scalar type, scalar modifier) |
public scalar | GeometryTypeTest (scalar type, scalar test, scalar type2) |
public list | GeometryTypes () |
public method | GetNonLinearGeometriesEnabledFlag () |
public method | GetOpenDSCount () |
public method | HasM () |
public method | HasZ () |
public Geo::GDAL::Dataset | Open (scalar name, scalar update=0) |
public Geo::GDAL::Dataset | OpenShared (scalar name, scalar update=0) |
public method | SetGenerate_DB2_V72_BYTE_ORDER (scalar Generate_DB2_V72_BYTE_ORDER) |
public method | SetNonLinearGeometriesEnabledFlag () |
Spatial data.
A geometry is spatial data (coordinate values, and a reference to a
spatial reference system) organized into one of the geometry
types. Geometries can be created from several type of data including
a Perl data structure. There are several methods, which modify,
compare, test, or compute values from geometries.
public scalar Geo::OGR::Geometry::Geometry | ( | scalar | n | ) |
Object method.
Return the n:th (note zero-based index) element in this geometry or
geometry in this collection.
n | index to the geometry, which is a part of this geometry |
public method Geo::OGR::Geometry::AddGeometry | ( | scalar | other | ) |
Object method.
Add a copy of another geometry to a geometry collection
other | a Geo::OGR::Geometry object |
public method Geo::OGR::Geometry::AddGeometryDirectly | ( | scalar | other | ) |
public method Geo::OGR::Geometry::AddPoint | ( | scalar | x, |
scalar | y, | ||
scalar | z | ||
) |
Object method.
Set the data of a point or add a point to a line string. Consider
using Geo::OGR::Geometry::Points. Note that the coordinate
dimension is automatically upgraded to 25D (3) if z is given.
x | |
y | |
z | [optional] Calls internally the 2D or 3D version depending on the number of parameters. |
public method Geo::OGR::Geometry::AddPoint_2D | ( | scalar | x, |
scalar | y | ||
) |
Object method.
Set the data of a point or add a point to a line string. Consider
using Geo::OGR::Geometry::Points.
x | |
y |
public method Geo::OGR::Geometry::AddPoint_3D | ( | scalar | x, |
scalar | y, | ||
scalar | z | ||
) |
Object method.
Set the data of a point or add a point to a line string. Note that
the coordinate dimension is automatically upgraded to 25D (3). Consider
using Geo::OGR::Geometry::Points.
x | |
y | |
z |
public method Geo::OGR::Geometry::AddPointM | ( | ) |
public method Geo::OGR::Geometry::AddPointZM | ( | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::ApproximateArcAngles | ( | hash | params | ) |
Package subroutine.
Create a line string, which approximates an arc.
%params | Named parameters: - Center center point (default is [0, 0, 0]) - PrimaryRadius default is 1. - SecondaryAxis default is 1. - Rotation default is 0. - StartAngle default is 0. - EndAngle default is 360. - MaxAngleStepSizeDegrees default is 4. |
public scalar Geo::OGR::Geometry::Area | ( | ) |
Object method.
public scalar Geo::OGR::Geometry::As | ( | hash | params | ) |
Object method.
Export the geometry into a known format.
params | Named parameters: - Format One of - WKT Well Known Text. - ISO WKT - Text Same as WKT. - WKB Well Known Binary. - ISO WKB - Binary Same as WKB. - HEXWKB - HEXEWKB - GML - GeoJSON - ByteOrder Byte order for binary formats. Default is 'XDR'. - SRID Spatial reference id for HEXEWKB. - Options GML generation options. - AltitudeMode For KML. |
public scalar Geo::OGR::Geometry::AsBinary | ( | ) |
Object method.
Export the geometry into WKB.
public method Geo::OGR::Geometry::AssignSpatialReference | ( | scalar | srs | ) |
public scalar Geo::OGR::Geometry::AsText | ( | ) |
Object method.
Export the geometry into WKT.
public Geo::OGR::Geometry Geo::OGR::Geometry::Boundary | ( | ) |
Object method.
public Geo::OGR::Geometry Geo::OGR::Geometry::Buffer | ( | scalar | distance, |
scalar | quadsecs = 30 |
||
) |
Object method.
distance | |
quadsecs |
public Geo::OGR::Geometry Geo::OGR::Geometry::BuildPolygonFromEdges | ( | scalar | BestEffort = 0 , |
scalar | AutoClose = 0 , |
||
scalar | Tolerance = 0 |
||
) |
Object method.
Attempt to create a polygon from a collection of lines or from a multilinestring.
BestEffort | For future |
AutoClose | Assure the first and last points of rings are same. |
Tolerance | Snap distance. |
Several | possibilities, some are reported, some are general errors. |
public list Geo::OGR::Geometry::ByteOrders | ( | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::Centroid | ( | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::Clone | ( | ) |
public method Geo::OGR::Geometry::CloseRings | ( | ) |
Object method.
public Geo::OGR::Geometry Geo::OGR::Geometry::Collect | ( | array | geometries | ) |
Object method.
Create a geometrycollection from this and possibly other geometries.
geometries | [optional] More geometries to add to the collection. |
public scalar Geo::OGR::Geometry::Contains | ( | scalar | other | ) |
Object method.
other | a Geo::OGR::Geometry object |
public Geo::OGR::Geometry Geo::OGR::Geometry::ConvexHull | ( | ) |
public scalar Geo::OGR::Geometry::CoordinateDimension | ( | scalar | dimension | ) |
Object method.
dimension | [optional] |
public scalar Geo::OGR::Geometry::Crosses | ( | scalar | other | ) |
Object method.
other | a Geo::OGR::Geometry object |
public method Geo::OGR::Geometry::DelaunayTriangulation | ( | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::Difference | ( | scalar | other | ) |
Object method.
other | a Geo::OGR::Geometry object |
public scalar Geo::OGR::Geometry::Disjoint | ( | scalar | other | ) |
Object method.
other | a Geo::OGR::Geometry object |
public list Geo::OGR::Geometry::Dissolve | ( | ) |
Object method.
Dissolve a geometrycollection into separate geometries.
public scalar Geo::OGR::Geometry::Distance | ( | scalar | other | ) |
Object method.
other | a Geo::OGR::Geometry object |
public method Geo::OGR::Geometry::Distance3D | ( | ) |
public method Geo::OGR::Geometry::Empty | ( | ) |
Object method.
Clear geometry data, i.e., remove all points, or, for a point, set
the coordinate dimension as zero.
public scalar Geo::OGR::Geometry::Equals | ( | scalar | other | ) |
Object method.
other | a Geo::OGR::Geometry object |
public method Geo::OGR::Geometry::Extent | ( | ) |
public method Geo::OGR::Geometry::Feature | ( | ) |
public method Geo::OGR::Geometry::FlattenTo2D | ( | ) |
Object method.
public Geo::OGR::Geometry Geo::OGR::Geometry::ForceTo | ( | scalar | type, |
ref | options | ||
) |
Object method.
Attempt to make a geometry of type 'type' out of this geometry.
type | target geometry type. One of Geo::OGR::GeometryTypes. |
options | not used currently. |
public Geo::OGR::Geometry Geo::OGR::Geometry::ForceToCollection | ( | array | geometries | ) |
Object method.
Create a geometrycollection from the geometry.
geometries | [optional] More geometries to add to the collection. |
public Geo::OGR::Geometry Geo::OGR::Geometry::ForceToLineString | ( | ) |
Object method.
Attempt to create a line string from this geometry.
public Geo::OGR::Geometry Geo::OGR::Geometry::ForceToMultiLineString | ( | array | linestrings | ) |
Object method.
Attempt to create a multilinestring from the geometry, which must be a linestring.
linestrings | [optional] More linestrings to add to the collection. |
public Geo::OGR::Geometry Geo::OGR::Geometry::ForceToMultiPoint | ( | array | points | ) |
Object method.
Attempt to create a multipoint from the geometry, which must be a point.
points | [optional] More points to add to the collection. |
public Geo::OGR::Geometry Geo::OGR::Geometry::ForceToMultiPolygon | ( | array | polygons | ) |
Object method.
Attempt to create a multipolygon from the geometry, which must be a polygon.
polygons | [optional] More polygons to add to the collection. |
public Geo::OGR::Geometry Geo::OGR::Geometry::ForceToPolygon | ( | ) |
Object method.
Attempt to create a polygon from this geometry.
None | reported. If this method fails, just a copy is returned. |
public scalar Geo::OGR::Geometry::GeometryCount | ( | ) |
Object method.
Return the number of elements in this geometry or geometries in this collection.
public scalar Geo::OGR::Geometry::GeometryType | ( | ) |
Object method.
public list Geo::OGR::Geometry::GeometryTypes | ( | ) |
public scalar Geo::OGR::Geometry::GetCoordinateDimension | ( | ) |
Object method.
public method Geo::OGR::Geometry::GetCurveGeometry | ( | ) |
public scalar Geo::OGR::Geometry::GetDimension | ( | ) |
Object method.
public list Geo::OGR::Geometry::GetEnvelope | ( | ) |
Object method.
public list Geo::OGR::Geometry::GetEnvelope3D | ( | ) |
Object method.
public scalar Geo::OGR::Geometry::GetGeometryRef | ( | scalar | index | ) |
public method Geo::OGR::Geometry::GetLinearGeometry | ( | ) |
public method Geo::OGR::Geometry::GetM | ( | ) |
public list Geo::OGR::Geometry::GetPoint | ( | scalar | index = 0 | ) |
Object method.
index |
public scalar Geo::OGR::Geometry::GetPoint_2D | ( | scalar | index = 0 | ) |
Object method.
index |
public scalar Geo::OGR::Geometry::GetPoint_3D | ( | scalar | index = 0 | ) |
Object method.
index |
public scalar Geo::OGR::Geometry::GetPointCount | ( | ) |
Object method.
public method Geo::OGR::Geometry::GetPointZM | ( | ) |
public Geo::OSR::SpatialReference Geo::OGR::Geometry::GetSpatialReference | ( | ) |
public scalar Geo::OGR::Geometry::GetX | ( | scalar | index = 0 | ) |
Object method.
index |
public scalar Geo::OGR::Geometry::GetY | ( | scalar | index = 0 | ) |
Object method.
index |
public scalar Geo::OGR::Geometry::GetZ | ( | scalar | index = 0 | ) |
Object method.
index |
public method Geo::OGR::Geometry::HasCurveGeometry | ( | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::Intersection | ( | scalar | other | ) |
Object method.
other | a Geo::OGR::Geometry object |
public scalar Geo::OGR::Geometry::Intersects | ( | scalar | other | ) |
Object method.
other | a Geo::OGR::Geometry object |
public method Geo::OGR::Geometry::Is3D | ( | ) |
public scalar Geo::OGR::Geometry::IsEmpty | ( | ) |
Object method.
Test whether the geometry is empty (has no points, or, for a point,
has coordinate dimension of zero).
public method Geo::OGR::Geometry::IsMeasured | ( | ) |
public scalar Geo::OGR::Geometry::IsRing | ( | ) |
Object method.
Test if the geometry is a ring. Requires GEOS in GDAL.
public scalar Geo::OGR::Geometry::IsSimple | ( | ) |
Object method.
Test the simplicity of the geometry (OGC sense). Requires GEOS in GDAL.
public scalar Geo::OGR::Geometry::IsValid | ( | ) |
Object method.
Test the validity of the geometry (OGC sense). Requires GEOS in GDAL.
public scalar Geo::OGR::Geometry::Length | ( | ) |
Object method.
public method Geo::OGR::Geometry::Move | ( | scalar | dx, |
scalar | dy, | ||
scalar | dz | ||
) |
Object method.
Move every point of the object as defined by the parameters.
dx | |
dy | |
dz | [optional] |
public Geo::OGR::Geometry Geo::OGR::Geometry::new | ( | hash | params | ) |
Class method.
%params | A named parameter, one of: - GeometryType one the supported geometry types, see Geo::OGR::GeometryTypes. - WKT a well known text string, which defines a geometry. - WKB a well known binary string, which defines a geometry. - HEXWKB WKB in hexadecimal. - HEXEWKB PostGIS extended WKB. - GML geometry written in Geographic Markup Language. - GeoJSON geometry written in GeoJSON (JavaScript Object Notation for Geographic data). - arc a reference to a list of values defining an arc: [CenterX, CenterY, CenterZ, PrimaryRadius, SecondaryRadius, Rotation, StartAngle, EndAngle, MaxAngleStepSizeDegrees] (see also Geo::OGR::Geometry::ApproximateArcAngles) - Points An anonymous array as in method Geo::OGR::Geometry::Points; Note: requires also GeometryType parameter |
public scalar Geo::OGR::Geometry::Overlaps | ( | scalar | other | ) |
Object method.
other | a Geo::OGR::Geometry object |
public list Geo::OGR::Geometry::Point | ( | scalar | index, |
scalar | x, | ||
scalar | y, | ||
scalar | z | ||
) |
Object method.
Get or set the point
index | The index of the point. Optional (ignored if given) for Point and Point25D geometries. |
x | [optional] |
y | [optional] |
z | [optional] |
public method Geo::OGR::Geometry::PointOnSurface | ( | ) |
public array reference Geo::OGR::Geometry::Points | ( | arrayref | points | ) |
Object method.
Get or set the points of the geometry. The points (vertices) are
stored in obvious lists of lists. When setting, the geometry is
first emptied. The method uses internally either AddPoint_2D or
AddPoint_3D depending on the coordinate dimension of the input data.
points | [optional] A reference to an array. A point is a reference to an array of numbers, a linestring or a ring is a reference to an array of points, a polygon is a reference to an array of rings, etc. |
public method Geo::OGR::Geometry::Polygonize | ( | ) |
public method Geo::OGR::Geometry::RemoveGeometry | ( | ) |
public method Geo::OGR::Geometry::Segmentize | ( | scalar | MaxLength | ) |
Object method.
Modify the geometry such it has no segment longer than the given length.
MaxLength | the given length |
public method Geo::OGR::Geometry::Set3D | ( | ) |
public method Geo::OGR::Geometry::SetCoordinateDimension | ( | scalar | dimension | ) |
Object method.
dimension |
public method Geo::OGR::Geometry::SetMeasured | ( | ) |
public method Geo::OGR::Geometry::SetPoint | ( | scalar | index, |
scalar | x, | ||
scalar | y, | ||
scalar | z | ||
) |
Object method.
Set the data of a point or a line string. Note that the coordinate
dimension is automatically upgraded to 25D (3) if z is given.
index | |
x | |
y | |
z | [optional] |
public method Geo::OGR::Geometry::SetPoint_2D | ( | scalar | index, |
scalar | x, | ||
scalar | y | ||
) |
Object method.
index | |
x | |
y |
public method Geo::OGR::Geometry::SetPoint_3D | ( | scalar | index, |
scalar | x, | ||
scalar | y, | ||
scalar | z | ||
) |
Object method.
Set the data of a point or a line string. Note that the coordinate
dimension is automatically upgraded to 25D (3).
index | |
x | |
y | |
z |
public method Geo::OGR::Geometry::SetPointM | ( | ) |
public method Geo::OGR::Geometry::SetPointZM | ( | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::Simplify | ( | scalar | Tolerance | ) |
Object method.
Simplify the geometry.
Tolerance | the length tolerance for the simplification |
public method Geo::OGR::Geometry::SimplifyPreserveTopology | ( | ) |
public method Geo::OGR::Geometry::SwapXY | ( | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::SymDifference | ( | scalar | other | ) |
Object method.
Compute symmetric difference.
other | a Geo::OGR::Geometry object |
public scalar Geo::OGR::Geometry::Touches | ( | scalar | other | ) |
Object method.
other | a Geo::OGR::Geometry object |
public method Geo::OGR::Geometry::Transform | ( | scalar | trans | ) |
public method Geo::OGR::Geometry::TransformTo | ( | scalar | srs | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::Union | ( | scalar | other | ) |
Object method.
other | a Geo::OGR::Geometry object |
public Geo::OGR::Geometry Geo::OGR::Geometry::UnionCascaded | ( | ) |
public method Geo::OGR::Geometry::Value | ( | ) |
public scalar Geo::OGR::Geometry::Within | ( | scalar | other | ) |
Object method.
other | a Geo::OGR::Geometry object |
public scalar Geo::OGR::Geometry::WkbSize | ( | ) |
Object method.