#include <mi32/region2d.h>
The region can be represented by either a single rectangle or as a list of sub-regions.
Definition at line 637 of file region2d.h.
Definition at line 640 of file region2d.h.
| REGION2D::REGION2D | ( | ) |
Default constructor, initializes to an invalid region.
| REGION2D::REGION2D | ( | const REGION2D & | rhs | ) |
Copy constructor.
| REGION2D::REGION2D | ( | const SUBREGION2D & | SubRegion | ) |
Constructor from SUBREGION2D.
| REGION2D::~REGION2D | ( | ) |
Destructor.
| void REGION2D::AddSubRegion | ( | const SUBREGION2D & | SubRegion | ) |
Add a sub-region to the list without validating it. Used for CAD rendering.
| ERRVALUE REGION2D::Assign | ( | const POLYLINE & | PolyLine, | |
| const SIMPLE_ARRAY< INT32 > & | Index | |||
| ) |
Assign from a POLYLINE and an index array defining how the polyline is formatted.
| Index | Each entry is the number of points >0 is shell <0 is island |
| CONST_ITERATOR REGION2D::Begin | ( | ) | const [inline] |
Get the beginning of the list of SUBREGION's.
Definition at line 717 of file region2d.h.
| void REGION2D::Clear | ( | ) |
Clear the region.
| void REGION2D::ClearCoordRefSys | ( | ) |
Clear coordinate reference system.
| int REGION2D::ClipLine | ( | POLYLINE & | PolyLine, | |
| POLYLINE::CLIP & | ClipTarget, | |||
| CLIPMODE | ClipMode = CLIPMODE_Inside | |||
| ) | const |
Clip a polyline to a region, call the ClipTarget for each segment.
| double REGION2D::ComputeArea | ( | ) | const |
Compute the region area in region units.
| double REGION2D::ComputeAreaNoIslands | ( | ) | const |
Compute the region area in region units but do not exclude islands in the calculation.
| double REGION2D::ComputePerimeter | ( | ) | const |
Compute the region perimeter in region units.
| double REGION2D::ComputePerimeterNoIslands | ( | ) | const |
Compute the region perimeter in region units but do not include sub-region islands in the calculation.
| ERRVALUE REGION2D::ConvertForward | ( | const SPATREF::COORDOP & | Op | ) |
Translate the region using a coordinate operation (SPATREF::COORDOP) transformation Region coordinate reference system "GetCoordRefSys()' must equate to the Op.GetSourceCRS().
The Op.GetTargetCRS() is assigned as the region's COORDREFSYS after the transformation.
| ERRVALUE REGION2D::ConvertForward | ( | const TRANS2D_MAPGEN & | tmg | ) |
Translate the region using a mapgen transformation An error will occur if the COORDREFSYS of 'this' is not local and the TRANS2D_MAPGEN's input transformation is not identity or the COORDREFSYS of 'this' does not match the TRANS2D_MAPGEN's input COORDREFSYS.
If the TRANS2D_MAPGEN's output transformation is identity, 'this' COORDREFSYS will be set to the TRANS2D_MAPGEN's output COORDREFSYS. otherwise it will be set to "Undefined".
| void REGION2D::ConvertForward | ( | const TRANS2D_AFFINE & | taf | ) |
Translate the region using an affine transformation If the COORDREFSYS of 'this' is set, it will be changed to "Undefined".
| ERRVALUE REGION2D::ConvertForwardDense | ( | const SPATREF::COORDOP & | Op, | |
| double | tolerance | |||
| ) |
Translate the region using a coordinate operation (SPATREF::COORDOP) transformation with densification Region coordinate reference system "GetCoordRefSys()' must equate to the Op.GetSourceCRS().
The Op.GetTargetCRS() is assigned as the region's COORDREFSYS after the transformation.
| ERRVALUE REGION2D::ConvertForwardDense | ( | const TRANS2D_MAPGEN & | tmg | ) |
Translate the region using a mapgen transformation with densification An error will occur if the COORDREFSYS of 'this' is not local and the TRANS2D_MAPGEN's input transformation is not identity or the COORDREFSYS of 'this' does not match the TRANS2D_MAPGEN's input COORDREFSYS.
If the TRANS2D_MAPGEN's output transformation is identity, 'this' COORDREFSYS will be set to the TRANS2D_MAPGEN's output COORDREFSYS. otherwise it will be set to "Undefined".
| ERRVALUE REGION2D::ConvertInverse | ( | const TRANS2D_MAPGEN & | tmg | ) |
Translate the region using a mapgen transformation An error will occur if the COORDREFSYS of 'this' is not local and the TRANS2D_MAPGEN's output transformation is not identity or the COORDREFSYS of 'this' does not match the TRANS2D_MAPGEN's output COORDREFSYS.
If the TRANS2D_MAPGEN's input transformation is identity, 'this' COORDREFSYS will be set to the TRANS2D_MAPGEN's input COORDREFSYS otherwise it will be set to "Undefined".
| void REGION2D::ConvertInverse | ( | const TRANS2D_AFFINE & | taf | ) |
Translate the region using an affine transformation If the COORDREFSYS of 'this' is set, it will be changed to "Undefined".
| ERRVALUE REGION2D::ConvertInverseDense | ( | const TRANS2D_MAPGEN & | tmg | ) |
Translate the region using a mapgen transformation with densification An error will occur if the COORDREFSYS of 'this' is not local and the TRANS2D_MAPGEN's output transformation is not identity or the COORDREFSYS of 'this' does not match the TRANS2D_MAPGEN's output COORDREFSYS.
If the TRANS2D_MAPGEN's input transformation is identity, 'this' COORDREFSYS will be set to the TRANS2D_MAPGEN's input COORDREFSYS. otherwise it will be set to "Undefined".
| ERRVALUE REGION2D::ConvertReverse | ( | const SPATREF::COORDOP & | Op | ) |
Translate the region using a coordinate operation (SPATREF::COORDOP) transformation Region coordinate reference system "GetCoordRefSys()' must equate to the Op.GetTargetCRS().
The Op.GetSourceCRS() is assigned as the region's COORDREFSYS after the transformation.
| ERRVALUE REGION2D::ConvertReverseDense | ( | const SPATREF::COORDOP & | Op, | |
| double | tolerance | |||
| ) |
Translate the region using a coordinate operation (SPATREF::COORDOP) transformation with densification Region coordinate reference system "GetCoordRefSys()' must equate to the Op.GetTargetCRS().
The Op.GetSourceCRS() is assigned as the region's COORDREFSYS after the transformation.
| ERRVALUE REGION2D::ConvertTo | ( | const SPATREF::COORDREFSYS & | DestCoordRefSys, | |
| double | tolerance = 0.0 | |||
| ) |
Convert 'this' to a different COORDREFSYS.
| ERRVALUE REGION2D::CopyTo | ( | REGION2D & | target, | |
| COPYFILTER & | filter | |||
| ) | const |
Copy region to specified target with filter.
| target | Target subregion |
| filter | Filter to determine which subregions and islands to copy |
| CONST_ITERATOR REGION2D::End | ( | ) | const [inline] |
Get the end of the list of SUBREGION's.
Definition at line 844 of file region2d.h.
Exclusive Union (XOR) RegionB with RegionA and place in 'this' Will convert 'this' to RegionA's SPATREF::COORDREFSYS.
Exclusive Union (XOR) RegionB with 'this'.
| const SPATREF::COORDREFSYS& REGION2D::GetCoordRefSys | ( | ) | const [inline] |
Get the region's coordinate reference system.
Definition at line 861 of file region2d.h.
| const DRECT3D& REGION2D::GetExtents | ( | ) | const [inline] |
| const DRECT2D& REGION2D::GetExtents2D | ( | ) | const [inline] |
| INT32 REGION2D::GetNumSubRegions | ( | ) | const |
Get number of sub-regions.
Intersect RegionB with RegionA and place in 'this' Will convert 'this' to RegionA's SPATREF::COORDREFSYS.
| ERRVALUE REGION2D::Intersect | ( | const SUBREGION2D & | SubRegion | ) |
Intersect a sub-region with 'this'.
Intersect a validated polygon with 'this'.
| bool REGION2D::IsEmpty | ( | ) | const [inline] |
| bool REGION2D::IsEquivalentTo | ( | const REGION2D & | rhs, | |
| double | threshold = 0.0 | |||
| ) | const |
Determine if the two regions are equivalent This method uses "Fuzzy" vertex comparisons and the direction and order of the elements are not relevant Specify a different threshold to allow greater distances.
| threshold | Default threshold is max absolute value of rectangle coordinate * 1.0E-13 |
| bool REGION2D::IsPointInside | ( | const DPOINT2D & | point | ) | const |
Determine if the point falls inside the region.
| bool REGION2D::IsRectangle | ( | ) | const [inline] |
| REGION2D& REGION2D::operator= | ( | const SUBREGION2D & | SubRegion | ) |
Assignment from SUBREGION2D.
| void REGION2D::RemoveIslands | ( | ) |
Remove all of the islands from the region.
| void REGION2D::Reverse | ( | ) |
Reverse the orientation of the subregions in the region.
| void REGION2D::SetCoordRefSys | ( | const SPATREF::COORDREFSYS & | CoordSysRef | ) | [inline] |
Set the region's coordinate reference system Does not do any transformations of the region, assumes that the region is in the system specified.
Definition at line 945 of file region2d.h.
| void REGION2D::SetOrientation | ( | ORIENTATION | Orientation | ) |
Set region orientation Each subregion is set using SUBREGION2D::SetOrientation().
| void REGION2D::SetZRange | ( | const DOUBLE_RANGE & | range | ) |
Set the Z init and Z last fields of the extents box.
Subtract RegionB from RegionA and place in 'this' Will convert 'this' to RegionA's SPATREF::COORDREFSYS.
| ERRVALUE REGION2D::Subtract | ( | const SUBREGION2D & | SubRegion | ) |
Subtract a sub-region from 'this'.
Subtract a validated polygon from 'this'.
| bool REGION2D::TestLine | ( | const POLYLINE & | PolyLine, | |
| TESTCRITERIA | TestCriteria | |||
| ) | const |
Test the line given the test criteria against the region.
| bool REGION2D::TestPoint | ( | const DPOINT2D & | Point, | |
| TESTCRITERIA | TestCriteria | |||
| ) | const |
Test the point given the test criteria against the sub-region.
| bool REGION2D::TestPolygon | ( | const POLYLINE & | PolyLine, | |
| TESTCRITERIA | TestCriteria | |||
| ) | const |
Test the polygon given the test criteria against the region.
| bool REGION2D::TestRegion | ( | const REGION2D & | Region, | |
| TESTCRITERIA | TestCriteria | |||
| ) | const |
Test the 'Region' region given the test criteria against 'this' region.
| bool REGION2D::TestSubRegion | ( | const SUBREGION2D & | SubRegion, | |
| TESTCRITERIA | TestCriteria | |||
| ) | const |
Test the sub-region given the test criteria against the region.
Union (ADD) RegionB to RegionA and place in 'this' Will convert 'this' to RegionA's SPATREF::COORDREFSYS.
| ERRVALUE REGION2D::Union | ( | const SUBREGION2D & | SubRegion | ) |
Union (ADD) a sub-region to the region.
Union (ADD) a validated polygon to 'this'.
1.5.2