Geo::GDAL
2.0
|
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 | 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 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 Geo::OGR::Geometry | Difference (scalar other) |
public scalar | Disjoint (scalar other) |
public list | Dissolve () |
public scalar | Distance (scalar other) |
public method | Empty () |
public scalar | Equals (scalar other) |
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 | GeometryType () |
public list | GeometryTypes () |
public scalar | GetCoordinateDimension () |
public method | GetCurveGeometry () |
public scalar | GetDimension () |
public list | GetEnvelope () |
public list | GetEnvelope3D () |
public scalar | GetGeometryCount () |
public scalar | GetGeometryName () |
public scalar | GetGeometryRef (scalar index) |
public scalar | GetGeometryType () |
public method | GetLinearGeometry () |
public list | GetPoint (scalar index=0) |
public scalar | GetPointCount () |
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 scalar | IsEmpty () |
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 | Segmentize (scalar MaxLength) |
public method | SetCoordinateDimension (scalar dimension) |
public method | SetPoint (scalar index, scalar x, scalar y, scalar z) |
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 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 scalar | GeometryTypeModify (scalar type, scalar modifier) |
public scalar | GeometryTypeTest (scalar type, scalar test, scalar type2) |
public list | GeometryTypes () |
public Geo::OGR::Driver | GetDriver (scalar name) |
public list | GetDriverNames () |
public method | GetNonLinearGeometriesEnabledFlag () |
public Geo::OGR::DataSource | GetOpenDS (scalar number) |
public scalar | GetOpenDSCount () |
public method | OLMD_FID64 () |
public Geo::OGR::DataSource | Open (scalar name, scalar update=0) |
public Geo::OGR::DataSource | 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 method Geo::OGR::Geometry::AddGeometry | ( | scalar | other | ) |
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 | ||
) |
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 | ||
) |
Set the data of a point or add a point to a line string. Consider using Geo::OGR::Geometry::Points.
x | |
y |
Code:
click to view
|
public method Geo::OGR::Geometry::AddPoint_3D | ( | scalar | x, |
scalar | y, | ||
scalar | z | ||
) |
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 |
Code:
click to view
|
public Geo::OGR::Geometry Geo::OGR::Geometry::ApproximateArcAngles | ( | hash | params | ) |
Class method. Create a line string, which approximates an arc.
%params | named parameters, these are:
|
public scalar Geo::OGR::Geometry::Area | ( | ) |
public scalar Geo::OGR::Geometry::As | ( | hash | params | ) |
Export the geometry into a known format.
params | named parameters, either: Text (a.k.a WKT), WKB (a.k.a. Binary) (ByteOrder can also be defined, default is 'XDR'), ISO WKT and WKB, HEXWKB, HEXEWKB (srid can also be given), GML, GeoJSON, Binary. |
public method Geo::OGR::Geometry::AssignSpatialReference | ( | scalar | srs | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::Boundary | ( | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::Buffer | ( | scalar | distance, |
scalar | quadsecs = 30 |
||
) |
public Geo::OGR::Geometry Geo::OGR::Geometry::BuildPolygonFromEdges | ( | scalar | BestEffort = 0 , |
scalar | AutoClose = 0 , |
||
scalar | Tolerance = 0 |
||
) |
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 | ( | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::Collect | ( | array | geometries | ) |
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 | ) |
other | a Geo::OGR::Geometry object |
public Geo::OGR::Geometry Geo::OGR::Geometry::ConvexHull | ( | ) |
public scalar Geo::OGR::Geometry::CoordinateDimension | ( | scalar | dimension | ) |
dimension | [optional] |
public scalar Geo::OGR::Geometry::Crosses | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
public Geo::OGR::Geometry Geo::OGR::Geometry::Difference | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
public scalar Geo::OGR::Geometry::Disjoint | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
public list Geo::OGR::Geometry::Dissolve | ( | ) |
Dissolve a geometrycollection into separate geometries.
public scalar Geo::OGR::Geometry::Distance | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
public method Geo::OGR::Geometry::Empty | ( | ) |
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 | ) |
other | a Geo::OGR::Geometry object |
public method Geo::OGR::Geometry::FlattenTo2D | ( | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::ForceTo | ( | scalar | type, |
ref | options | ||
) |
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 | ) |
Create a geometrycollection from the geometry.
geometries | [optional] More geometries to add to the collection. |
public Geo::OGR::Geometry Geo::OGR::Geometry::ForceToLineString | ( | ) |
Attempt to create a line string from this geometry.
public Geo::OGR::Geometry Geo::OGR::Geometry::ForceToMultiLineString | ( | array | linestrings | ) |
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 | ) |
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 | ) |
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 | ( | ) |
Attempt to create a polygon from this geometry.
None | reported. If this method fails, just a copy is returned. |
public scalar Geo::OGR::Geometry::GeometryType | ( | ) |
public list Geo::OGR::Geometry::GeometryTypes | ( | ) |
public scalar Geo::OGR::Geometry::GetCoordinateDimension | ( | ) |
public method Geo::OGR::Geometry::GetCurveGeometry | ( | ) |
public scalar Geo::OGR::Geometry::GetDimension | ( | ) |
public list Geo::OGR::Geometry::GetEnvelope | ( | ) |
public list Geo::OGR::Geometry::GetEnvelope3D | ( | ) |
public scalar Geo::OGR::Geometry::GetGeometryCount | ( | ) |
public scalar Geo::OGR::Geometry::GetGeometryName | ( | ) |
public scalar Geo::OGR::Geometry::GetGeometryRef | ( | scalar | index | ) |
index | index to the geometry, which is a part of this geometry |
public scalar Geo::OGR::Geometry::GetGeometryType | ( | ) |
public method Geo::OGR::Geometry::GetLinearGeometry | ( | ) |
public list Geo::OGR::Geometry::GetPoint | ( | scalar | index = 0 | ) |
index |
public scalar Geo::OGR::Geometry::GetPoint_2D | ( | scalar | index = 0 | ) |
index |
public scalar Geo::OGR::Geometry::GetPoint_3D | ( | scalar | index = 0 | ) |
index |
public scalar Geo::OGR::Geometry::GetPointCount | ( | ) |
public Geo::OSR::SpatialReference Geo::OGR::Geometry::GetSpatialReference | ( | ) |
public scalar Geo::OGR::Geometry::GetX | ( | scalar | index = 0 | ) |
index |
public scalar Geo::OGR::Geometry::GetY | ( | scalar | index = 0 | ) |
index |
public scalar Geo::OGR::Geometry::GetZ | ( | scalar | index = 0 | ) |
index |
public method Geo::OGR::Geometry::HasCurveGeometry | ( | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::Intersection | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
public scalar Geo::OGR::Geometry::Intersects | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
public scalar Geo::OGR::Geometry::IsEmpty | ( | ) |
Test whether the geometry is empty (has no points, or, for a point, has coordinate dimension of zero).
public scalar Geo::OGR::Geometry::IsRing | ( | ) |
public scalar Geo::OGR::Geometry::IsSimple | ( | ) |
Test the simplicity of the geometry (OGC sense). Requires GEOS in GDAL.
public scalar Geo::OGR::Geometry::IsValid | ( | ) |
Test the validity of the geometry (OGC sense). Requires GEOS in GDAL.
public scalar Geo::OGR::Geometry::Length | ( | ) |
public method Geo::OGR::Geometry::Move | ( | scalar | dx, |
scalar | dy, | ||
scalar | dz | ||
) |
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: WKT, WKB, HEXWKB, HEXEWKB, GML, GeoJSON, arc, or GeometryType and optionally Points.
|
public scalar Geo::OGR::Geometry::Overlaps | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
public list Geo::OGR::Geometry::Point | ( | scalar | index, |
scalar | x, | ||
scalar | y, | ||
scalar | z | ||
) |
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 | ) |
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::Segmentize | ( | scalar | MaxLength | ) |
Modify the geometry such it has no segment longer than the given length.
MaxLength | the given length |
public method Geo::OGR::Geometry::SetCoordinateDimension | ( | scalar | dimension | ) |
dimension |
Code:
click to view
|
public method Geo::OGR::Geometry::SetPoint | ( | scalar | index, |
scalar | x, | ||
scalar | y, | ||
scalar | z | ||
) |
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 | ||
) |
index | |
x | |
y |
Code:
click to view
|
public method Geo::OGR::Geometry::SetPoint_3D | ( | scalar | index, |
scalar | x, | ||
scalar | y, | ||
scalar | z | ||
) |
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 |
Code:
click to view
|
public Geo::OGR::Geometry Geo::OGR::Geometry::Simplify | ( | scalar | Tolerance | ) |
Simplify the geometry.
Tolerance | the length tolerance for the simplification |
public method Geo::OGR::Geometry::SimplifyPreserveTopology | ( | ) |
public Geo::OGR::Geometry Geo::OGR::Geometry::SymDifference | ( | scalar | other | ) |
Compute symmetric difference.
other | a Geo::OGR::Geometry object |
public scalar Geo::OGR::Geometry::Touches | ( | scalar | other | ) |
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 | ) |
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 | ) |
other | a Geo::OGR::Geometry object |
public scalar Geo::OGR::Geometry::WkbSize | ( | ) |