Geo::GDAL
1.11
|
Public Class Methods | |
Geo::OGR::Geometry | new (scalar type=scalar Geo::OGR::wkbUnknown, scalar WKT=undef, scalar WKB=undef, scalar GML=undef) |
Geo::OGR::Geometry | create (scalar type) |
Geo::OGR::Geometry | create (hash params) |
Public Object Methods | |
FlattenTo2D () | |
scalar | CoordinateDimension (scalar dimension) |
scalar | GetCoordinateDimension () |
SetCoordinateDimension (scalar dimension) | |
scalar | GetDimension () |
scalar | AsText () |
scalar | AsBinary (scalar byte_order= 'XDR') |
scalar | AsGML () |
scalar | AsKML () |
scalar | AsJSON () |
AddPoint (scalar x, scalar y, scalar z) | |
AddPoint_2D (scalar x, scalar y) | |
AddPoint_3D (scalar x, scalar y, scalar z) | |
SetPoint (scalar index, scalar x, scalar y, scalar z) | |
SetPoint_2D (scalar index, scalar x, scalar y) | |
SetPoint_3D (scalar index, scalar x, scalar y, scalar z) | |
scalar | GetPointCount () |
list | GetPoint (scalar index=0) |
scalar | GetPoint_2D (scalar index=0) |
scalar | GetPoint_3D (scalar index=0) |
scalar | GetX (scalar index=0) |
scalar | GetY (scalar index=0) |
scalar | GetZ (scalar index=0) |
list | Point (scalar index, scalar x, scalar y, scalar z) |
listref | Points (listref points) |
Empty () | |
scalar | IsEmpty () |
scalar | IsRing () |
scalar | IsSimple () |
scalar | IsValid () |
Move (scalar dx, scalar dy, scalar dz) | |
AddGeometryDirectly (scalar other) | |
AddGeometry (scalar other) | |
Geo::OGR::Geometry | Clone () |
scalar | GeometryType () |
scalar | Length () |
scalar | Area () |
scalar | GetGeometryCount () |
scalar | GetGeometryRef (scalar index) |
Geo::OGR::Geometry | ConvexHull () |
Geo::OGR::Geometry | BuildPolygonFromEdges (scalar BestEffort=0, scalar AutoClose=0, scalar Tolerance=0) |
Geo::OGR::Geometry | Collect (list geometries) |
list | Dissolve () |
Geo::OGR::Geometry | ForceToPolygon () |
Geo::OGR::Geometry | ForceToMultiPoint (list points) |
Geo::OGR::Geometry | ForceToMultiLineString (list linestrings) |
Geo::OGR::Geometry | ForceToMultiPolygon (list polygons) |
Geo::OGR::Geometry | ForceToCollection (list geometries) |
Geo::OGR::Geometry | Buffer (scalar distance, scalar quadsecs=30) |
Geo::OGR::Geometry | Intersection (scalar other) |
Geo::OGR::Geometry | Union (scalar other) |
Geo::OGR::Geometry | UnionCascaded () |
Geo::OGR::Geometry | Difference (scalar other) |
Geo::OGR::Geometry | SymDifference (scalar other) |
Geo::OGR::Geometry | Boundary () |
scalar | Distance (scalar other) |
scalar | Intersects (scalar other) |
scalar | Equals (scalar other) |
scalar | Disjoint (scalar other) |
scalar | Touches (scalar other) |
scalar | Crosses (scalar other) |
scalar | Within (scalar other) |
scalar | Contains (scalar other) |
scalar | Overlaps (scalar other) |
Segmentize (scalar MaxLength) | |
Geo::OGR::Geometry | Simplify (scalar Tolerance) |
TransformTo (scalar srs) | |
Transform (scalar trans) | |
Geo::OSR::SpatialReference | GetSpatialReference () |
AssignSpatialReference (scalar srs) | |
CloseRings () | |
list | GetEnvelope () |
list | GetEnvelope3D () |
Geo::OGR::Geometry | Centroid () |
scalar | WkbSize () |
scalar | GetGeometryType () |
scalar | GetGeometryName () |
Public Attributes | |
list | GEOMETRY_TYPES |
list | BYTE_ORDER_TYPES |
Geo::OGR::Geometry::AddGeometry | ( | scalar | other | ) |
Add a copy of another geometry to a geometry collection
other | a Geo::OGR::Geometry object |
Geo::OGR::Geometry::AddGeometryDirectly | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
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. |
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 |
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 |
scalar Geo::OGR::Geometry::Area | ( | ) |
scalar Geo::OGR::Geometry::AsBinary | ( | scalar | byte_order = 'XDR' | ) |
This geometric object as a Well-known binary string.
byte_order | XDR or NDR |
scalar Geo::OGR::Geometry::AsGML | ( | ) |
This geometric object as a GML string.
scalar Geo::OGR::Geometry::AsJSON | ( | ) |
This geometric object as a JSON string.
scalar Geo::OGR::Geometry::AsKML | ( | ) |
This geometric object as a KML string.
Geo::OGR::Geometry::AssignSpatialReference | ( | scalar | srs | ) |
srs | a Geo::OSR::SpatialReference object |
scalar Geo::OGR::Geometry::AsText | ( | ) |
This geometric object in Well Known Text.
Geo::OGR::Geometry Geo::OGR::Geometry::Buffer | ( | scalar | distance, |
scalar | quadsecs = 30 |
||
) |
distance | |
quadsecs |
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. |
Geo::OGR::Geometry Geo::OGR::Geometry::Collect | ( | list | geometries | ) |
Create a geometrycollection from this and possibly other geometries.
geometries | [optional] More geometries to add to the collection. |
scalar Geo::OGR::Geometry::Contains | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
scalar Geo::OGR::Geometry::CoordinateDimension | ( | scalar | dimension | ) |
dimension | [optional] |
Geo::OGR::Geometry Geo::OGR::Geometry::create | ( | scalar | type | ) |
type | One of geometry type strings: 'Point', 'LineString', etc. |
Usage:
$g = Geo::OGR::Geometry->create(...arguments...);
Geo::OGR::Geometry Geo::OGR::Geometry::create | ( | hash | params | ) |
%params | A named parameter, one of: GeometryType, WKT, WKB, HEXWKB, HEXEWKB (PostGIS extended WKB), GML, GeoJSON, arc, and/or Points.
|
Usage:
$g = Geo::OGR::Geometry->create(...arguments...);
scalar Geo::OGR::Geometry::Crosses | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
Geo::OGR::Geometry Geo::OGR::Geometry::Difference | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
scalar Geo::OGR::Geometry::Disjoint | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
list Geo::OGR::Geometry::Dissolve | ( | ) |
Dissolve a geometrycollection into separate geometries.
scalar Geo::OGR::Geometry::Distance | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
Clear geometry data, i.e., remove all points, or, for a point, set the coordinate dimension as zero.
scalar Geo::OGR::Geometry::Equals | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
Geo::OGR::Geometry Geo::OGR::Geometry::ForceToCollection | ( | list | geometries | ) |
Create a geometrycollection from the geometry.
geometries | [optional] More geometries to add to the collection. |
Geo::OGR::Geometry Geo::OGR::Geometry::ForceToMultiLineString | ( | list | linestrings | ) |
Attempt to create a multilinestring from the geometry, which must be a linestring.
linestrings | [optional] More linestrings to add to the collection. |
Geo::OGR::Geometry Geo::OGR::Geometry::ForceToMultiPoint | ( | list | points | ) |
Attempt to create a multipoint from the geometry, which must be a point.
points | [optional] More points to add to the collection. |
Geo::OGR::Geometry Geo::OGR::Geometry::ForceToMultiPolygon | ( | list | polygons | ) |
Attempt to create a multipolygon from the geometry, which must be a polygon.
polygons | [optional] More polygons to add to the collection. |
Attempt to create a polygon from the geometry.
None | reported. If this method fails, just a copy is returned. |
scalar Geo::OGR::Geometry::GeometryType | ( | ) |
scalar Geo::OGR::Geometry::GetCoordinateDimension | ( | ) |
scalar Geo::OGR::Geometry::GetDimension | ( | ) |
list Geo::OGR::Geometry::GetEnvelope | ( | ) |
list Geo::OGR::Geometry::GetEnvelope3D | ( | ) |
scalar Geo::OGR::Geometry::GetGeometryCount | ( | ) |
scalar Geo::OGR::Geometry::GetGeometryName | ( | ) |
scalar Geo::OGR::Geometry::GetGeometryRef | ( | scalar | index | ) |
index |
scalar Geo::OGR::Geometry::GetGeometryType | ( | ) |
list Geo::OGR::Geometry::GetPoint | ( | scalar | index = 0 | ) |
index |
scalar Geo::OGR::Geometry::GetPoint_2D | ( | scalar | index = 0 | ) |
index |
scalar Geo::OGR::Geometry::GetPoint_3D | ( | scalar | index = 0 | ) |
index |
scalar Geo::OGR::Geometry::GetPointCount | ( | ) |
scalar Geo::OGR::Geometry::GetX | ( | scalar | index = 0 | ) |
index |
scalar Geo::OGR::Geometry::GetY | ( | scalar | index = 0 | ) |
index |
scalar Geo::OGR::Geometry::GetZ | ( | scalar | index = 0 | ) |
index |
Geo::OGR::Geometry Geo::OGR::Geometry::Intersection | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
scalar Geo::OGR::Geometry::Intersects | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
scalar Geo::OGR::Geometry::IsEmpty | ( | ) |
Test whether the geometry is empty (has no points, or, for a point, has coordinate dimension of zero).
scalar Geo::OGR::Geometry::IsRing | ( | ) |
Test if the geometry is a ring. Requires GEOS in GDAL.
scalar Geo::OGR::Geometry::IsSimple | ( | ) |
Test the simplicity of the geometry (OGC sense). Requires GEOS in GDAL.
scalar Geo::OGR::Geometry::IsValid | ( | ) |
Test the validity of the geometry (OGC sense). Requires GEOS in GDAL.
scalar Geo::OGR::Geometry::Length | ( | ) |
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] |
Geo::OGR::Geometry Geo::OGR::Geometry::new | ( | scalar | type = scalar Geo::OGR::wkbUnknown , |
scalar | WKT = undef , |
||
scalar | WKB = undef , |
||
scalar | GML = undef |
||
) |
type | one of Geo::OGR::wkb* |
WKT | |
WKB | |
GML |
scalar Geo::OGR::Geometry::Overlaps | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
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] |
listref Geo::OGR::Geometry::Points | ( | listref | 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. |
Geo::OGR::Geometry::Segmentize | ( | scalar | MaxLength | ) |
Modify the geometry such it has no segment longer than the given length.
MaxLength | the given length |
Geo::OGR::Geometry::SetCoordinateDimension | ( | scalar | dimension | ) |
dimension |
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] |
Geo::OGR::Geometry::SetPoint_2D | ( | scalar | index, |
scalar | x, | ||
scalar | y | ||
) |
index | |
x | |
y |
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 |
Geo::OGR::Geometry Geo::OGR::Geometry::Simplify | ( | scalar | Tolerance | ) |
Simplify the geometry.
Tolerance | the length tolerance for the simplification |
Geo::OGR::Geometry Geo::OGR::Geometry::SymDifference | ( | scalar | other | ) |
Compute symmetric difference.
other | a Geo::OGR::Geometry object |
scalar Geo::OGR::Geometry::Touches | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
Geo::OGR::Geometry::Transform | ( | scalar | trans | ) |
trans | a Geo::OSR::CoordinateTransformation object |
Geo::OGR::Geometry::TransformTo | ( | scalar | srs | ) |
srs | a Geo::OSR::SpatialReference object |
Geo::OGR::Geometry Geo::OGR::Geometry::Union | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
scalar Geo::OGR::Geometry::Within | ( | scalar | other | ) |
other | a Geo::OGR::Geometry object |
scalar Geo::OGR::Geometry::WkbSize | ( | ) |
Byte order strings, one of: XDR NDR