view release on metacpan or search on metacpan
geos-3.7.3/include/geos/operation/intersection/RectangleIntersectionBuilder.h
geos-3.7.3/include/geos/operation/IsSimpleOp.h
geos-3.7.3/include/geos/operation/linemerge/EdgeString.h
geos-3.7.3/include/geos/operation/linemerge/LineMergeDirectedEdge.h
geos-3.7.3/include/geos/operation/linemerge/LineMergeEdge.h
geos-3.7.3/include/geos/operation/linemerge/LineMergeGraph.h
geos-3.7.3/include/geos/operation/linemerge/LineMerger.h
geos-3.7.3/include/geos/operation/linemerge/LineSequencer.h
geos-3.7.3/include/geos/operation/linemerge/Makefile.am
geos-3.7.3/include/geos/operation/Makefile.am
geos-3.7.3/include/geos/operation/overlay/EdgeSetNoder.h
geos-3.7.3/include/geos/operation/overlay/ElevationMatrix.h
geos-3.7.3/include/geos/operation/overlay/ElevationMatrixCell.h
geos-3.7.3/include/geos/operation/overlay/LineBuilder.h
geos-3.7.3/include/geos/operation/overlay/Makefile.am
geos-3.7.3/include/geos/operation/overlay/MaximalEdgeRing.h
geos-3.7.3/include/geos/operation/overlay/MinimalEdgeRing.h
geos-3.7.3/include/geos/operation/overlay/MinimalEdgeRing.inl
geos-3.7.3/include/geos/operation/overlay/OverlayNodeFactory.h
geos-3.7.3/include/geos/operation/overlay/OverlayOp.h
geos-3.7.3/include/geos/operation/overlay/PointBuilder.h
geos-3.7.3/include/geos/operation/overlay/PolygonBuilder.h
geos-3.7.3/include/geos/operation/overlay/snap/GeometrySnapper.h
geos-3.7.3/include/geos/operation/overlay/snap/LineStringSnapper.h
geos-3.7.3/include/geos/operation/overlay/snap/Makefile.am
geos-3.7.3/include/geos/operation/overlay/snap/SnapIfNeededOverlayOp.h
geos-3.7.3/include/geos/operation/overlay/snap/SnapOverlayOp.h
geos-3.7.3/include/geos/operation/overlay/validate/FuzzyPointLocator.h
geos-3.7.3/include/geos/operation/overlay/validate/OffsetPointGenerator.h
geos-3.7.3/include/geos/operation/overlay/validate/OverlayResultValidator.h
geos-3.7.3/include/geos/operation/polygonize/EdgeRing.h
geos-3.7.3/include/geos/operation/polygonize/Makefile.am
geos-3.7.3/include/geos/operation/polygonize/PolygonizeDirectedEdge.h
geos-3.7.3/include/geos/operation/polygonize/PolygonizeEdge.h
geos-3.7.3/include/geos/operation/polygonize/PolygonizeGraph.h
geos-3.7.3/include/geos/operation/polygonize/Polygonizer.h
geos-3.7.3/include/geos/operation/predicate/Makefile.am
geos-3.7.3/include/geos/operation/predicate/RectangleContains.h
geos-3.7.3/include/geos/operation/predicate/RectangleIntersects.h
geos-3.7.3/include/geos/operation/predicate/SegmentIntersectionTester.h
geos-3.7.3/src/operation/intersection/RectangleIntersectionBuilder.cpp
geos-3.7.3/src/operation/IsSimpleOp.cpp
geos-3.7.3/src/operation/linemerge/EdgeString.cpp
geos-3.7.3/src/operation/linemerge/LineMergeDirectedEdge.cpp
geos-3.7.3/src/operation/linemerge/LineMergeEdge.cpp
geos-3.7.3/src/operation/linemerge/LineMergeGraph.cpp
geos-3.7.3/src/operation/linemerge/LineMerger.cpp
geos-3.7.3/src/operation/linemerge/LineSequencer.cpp
geos-3.7.3/src/operation/linemerge/Makefile.am
geos-3.7.3/src/operation/Makefile.am
geos-3.7.3/src/operation/overlay/EdgeSetNoder.cpp
geos-3.7.3/src/operation/overlay/ElevationMatrix.cpp
geos-3.7.3/src/operation/overlay/ElevationMatrixCell.cpp
geos-3.7.3/src/operation/overlay/LineBuilder.cpp
geos-3.7.3/src/operation/overlay/Makefile.am
geos-3.7.3/src/operation/overlay/MaximalEdgeRing.cpp
geos-3.7.3/src/operation/overlay/MinimalEdgeRing.cpp
geos-3.7.3/src/operation/overlay/OverlayNodeFactory.cpp
geos-3.7.3/src/operation/overlay/OverlayOp.cpp
geos-3.7.3/src/operation/overlay/PointBuilder.cpp
geos-3.7.3/src/operation/overlay/PolygonBuilder.cpp
geos-3.7.3/src/operation/overlay/snap/GeometrySnapper.cpp
geos-3.7.3/src/operation/overlay/snap/LineStringSnapper.cpp
geos-3.7.3/src/operation/overlay/snap/SnapIfNeededOverlayOp.cpp
geos-3.7.3/src/operation/overlay/snap/SnapOverlayOp.cpp
geos-3.7.3/src/operation/overlay/validate/FuzzyPointLocator.cpp
geos-3.7.3/src/operation/overlay/validate/OffsetPointGenerator.cpp
geos-3.7.3/src/operation/overlay/validate/OverlayResultValidator.cpp
geos-3.7.3/src/operation/polygonize/EdgeRing.cpp
geos-3.7.3/src/operation/polygonize/Makefile.am
geos-3.7.3/src/operation/polygonize/PolygonizeDirectedEdge.cpp
geos-3.7.3/src/operation/polygonize/PolygonizeEdge.cpp
geos-3.7.3/src/operation/polygonize/PolygonizeGraph.cpp
geos-3.7.3/src/operation/polygonize/Polygonizer.cpp
geos-3.7.3/src/operation/predicate/Makefile.am
geos-3.7.3/src/operation/predicate/RectangleContains.cpp
geos-3.7.3/src/operation/predicate/RectangleIntersects.cpp
geos-3.7.3/src/operation/predicate/SegmentIntersectionTester.cpp
geos-3.7.3/tests/unit/noding/snapround/HotPixelTest.cpp
geos-3.7.3/tests/unit/noding/snapround/MCIndexSnapRounderTest.cpp
geos-3.7.3/tests/unit/operation/buffer/BufferBuilderTest.cpp
geos-3.7.3/tests/unit/operation/buffer/BufferOpTest.cpp
geos-3.7.3/tests/unit/operation/buffer/BufferParametersTest.cpp
geos-3.7.3/tests/unit/operation/distance/DistanceOpTest.cpp
geos-3.7.3/tests/unit/operation/intersection/RectangleIntersectionTest.cpp
geos-3.7.3/tests/unit/operation/IsSimpleOpTest.cpp
geos-3.7.3/tests/unit/operation/linemerge/LineMergerTest.cpp
geos-3.7.3/tests/unit/operation/linemerge/LineSequencerTest.cpp
geos-3.7.3/tests/unit/operation/overlay/OverlayOpUnionTest.cpp
geos-3.7.3/tests/unit/operation/overlay/snap/GeometrySnapperTest.cpp
geos-3.7.3/tests/unit/operation/overlay/snap/LineStringSnapperTest.cpp
geos-3.7.3/tests/unit/operation/overlay/validate/FuzzyPointLocatorTest.cpp
geos-3.7.3/tests/unit/operation/overlay/validate/OffsetPointGeneratorTest.cpp
geos-3.7.3/tests/unit/operation/overlay/validate/OverlayResultValidatorTest.cpp
geos-3.7.3/tests/unit/operation/polygonize/PolygonizeTest.cpp
geos-3.7.3/tests/unit/operation/sharedpaths/SharedPathsOpTest.cpp
geos-3.7.3/tests/unit/operation/union/CascadedPolygonUnionTest.cpp
geos-3.7.3/tests/unit/operation/union/UnaryUnionOpTest.cpp
geos-3.7.3/tests/unit/operation/valid/IsValidTest.cpp
geos-3.7.3/tests/unit/operation/valid/ValidClosedRingTest.cpp
geos-3.7.3/tests/unit/operation/valid/ValidSelfTouchingRingFormingHoleTest.cpp
geos-3.7.3/tests/unit/precision/CommonBitsTest.cpp
geos-3.7.3/tests/unit/precision/GeometryPrecisionReducerTest.cpp
geos-3.7.3/tests/unit/precision/SimpleGeometryPrecisionReducerTest.cpp
geos-3.7.3/NEWS view on Meta::CPAN
(#917, Greg Troxel, Bas Couwenberg)
- include .editorconfig in tar ball,
fixes Cmake on VS (#920, Jeff Mckenna, Regina Obe)
- Ignore error in CoordinateArraySequenceFactoryTest
failing on FreeBSD/macOS Clang (#894)
Changes in 3.7.0rc1
2018-08-19
Fixes / enhancements since 3.7.0beta2
- Avoid segfault when querying empty tree (#730, framm)
- Collection with Empty components crashes overlay (#782, Dan Baston)
- Allow static library with C API for CMake builds (#878, Dakota Hawkins)
Changes in 3.7.0beta2
2018-08-06
Fixes since 3.7.0beta1
- Fix infinite loop in GEOSClipByRect (#865, Dan Baston)
- Make GEOSException inherit from std::runtime_error
to address clang warnings (Dan Baston)
- Add missing CMake files to tarball (#895, Regina Obe)
geos-3.7.3/NEWS view on Meta::CPAN
- New things:
- Delaunay Triangulation API (#487, #565, #570, #567)
- Interruptibility API (C and C++)
- CAPI: GEOSNode (#496) - PHP: Geometry->node
- GeometryPrecisionReducer class (#496, #526)
- BufferInputLineSimplifier header exposed (#548)
- New Centroid class supporting mixed geometry components (#612)
- io::Writer::reserve() method
- CAPI: GEOSNearestPoints
- Add --cclibs, --static-clibs and --static-cclibs to geos-config (#497)
- Early bail out of overlay exception if input is invalid
- C++ API changes:
- New noding::GeometryNoder class
- Added BufferOp::setSingleSided
- Signature of most functions taking a Label changed to take it
by reference rather than pointer.
- Signature of most functions taking an IntersectionMatrix changed
to take it by reference rather than pointer.
- GraphComponent::label is now a Label value (from a pointer)
- NodedSegmentString takes ownership of CoordinateSenuence now
geos-3.7.3/NEWS view on Meta::CPAN
- Bug fixes / improvements
- Correctly increment CAPI lib version from 3.3.3 (#558)
- Port robustness fix to CentroidArea (#559)
- Always return POINT from GEOSGetCentroid, even for EMPTY (#560)
- Always return POINT from GEOSPointOnSurface, even for EMPTY (#561)
Changes in 3.3.4
2012-05-31
- Bug fixes / improvements
- Do not abort on NaN overlay input (#530)
- Reduce CommonBitsRemover harmful effects during overlay op (#527)
- Better cross-compiler support (#534)
- Enable overlay ops short-circuits (#542)
- Envelope-based short-circuit for symDifference (#543)
- Fix support for PHP 5.4 (#513)
- Fix TopologyPreservingSimplifier invalid output on closed line (#508)
- Reduce calls to ptNotInList, greatly speeding up Polygonizer (#545)
Changes in 3.3.3
2012-04-01
- Bug fixes / improvements
- Fix simplification of collections with empty items (#519)
geos-3.7.3/NEWS view on Meta::CPAN
- Fix handling of collapsed edges skipping in BufferOp (#494)
- Print up to 18 digits of precision for TopologyException points
- Fix noding with reduced precision in Buffer operation (#473)
- Fix HotPixel original point invalidation (#498)
- Fix CascadedPolygonUnion to discard non-polygonal components (#499)
- Improve buffer robustness by reverting to non-snaprounding noder (#495)
- Fix C++11 build by avoiding std::pair<auto_ptr> (#491)
- Add --clibs to geos-config and GEOS_C_LIBS to geos.m4 (#497)
- Apply shoelace formula for area calculation (#485)
- Fix default initialization issue for clang (#500)
- Improve overlay robustness by fixing areal validity on snapping (#488)
Changes in 3.3.1
2011-09-27
- Bug fixes / improvements
- Fix memory leak on invalid geometry in InteriorPointArea (#475)
- ValidOp abort in presence of 2 touching holes forming an island (#449)
- Enable prepared intersects operation for points
- Fortify suspicious code found by static analysis tools
- Fix for SOLARIS build (#461)
geos-3.7.3/NEWS view on Meta::CPAN
These are mostly ABI breaking changes.
In few cases the API also changed, but the most external one
(the documented one) should be unchanged.
- New things:
- Added geom::BinaryOp class performing a binary operation
using different heuristics to reduce probability of robustness
issues. Both C-API and XMLTester now use this class for
binary operations.
- Added covers() and coveredBy() predicates to Geometry class
- Added overlay::overlayOp() adapter class
- Added GEOSSimplify() and GEOSTopologyPreserveSimplify()
to the C API
- Added closed ring checks in IsValidOp
- Multi-input support in XMLTester
- HEXWKB I/O
- Envelope(string) ctor
- Ruby interface
- New ShortCircuitedGeometryVisitor class
- New operation/predicate package
- Added CGAlgorithms::isPointInRing() version working with
geos-3.7.3/NEWS view on Meta::CPAN
and test/xmltester
- Moved C-API in it's own top-level dir capi/
- Reworked automake scripts to produce a static lib for each subdir
and then link all subsystem's libs togheter
- Renamed DefaultCoordinateSequence to CoordinateArraySequence.
- Renamed OverlayOp opcodes by prepending the 'op' prefix, and
given the enum a name (OpCode) for type-safety.
- Bug fixes:
- Fixed bug causing redundant linestrings to be returned in the
result of overlaying polygons containing touching holes (#13)
- Fixed integer conversion bug
- Fixed PointLocator handling of LinearRings
- Added missing ::clone() methods for Multi* geoms
- (Partial) Detailed list of changes:
- Changed SegmentNode to contain a *real* Coordinate (not a pointer)
to reduce construction costs.
- Changed geomgraph nodeMap to use Coordinate pointers as keys
- Envelope destructor made non-virtual to give compiler more static
binding options.
geos-3.7.3/NEWS view on Meta::CPAN
Changes in 2.1.1
- Fixed uninitialized Coordinate in TopologyException
- Added install of version.h, platform.h and timeval.h
- Memleak fix in PolygonizeGraph
- Memleak fix in OverlayOp
- Compiler warnings removal
- Cleaner w32 build
- Z interpolation in overlay operations
- Debian package build scripts
Changes in 2.1.0
- Added Polygonizer and LineMerger classes.
- python wrapper examples
- General cleanup / warnings removal
- cleaner win32 / older copilers builds
- Reduced heap allocations
- debian package builder scripts
- reduction of standard C lib headers dependency
- Z support in overlay operations.
Changes in 2.0.0
- CoordinateList renamed to CoordinateSequence, BasicCoordinateList
renamed to DefaultCoordinateSequence to reflect JTS changes.
DefaultCoordinateSequenceFactory and CoordinateSequenceFactory
got same interface as JTS.
- Added geos/version.h defining versioning infos
- Added geos.h for quick inclusion. It will include geos/geom.h,
geos-3.7.3/capi/geos_c.cpp view on Meta::CPAN
* Author: Sandro Santilli <strk@kbt.io>
*
***********************************************************************/
#include <geos/geom/prep/PreparedGeometryFactory.h>
#include <geos/index/strtree/STRtree.h>
#include <geos/io/WKTReader.h>
#include <geos/io/WKBReader.h>
#include <geos/io/WKTWriter.h>
#include <geos/io/WKBWriter.h>
#include <geos/operation/overlay/OverlayOp.h>
#include <geos/operation/union/CascadedPolygonUnion.h>
#include <geos/algorithm/distance/DiscreteHausdorffDistance.h>
#include <geos/algorithm/distance/DiscreteFrechetDistance.h>
#include <geos/util/Interrupt.h>
#include <stdexcept>
#include <new>
#ifdef _MSC_VER
#pragma warning(disable : 4099)
geos-3.7.3/capi/geos_c.cpp view on Meta::CPAN
using geos::geom::CoordinateSequence;
using geos::geom::GeometryFactory;
using geos::io::WKTReader;
using geos::io::WKTWriter;
using geos::io::WKBReader;
using geos::io::WKBWriter;
using geos::index::strtree::STRtree;
using geos::operation::overlay::OverlayOp;
using geos::operation::overlay::overlayOp;
using geos::operation::geounion::CascadedPolygonUnion;
typedef std::unique_ptr<Geometry> GeomPtr;
//## GLOBALS ################################################
// NOTE: SRID will have to be changed after geometry creation
GEOSContextHandle_t handle = NULL;
extern "C" {
geos-3.7.3/capi/geos_ts_c.cpp view on Meta::CPAN
#include <geos/simplify/DouglasPeuckerSimplifier.h>
#include <geos/simplify/TopologyPreservingSimplifier.h>
#include <geos/noding/GeometryNoder.h>
#include <geos/noding/Noder.h>
#include <geos/operation/buffer/BufferBuilder.h>
#include <geos/operation/buffer/BufferOp.h>
#include <geos/operation/buffer/BufferParameters.h>
#include <geos/operation/distance/DistanceOp.h>
#include <geos/operation/distance/IndexedFacetDistance.h>
#include <geos/operation/linemerge/LineMerger.h>
#include <geos/operation/overlay/OverlayOp.h>
#include <geos/operation/overlay/snap/GeometrySnapper.h>
#include <geos/operation/intersection/Rectangle.h>
#include <geos/operation/intersection/RectangleIntersection.h>
#include <geos/operation/polygonize/Polygonizer.h>
#include <geos/operation/relate/RelateOp.h>
#include <geos/operation/sharedpaths/SharedPathsOp.h>
#include <geos/operation/union/CascadedPolygonUnion.h>
#include <geos/operation/valid/IsValidOp.h>
#include <geos/precision/GeometryPrecisionReducer.h>
#include <geos/linearref/LengthIndexedLine.h>
#include <geos/triangulate/DelaunayTriangulationBuilder.h>
geos-3.7.3/capi/geos_ts_c.cpp view on Meta::CPAN
using geos::geom::Polygon;
using geos::geom::CoordinateSequence;
using geos::geom::GeometryCollection;
using geos::geom::GeometryFactory;
using geos::io::WKTReader;
using geos::io::WKTWriter;
using geos::io::WKBReader;
using geos::io::WKBWriter;
using geos::operation::overlay::OverlayOp;
using geos::operation::overlay::overlayOp;
using geos::operation::geounion::CascadedPolygonUnion;
using geos::operation::distance::IndexedFacetDistance;
using geos::operation::buffer::BufferParameters;
using geos::operation::buffer::BufferBuilder;
using geos::precision::GeometryPrecisionReducer;
using geos::util::IllegalArgumentException;
using geos::algorithm::distance::DiscreteHausdorffDistance;
using geos::algorithm::distance::DiscreteFrechetDistance;
typedef std::unique_ptr<Geometry> GeomPtr;
geos-3.7.3/capi/geos_ts_c.cpp view on Meta::CPAN
);
return outg.release();
}
GEOSGeometry *
GEOSSnap_r(GEOSContextHandle_t extHandle, const GEOSGeometry* g1,
const GEOSGeometry* g2, double tolerance)
{
using namespace geos::operation::overlay::snap;
if ( 0 == extHandle ) return 0;
GEOSContextHandleInternal_t *handle =
reinterpret_cast<GEOSContextHandleInternal_t*>(extHandle);
if ( handle->initialized == 0 ) return 0;
try{
GeometrySnapper snapper( *g1 );
std::unique_ptr<Geometry> ret = snapper.snapTo(*g2, tolerance);
return ret.release();
geos-3.7.3/configure.ac view on Meta::CPAN
include/geos/index/sweepline/Makefile
include/geos/io/Makefile
include/geos/linearref/Makefile
include/geos/noding/Makefile
include/geos/noding/snapround/Makefile
include/geos/operation/Makefile
include/geos/operation/buffer/Makefile
include/geos/operation/distance/Makefile
include/geos/operation/intersection/Makefile
include/geos/operation/linemerge/Makefile
include/geos/operation/overlay/Makefile
include/geos/operation/overlay/snap/Makefile
include/geos/operation/polygonize/Makefile
include/geos/operation/predicate/Makefile
include/geos/operation/relate/Makefile
include/geos/operation/sharedpaths/Makefile
include/geos/operation/union/Makefile
include/geos/operation/valid/Makefile
include/geos/planargraph/Makefile
include/geos/planargraph/algorithm/Makefile
include/geos/precision/Makefile
include/geos/simplify/Makefile
geos-3.7.3/configure.ac view on Meta::CPAN
src/index/sweepline/Makefile
src/io/Makefile
src/linearref/Makefile
src/noding/Makefile
src/noding/snapround/Makefile
src/operation/Makefile
src/operation/buffer/Makefile
src/operation/distance/Makefile
src/operation/intersection/Makefile
src/operation/linemerge/Makefile
src/operation/overlay/Makefile
src/operation/polygonize/Makefile
src/operation/predicate/Makefile
src/operation/relate/Makefile
src/operation/sharedpaths/Makefile
src/operation/union/Makefile
src/operation/valid/Makefile
src/planargraph/Makefile
src/precision/Makefile
src/simplify/Makefile
src/triangulate/Makefile
geos-3.7.3/include/geos/geom/BinaryOp.h view on Meta::CPAN
#include <geos/geom/Geometry.h>
#include <geos/geom/GeometryCollection.h>
#include <geos/geom/Polygon.h>
#include <geos/geom/Lineal.h>
#include <geos/geom/PrecisionModel.h>
#include <geos/geom/GeometryFactory.h>
#include <geos/precision/CommonBitsRemover.h>
#include <geos/precision/SimpleGeometryPrecisionReducer.h>
#include <geos/precision/GeometryPrecisionReducer.h>
#include <geos/operation/overlay/snap/GeometrySnapper.h>
#include <geos/simplify/TopologyPreservingSimplifier.h>
#include <geos/operation/IsSimpleOp.h>
#include <geos/operation/valid/IsValidOp.h>
#include <geos/operation/valid/TopologyValidationError.h>
#include <geos/util/TopologyException.h>
#include <geos/util.h>
#include <memory> // for unique_ptr
geos-3.7.3/include/geos/geom/BinaryOp.h view on Meta::CPAN
/// after snapping them to each other after common-bits
/// removal.
///
template <class BinOp>
std::unique_ptr<Geometry>
SnapOp(const Geometry* g0, const Geometry *g1, BinOp _Op)
{
typedef std::unique_ptr<Geometry> GeomPtr;
//using geos::precision::GeometrySnapper;
using geos::operation::overlay::snap::GeometrySnapper;
// Snap tolerance must be computed on the original
// (not commonbits-removed) geoms
double snapTolerance = GeometrySnapper::computeOverlaySnapTolerance(*g0, *g1);
#if GEOS_DEBUG_BINARYOP
std::cerr<< std::setprecision(20) << "Computed snap tolerance: "<<snapTolerance<<std::endl;
#endif
#if CBR_BEFORE_SNAPPING
geos-3.7.3/include/geos/geom/Geometry.h view on Meta::CPAN
* <P>
*
* The SFS does not specify an unambiguous representation of a given point set
* returned from a spatial analysis method. One goal of JTS is to make this
* specification precise and unambiguous. JTS will use a canonical form for
* <code>Geometry</code>s returned from spatial analysis methods. The canonical
* form is a <code>Geometry</code> which is simple and noded:
* <UL>
* <LI> Simple means that the Geometry returned will be simple according to
* the JTS definition of <code>isSimple</code>.
* <LI> Noded applies only to overlays involving <code>LineString</code>s. It
* means that all intersection points on <code>LineString</code>s will be
* present as endpoints of <code>LineString</code>s in the result.
* </UL>
* This definition implies that non-simple geometries which are arguments to
* spatial analysis methods must be subjected to a line-dissolve process to
* ensure that the results are simple.
*
* <H4> Constructed Points And The Precision Model </H4>
*
* The results computed by the set-theoretic methods may
geos-3.7.3/include/geos/opOverlay.h view on Meta::CPAN
*
**********************************************************************/
#ifndef GEOS_OPOVERLAY_H
#define GEOS_OPOVERLAY_H
namespace geos {
namespace operation {
/** \brief
* Contains classes that perform a topological overlay to compute boolean
* spatial functions.
*
* The Overlay Algorithm is used in spatial analysis methods for computing
* set-theoretic operations (boolean combinations) of input {@link Geometry}s.
* The algorithm for computing the overlay uses the intersection operations
* supported by topology graphs.
* To compute an overlay it is necessary to explicitly compute the resultant
* graph formed by the computed intersections.
*
* The algorithm to compute a set-theoretic spatial analysis method has the
* following steps:
*
* - Build topology graphs of the two input geometries. For each geometry all
* self-intersection nodes are computed and added to the graph.
* - Compute nodes for all intersections between edges and nodes of the graphs.
* - Compute the labeling for the computed nodes by merging the labels from
* the input graphs.
geos-3.7.3/include/geos/opOverlay.h view on Meta::CPAN
* and edges with the appropriate labels. Polygonize areas and sew linear
* geometries together.
*
* <h2>Package Specification</h2>
*
* - Java Topology Suite Technical Specifications
* - <A HREF="http://www.opengis.org/techno/specs.htm">
* OpenGIS Simple Features Specification for SQL</A>
*
*/
namespace overlay { // geos.operation.overlay
} // namespace geos.operation.overlay
} // namespace geos.operation
} // namespace geos
#include <geos/operation/overlay/OverlayOp.h>
//#include <geos/operation/overlay/PolygonBuilder.h>
//#include <geos/operation/overlay/PointBuilder.h>
//#include <geos/operation/overlay/LineBuilder.h>
//#include <geos/operation/overlay/MinimalEdgeRing.h>
//#include <geos/operation/overlay/MaximalEdgeRing.h>
//#include <geos/operation/overlay/OverlayNodeFactory.h>
//#include <geos/operation/overlay/EdgeSetNoder.h>
//#include <geos/operation/overlay/ElevationMatrix.h>
#endif
geos-3.7.3/include/geos/operation/Makefile.am view on Meta::CPAN
#
# This file is part of project GEOS (http://trac.osgeo.org/geos/)
#
SUBDIRS = \
buffer \
distance \
intersection \
linemerge \
overlay \
polygonize \
predicate \
relate \
union \
sharedpaths \
valid
#EXTRA_DIST =
geosdir = $(includedir)/geos/operation
geos-3.7.3/include/geos/operation/buffer/BufferBuilder.h view on Meta::CPAN
}
namespace geomgraph {
class Edge;
class Label;
class PlanarGraph;
}
namespace operation {
namespace buffer {
class BufferSubgraph;
}
namespace overlay {
class PolygonBuilder;
}
}
}
namespace geos {
namespace operation { // geos.operation
namespace buffer { // geos.operation.buffer
/**
geos-3.7.3/include/geos/operation/buffer/BufferBuilder.h view on Meta::CPAN
* Completes the building of the input subgraphs by
* depth-labelling them,
* and adds them to the PolygonBuilder.
* The subgraph list must be sorted in rightmost-coordinate order.
*
* @param subgraphList the subgraphs to build
* @param polyBuilder the PolygonBuilder which will build
* the final polygons
*/
void buildSubgraphs(const std::vector<BufferSubgraph*>& subgraphList,
overlay::PolygonBuilder& polyBuilder);
/// \brief
/// Return the externally-set noding::Noder OR a newly created
/// one using the given precisionModel.
//
/// NOTE: if an externally-set noding::Noder is available no
/// check is performed to ensure it will use the
/// given PrecisionModel
///
noding::Noder* getNoder(const geom::PrecisionModel* precisionModel);
geos-3.7.3/include/geos/operation/overlay/EdgeSetNoder.h view on Meta::CPAN
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
***********************************************************************
*
* Last port: operation/overlay/EdgeSetNoder.java rev. 1.12 (JTS-1.10)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_EDGESETNODER_H
#define GEOS_OP_OVERLAY_EDGESETNODER_H
#include <geos/export.h>
#include <vector>
geos-3.7.3/include/geos/operation/overlay/EdgeSetNoder.h view on Meta::CPAN
namespace geomgraph {
class Edge;
}
namespace algorithm {
class LineIntersector;
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
/** \brief
* Nodes a set of edges.
*
* Takes one or more sets of edges and constructs a
* new set of edges consisting of all the split edges created by
* noding the input edges together
*/
class GEOS_DLL EdgeSetNoder {
private:
geos-3.7.3/include/geos/operation/overlay/EdgeSetNoder.h view on Meta::CPAN
~EdgeSetNoder() {
delete inputEdges; // TODO: avoid heap allocation
}
void addEdges(std::vector<geomgraph::Edge*> *edges);
std::vector<geomgraph::Edge*>* getNodedEdges();
};
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#endif // ndef GEOS_OP_OVERLAY_EDGESETNODER_H
geos-3.7.3/include/geos/operation/overlay/ElevationMatrix.h view on Meta::CPAN
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_ELEVATIONMATRIX_H
#define GEOS_OP_OVERLAY_ELEVATIONMATRIX_H
#include <geos/export.h>
#include <geos/geom/CoordinateFilter.h> // for inheritance
#include <geos/geom/Envelope.h> // for composition
#include <geos/operation/overlay/ElevationMatrixCell.h> // for composition
#include <vector>
#include <string>
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
#endif
// Forward declarations
namespace geos {
namespace geom {
class Coordinate;
class Geometry;
}
namespace operation {
namespace overlay {
class ElevationMatrixFilter;
class ElevationMatrix;
}
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
/*
* This is the CoordinateFilter used by ElevationMatrix.
* filter_ro is used to add Geometry Coordinate's Z
* values to the matrix.
* filter_rw is used to actually elevate Geometries.
*/
class GEOS_DLL ElevationMatrixFilter: public geom::CoordinateFilter
{
geos-3.7.3/include/geos/operation/overlay/ElevationMatrix.h view on Meta::CPAN
geom::Envelope env;
unsigned int cols;
unsigned int rows;
double cellwidth;
double cellheight;
mutable bool avgElevationComputed;
mutable double avgElevation;
std::vector<ElevationMatrixCell>cells;
};
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif // ndef GEOS_OP_OVERLAY_ELEVATIONMATRIX_H
geos-3.7.3/include/geos/operation/overlay/ElevationMatrixCell.h view on Meta::CPAN
// Forward declarations
namespace geos {
namespace geom {
class Coordinate;
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
class GEOS_DLL ElevationMatrixCell {
public:
ElevationMatrixCell();
~ElevationMatrixCell();
void add(const geom::Coordinate &c);
void add(double z);
double getAvg(void) const;
double getTotal(void) const;
std::string print() const;
private:
std::set<double>zvals;
double ztot;
};
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif // ndef GEOS_OP_OVERLAY_ELEVATIONMATRIXCELL_H
geos-3.7.3/include/geos/operation/overlay/LineBuilder.h view on Meta::CPAN
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
***********************************************************************
*
* Last port: operation/overlay/LineBuilder.java rev. 1.15 (JTS-1.10)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_LINEBUILDER_H
#define GEOS_OP_OVERLAY_LINEBUILDER_H
#include <geos/export.h>
#include <geos/operation/overlay/OverlayOp.h> // for OverlayOp::OpCode enum
#include <vector>
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
#endif
// Forward declarations
namespace geos {
geos-3.7.3/include/geos/operation/overlay/LineBuilder.h view on Meta::CPAN
class LineString;
}
namespace geomgraph {
class DirectedEdge;
class Edge;
}
namespace algorithm {
class PointLocator;
}
namespace operation {
namespace overlay {
class OverlayOp;
}
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
/** \brief
* Forms JTS LineStrings out of a the graph of geomgraph::DirectedEdge
* created by an OverlayOp.
*
*/
class GEOS_DLL LineBuilder {
public:
LineBuilder(OverlayOp *newOp,
const geom::GeometryFactory *newGeometryFactory,
algorithm::PointLocator *newPtLocator);
~LineBuilder();
/**
* @return a list of the LineStrings in the result of the specified overlay operation
*/
std::vector<geom::LineString*>* build(OverlayOp::OpCode opCode);
/**
* Collect line edges which are in the result.
*
* Line edges are in the result if they are not part of
* an area boundary, if they are in the result of the overlay operation,
* and if they are not covered by a result area.
*
* @param de the directed edge to test.
* @param opCode the overlap operation
* @param edges the list of included line edges.
*/
void collectLineEdge(geomgraph::DirectedEdge *de,
OverlayOp::OpCode opCode,
std::vector<geomgraph::Edge*>* edges);
geos-3.7.3/include/geos/operation/overlay/LineBuilder.h view on Meta::CPAN
/*
* If the given CoordinateSequence has mixed 3d/2d vertexes
* set Z for all vertexes missing it.
* The Z value is interpolated between 3d vertexes and copied
* from a 3d vertex to the end.
*/
void propagateZ(geom::CoordinateSequence *cs);
};
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif // ndef GEOS_OP_OVERLAY_LINEBUILDER_H
geos-3.7.3/include/geos/operation/overlay/Makefile.am view on Meta::CPAN
#
# This file is part of project GEOS (http://trac.osgeo.org/geos/)
#
SUBDIRS = snap
#EXTRA_DIST =
geosdir = $(includedir)/geos/operation/overlay
geos_HEADERS = \
EdgeSetNoder.h \
ElevationMatrixCell.h \
ElevationMatrix.h \
LineBuilder.h \
MaximalEdgeRing.h \
MinimalEdgeRing.h \
MinimalEdgeRing.inl \
OverlayNodeFactory.h \
geos-3.7.3/include/geos/operation/overlay/MaximalEdgeRing.h view on Meta::CPAN
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: operation/overlay/MaximalEdgeRing.java rev. 1.15 (JTS-1.10)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_MAXIMALEDGERING_H
#define GEOS_OP_OVERLAY_MAXIMALEDGERING_H
#include <geos/export.h>
#include <vector>
geos-3.7.3/include/geos/operation/overlay/MaximalEdgeRing.h view on Meta::CPAN
// Forward declarations
namespace geos {
namespace geom {
class GeometryFactory;
}
namespace geomgraph {
class DirectedEdge;
//class EdgeRing;
}
namespace operation {
namespace overlay {
class MinimalEdgeRing;
}
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
/** \brief
* A ring of {@link edges} which may contain nodes of degree > 2.
*
* A MaximalEdgeRing may represent two different spatial entities:
*
* - a single polygon possibly containing inversions (if the ring is oriented CW)
* - a single hole possibly containing exversions (if the ring is oriented CCW)
*
* If the MaximalEdgeRing represents a polygon,
* the interior of the polygon is strongly connected.
*
* These are the form of rings used to define polygons under some spatial data models.
* However, under the OGC SFS model, {@link MinimalEdgeRings} are required.
* A MaximalEdgeRing can be converted to a list of MinimalEdgeRings using the
* {@link #buildMinimalRings() } method.
*
* @see com.vividsolutions.jts.operation.overlay.MinimalEdgeRing
*/
class GEOS_DLL MaximalEdgeRing: public geomgraph::EdgeRing {
public:
MaximalEdgeRing(geomgraph::DirectedEdge *start,
const geom::GeometryFactory *geometryFactory);
// throw(const TopologyException &)
~MaximalEdgeRing() override;
geos-3.7.3/include/geos/operation/overlay/MaximalEdgeRing.h view on Meta::CPAN
void buildMinimalRings(std::vector<EdgeRing*>& minEdgeRings);
/// \brief
/// For all nodes in this EdgeRing,
/// link the DirectedEdges at the node to form minimalEdgeRings
///
void linkDirectedEdgesForMinimalEdgeRings();
};
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#endif // ndef GEOS_OP_OVERLAY_MAXIMALEDGERING_H
geos-3.7.3/include/geos/operation/overlay/MinimalEdgeRing.h view on Meta::CPAN
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: operation/overlay/MinimalEdgeRing.java rev. 1.13 (JTS-1.10)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_MINIMALEDGERING_H
#define GEOS_OP_OVERLAY_MINIMALEDGERING_H
#include <geos/export.h>
#include <geos/geomgraph/EdgeRing.h> // for inheritance
#include <geos/geomgraph/DirectedEdge.h> // for inlines
geos-3.7.3/include/geos/operation/overlay/MinimalEdgeRing.h view on Meta::CPAN
class GeometryFactory;
}
namespace geomgraph {
class DirectedEdge;
class EdgeRing;
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
/** \brief
* A ring of {@link Edge}s with the property that no node
* has degree greater than 2.
*
* These are the form of rings required
* to represent polygons under the OGC SFS spatial data model.
*
* @see operation::overlay::MaximalEdgeRing
*
*/
class GEOS_DLL MinimalEdgeRing: public geomgraph::EdgeRing {
public:
// CGAlgorithms argument obsoleted
MinimalEdgeRing(geomgraph::DirectedEdge *start,
const geom::GeometryFactory *geometryFactory);
~MinimalEdgeRing() override;
geomgraph::DirectedEdge* getNext(geomgraph::DirectedEdge *de) override;
void setEdgeRing(geomgraph::DirectedEdge *de,
geomgraph::EdgeRing *er) override;
};
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#ifdef GEOS_INLINE
#include <geos/operation/overlay/MinimalEdgeRing.inl>
#endif
#endif // ndef GEOS_OP_OVERLAY_MINIMALEDGERING_H
geos-3.7.3/include/geos/operation/overlay/MinimalEdgeRing.inl view on Meta::CPAN
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: operation/overlay/MinimalEdgeRing.java rev. 1.13 (JTS-1.10)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_MINIMALEDGERING_INL
#define GEOS_OP_OVERLAY_MINIMALEDGERING_INL
#include <geos/operation/overlay/MinimalEdgeRing.h>
#if GEOS_DEBUG
#include <iostream>
#endif
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
INLINE void
MinimalEdgeRing::setEdgeRing(geomgraph::DirectedEdge *de, geomgraph::EdgeRing *er)
{
de->setMinEdgeRing(er);
}
INLINE geomgraph::DirectedEdge*
MinimalEdgeRing::getNext(geomgraph::DirectedEdge *de)
{
geos-3.7.3/include/geos/operation/overlay/MinimalEdgeRing.inl view on Meta::CPAN
}
INLINE
MinimalEdgeRing::~MinimalEdgeRing()
{
#if GEOS_DEBUG
std::cerr << "MinimalEdgeRing[" << this << "] dtor" << std::endl;
#endif
}
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#endif // GEOS_OP_OVERLAY_MINIMALEDGERING_INL
geos-3.7.3/include/geos/operation/overlay/OverlayNodeFactory.h view on Meta::CPAN
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: operation/overlay/OverlayNodeFactory.java rev. 1.11 (JTS-1.10)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_OVERLAYNODEFACTORY_H
#define GEOS_OP_OVERLAY_OVERLAYNODEFACTORY_H
#include <geos/export.h>
#include <vector>
geos-3.7.3/include/geos/operation/overlay/OverlayNodeFactory.h view on Meta::CPAN
namespace geom {
class Coordinate;
}
namespace geomgraph {
class Node;
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
/** \brief
* Creates nodes for use in the geomgraph::PlanarGraph constructed during
* overlay operations. NOTE: also used by operation::valid
*/
class GEOS_DLL OverlayNodeFactory: public geomgraph::NodeFactory {
public:
OverlayNodeFactory():geomgraph::NodeFactory() {}
geomgraph::Node* createNode(const geom::Coordinate &coord) const override;
static const geomgraph::NodeFactory &instance();
};
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#endif // ndef GEOS_OP_OVERLAY_OVERLAYNODEFACTORY_H
geos-3.7.3/include/geos/operation/overlay/OverlayOp.h view on Meta::CPAN
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
***********************************************************************
*
* Last port: operation/overlay/OverlayOp.java r567 (JTS-1.12+)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_OVERLAYOP_H
#define GEOS_OP_OVERLAY_OVERLAYOP_H
#include <geos/export.h>
#include <geos/operation/GeometryGraphOperation.h> // for inheritance
#include <geos/geomgraph/EdgeList.h> // for composition
geos-3.7.3/include/geos/operation/overlay/OverlayOp.h view on Meta::CPAN
class Polygon;
class LineString;
class Point;
}
namespace geomgraph {
class Label;
class Edge;
class Node;
}
namespace operation {
namespace overlay {
class ElevationMatrix;
}
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
/// Computes the geometric overlay of two Geometry.
//
/// The overlay can be used to determine any
/// boolean combination of the geometries.
///
class GEOS_DLL OverlayOp: public GeometryGraphOperation {
public:
/// The spatial functions supported by this class.
//
/// These operations implement various boolean combinations of
/// the resultants of the overlay.
///
enum OpCode {
/// The code for the Intersection overlay operation.
opINTERSECTION = 1,
/// The code for the Union overlay operation.
opUNION = 2,
/// The code for the Difference overlay operation.
opDIFFERENCE = 3,
/// The code for the Symmetric Difference overlay operation.
opSYMDIFFERENCE = 4
};
/**
* Computes an overlay operation for the given geometry arguments.
*
* @param geom0 the first geometry argument
* @param geom1 the second geometry argument
* @param opCode the code for the desired overlay operation
* @return the result of the overlay operation
* @throws TopologyException if a robustness problem is encountered
*/
static geom::Geometry* overlayOp(const geom::Geometry *geom0,
const geom::Geometry *geom1,
OpCode opCode);
//throw(TopologyException *);
/**
* Tests whether a point with a given topological {@link Label}
* relative to two geometries is contained in
* the result of overlaying the geometries using
* a given overlay operation.
*
* The method handles arguments of {@link Location#NONE} correctly
*
* @param label the topological label of the point
* @param opCode the code for the overlay operation to test
* @return true if the label locations correspond to the overlayOpCode
*/
static bool isResultOfOp(const geomgraph::Label& label, OpCode opCode);
/// This method will handle arguments of Location.NULL correctly
//
/// @return true if the locations correspond to the opCode
///
static bool isResultOfOp(int loc0, int loc1, OpCode opCode);
/// Construct an OverlayOp with the given Geometry args.
//
/// Ownership of passed args will remain to caller, and
/// the OverlayOp won't change them in any way.
///
OverlayOp(const geom::Geometry *g0, const geom::Geometry *g1);
~OverlayOp() override; // FIXME: virtual ?
/**
* Gets the result of the overlay for a given overlay operation.
*
* Note: this method can be called once only.
*
* @param overlayOpCode the overlay operation to perform
* @return the compute result geometry
* @throws TopologyException if a robustness problem is encountered
*/
geom::Geometry* getResultGeometry(OpCode overlayOpCode);
// throw(TopologyException *);
/**
* Gets the graph constructed to compute the overlay.
*
* @return the overlay graph
*/
geomgraph::PlanarGraph& getGraph() { return graph; }
/** \brief
* This method is used to decide if a point node should be included
* in the result or not.
*
* @return true if the coord point is covered by a result Line
* or Area geometry
*/
geos-3.7.3/include/geos/operation/overlay/OverlayOp.h view on Meta::CPAN
ElevationMatrix *elevationMatrix;
/// Throw TopologyException if an obviously wrong result has
/// been computed.
void checkObviouslyWrongResult(OpCode opCode);
};
/** \brief
* OverlayOp::overlayOp Adapter for use with geom::BinaryOp
*/
struct overlayOp {
OverlayOp::OpCode opCode;
overlayOp(OverlayOp::OpCode code)
:
opCode(code)
{}
geom::Geometry* operator() (const geom::Geometry* g0,
const geom::Geometry* g1)
{
return OverlayOp::overlayOp(g0, g1, opCode);
}
};
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif // ndef GEOS_OP_OVERLAY_OVERLAYOP_H
geos-3.7.3/include/geos/operation/overlay/PointBuilder.h view on Meta::CPAN
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
***********************************************************************
*
* Last port: operation/overlay/PointBuilder.java rev. 1.16 (JTS-1.10)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_POINTBUILDER_H
#define GEOS_OP_OVERLAY_POINTBUILDER_H
#include <geos/export.h>
#include <geos/geom/GeometryFactory.h> // for inlines
#include <geos/operation/overlay/OverlayOp.h> // for OpCode enum
#include <geos/util.h>
#include <vector>
// Forward declarations
namespace geos {
namespace geom {
class GeometryFactory;
class Point;
}
namespace geomgraph {
class Node;
}
namespace algorithm {
class PointLocator;
}
namespace operation {
namespace overlay {
class OverlayOp;
}
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
/** \brief
* Constructs geom::Point s from the nodes of an overlay graph.
*/
class GEOS_DLL PointBuilder {
private:
OverlayOp *op;
const geom::GeometryFactory *geometryFactory;
void extractNonCoveredResultNodes(OverlayOp::OpCode opCode);
/*
* Converts non-covered nodes to Point objects and adds them to
geos-3.7.3/include/geos/operation/overlay/PointBuilder.h view on Meta::CPAN
:
op(newOp),
geometryFactory(newGeometryFactory),
resultPointList(new std::vector<geom::Point *>())
{
::geos::ignore_unused_variable_warning(newPtLocator);
}
/**
* @return a list of the Points in the result of the specified
* overlay operation
*/
std::vector<geom::Point*>* build(OverlayOp::OpCode opCode);
};
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#endif // ndef GEOS_OP_OVERLAY_POINTBUILDER_H
geos-3.7.3/include/geos/operation/overlay/PolygonBuilder.h view on Meta::CPAN
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
*
* Last port: operation/overlay/PolygonBuilder.java rev. 1.20 (JTS-1.10)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_POLYGONBUILDER_H
#define GEOS_OP_OVERLAY_POLYGONBUILDER_H
#include <geos/export.h>
#include <vector>
geos-3.7.3/include/geos/operation/overlay/PolygonBuilder.h view on Meta::CPAN
class Coordinate;
class GeometryFactory;
}
namespace geomgraph {
class EdgeRing;
class Node;
class PlanarGraph;
class DirectedEdge;
}
namespace operation {
namespace overlay {
class MaximalEdgeRing;
class MinimalEdgeRing;
}
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
/** \brief
* Forms Polygon out of a graph of geomgraph::DirectedEdge.
*
* The edges to use are marked as being in the result Area.
*/
class GEOS_DLL PolygonBuilder {
public:
PolygonBuilder(const geom::GeometryFactory *newGeometryFactory);
geos-3.7.3/include/geos/operation/overlay/PolygonBuilder.h view on Meta::CPAN
std::vector<geom::Geometry*>* computePolygons(
std::vector<geomgraph::EdgeRing*>& newShellList);
/**
* Checks the current set of shells (with their associated holes) to
* see if any of them contain the point.
*/
};
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif // ndef GEOS_OP_OVERLAY_POLYGONBUILDER_H
geos-3.7.3/include/geos/operation/overlay/snap/GeometrySnapper.h view on Meta::CPAN
* Copyright (C) 2009-2010 Sandro Santilli <strk@kbt.io>
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
***********************************************************************
*
* Last port: operation/overlay/snap/GeometrySnapper.java r320 (JTS-1.12)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_SNAP_GEOMETRYSNAPPER_H
#define GEOS_OP_OVERLAY_SNAP_GEOMETRYSNAPPER_H
#include <geos/geom/Coordinate.h>
#include <memory>
#include <vector>
geos-3.7.3/include/geos/operation/overlay/snap/GeometrySnapper.h view on Meta::CPAN
namespace geom {
//class PrecisionModel;
class Geometry;
class CoordinateSequence;
struct GeomPtrPair;
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
namespace snap { // geos::operation::overlay::snap
/** \brief
* Snaps the vertices and segments of a {@link Geometry}
* to another Geometry's vertices.
*
* A snap distance tolerance is used to control where snapping is performed.
* Snapping one geometry to another can improve
* robustness for overlay operations by eliminating
* nearly-coincident edges
* (which cause problems during noding and intersection calculation).
* Too much snapping can result in invalid topology
* being created, so the number and location of snapped vertices
* is decided using heuristics to determine when it
* is safe to snap.
* This can result in some potential snaps being omitted, however.
*/
class GEOS_DLL GeometrySnapper {
geos-3.7.3/include/geos/operation/overlay/snap/GeometrySnapper.h view on Meta::CPAN
/// Extract target (unique) coordinates
std::unique_ptr<geom::Coordinate::ConstVect> extractTargetCoordinates(
const geom::Geometry& g);
// Declare type as noncopyable
GeometrySnapper(const GeometrySnapper& other) = delete;
GeometrySnapper& operator=(const GeometrySnapper& rhs) = delete;
};
} // namespace geos::operation::overlay::snap
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#endif // GEOS_OP_OVERLAY_SNAP_GEOMETRYSNAPPER_H
geos-3.7.3/include/geos/operation/overlay/snap/LineStringSnapper.h view on Meta::CPAN
* Copyright (C) 2009-2010 Sandro Santilli <strk@kbt.io>
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
***********************************************************************
*
* Last port: operation/overlay/snap/LineStringSnapper.java r320 (JTS-1.12)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_SNAP_LINESTRINGSNAPPER_H
#define GEOS_OP_OVERLAY_SNAP_LINESTRINGSNAPPER_H
#include <geos/geom/Coordinate.h>
#include <geos/geom/CoordinateSequence.h>
#include <geos/geom/CoordinateList.h>
geos-3.7.3/include/geos/operation/overlay/snap/LineStringSnapper.h view on Meta::CPAN
namespace geom {
//class PrecisionModel;
//class CoordinateSequence;
class CoordinateList;
class Geometry;
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
namespace snap { // geos::operation::overlay::snap
/** \brief
* Snaps the vertices and segments of a LineString to a set
* of target snap vertices.
*
* A snapping distance tolerance is used to control where snapping is performed.
*
*/
class GEOS_DLL LineStringSnapper {
geos-3.7.3/include/geos/operation/overlay/snap/LineStringSnapper.h view on Meta::CPAN
const geom::Coordinate& snapPt,
geom::CoordinateList::iterator from,
geom::CoordinateList::iterator too_far);
// Declare type as noncopyable
LineStringSnapper(const LineStringSnapper& other) = delete;
LineStringSnapper& operator=(const LineStringSnapper& rhs) = delete;
};
} // namespace geos::operation::overlay::snap
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#endif // GEOS_OP_OVERLAY_SNAP_LINESTRINGSNAPPER_H
geos-3.7.3/include/geos/operation/overlay/snap/Makefile.am view on Meta::CPAN
#
# This file is part of project GEOS (http://trac.osgeo.org/geos/)
#
#SUBDIRS =
#EXTRA_DIST =
geosdir = $(includedir)/geos/operation/overlay/snap
geos_HEADERS = \
GeometrySnapper.h \
LineStringSnapper.h \
SnapIfNeededOverlayOp.h \
SnapOverlayOp.h
geos-3.7.3/include/geos/operation/overlay/snap/SnapIfNeededOverlayOp.h view on Meta::CPAN
*
* Copyright (C) 2009 2011 Sandro Santilli <strk@kbt.io>
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
***********************************************************************
*
* Last port: operation/overlay/snap/SnapIfNeededOverlayOp.java r320 (JTS-1.12)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_SNAP_SNAPIFNEEDEDOVERLAYOP_H
#define GEOS_OP_OVERLAY_SNAP_SNAPIFNEEDEDOVERLAYOP_H
#include <geos/operation/overlay/OverlayOp.h> // for enums
#include <memory> // for unique_ptr
// Forward declarations
namespace geos {
namespace geom {
class Geometry;
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
namespace snap { // geos::operation::overlay::snap
/** \brief
* Performs an overlay operation using snapping and enhanced precision
* to improve the robustness of the result.
*
* This class only uses snapping
* if an error is detected when running the standard JTS overlay code.
* Errors detected include thrown exceptions
* (in particular, {@link TopologyException})
* and invalid overlay computations.
*
*/
class SnapIfNeededOverlayOp
{
public:
static std::unique_ptr<geom::Geometry>
overlayOp(const geom::Geometry& g0, const geom::Geometry& g1,
OverlayOp::OpCode opCode)
{
SnapIfNeededOverlayOp op(g0, g1);
return op.getResultGeometry(opCode);
}
static std::unique_ptr<geom::Geometry>
intersection(const geom::Geometry& g0, const geom::Geometry& g1)
{
return overlayOp(g0, g1, OverlayOp::opINTERSECTION);
}
static std::unique_ptr<geom::Geometry>
Union(const geom::Geometry& g0, const geom::Geometry& g1)
{
return overlayOp(g0, g1, OverlayOp::opUNION);
}
static std::unique_ptr<geom::Geometry>
difference(const geom::Geometry& g0, const geom::Geometry& g1)
{
return overlayOp(g0, g1, OverlayOp::opDIFFERENCE);
}
static std::unique_ptr<geom::Geometry>
symDifference(const geom::Geometry& g0, const geom::Geometry& g1)
{
return overlayOp(g0, g1, OverlayOp::opSYMDIFFERENCE);
}
SnapIfNeededOverlayOp(const geom::Geometry& g1, const geom::Geometry& g2)
:
geom0(g1),
geom1(g2)
{
}
geos-3.7.3/include/geos/operation/overlay/snap/SnapIfNeededOverlayOp.h view on Meta::CPAN
const geom::Geometry& geom0;
const geom::Geometry& geom1;
// Declare type as noncopyable
SnapIfNeededOverlayOp(const SnapIfNeededOverlayOp& other) = delete;
SnapIfNeededOverlayOp& operator=(const SnapIfNeededOverlayOp& rhs) = delete;
};
} // namespace geos::operation::overlay::snap
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#endif // ndef GEOS_OP_OVERLAY_SNAP_SNAPIFNEEDEDOVERLAYOP_H
geos-3.7.3/include/geos/operation/overlay/snap/SnapOverlayOp.h view on Meta::CPAN
*
* Copyright (C) 2009 Sandro Santilli <strk@kbt.io>
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
***********************************************************************
*
* Last port: operation/overlay/snap/SnapOverlayOp.java r320 (JTS-1.12)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_SNAP_SNAPOVERLAYOP_H
#define GEOS_OP_OVERLAY_SNAP_SNAPOVERLAYOP_H
#include <geos/operation/overlay/OverlayOp.h> // for enums
#include <geos/precision/CommonBitsRemover.h> // for dtor visibility by unique_ptr
#include <memory> // for unique_ptr
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
#endif
// Forward declarations
namespace geos {
namespace geom {
class Geometry;
struct GeomPtrPair;
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
namespace snap { // geos::operation::overlay::snap
/** \brief
* Performs an overlay operation using snapping and enhanced precision
* to improve the robustness of the result.
*
* This class <i>always</i> uses snapping.
* This is less performant than the standard JTS overlay code,
* and may even introduce errors which were not present in the original data.
* For this reason, this class should only be used
* if the standard overlay code fails to produce a correct result.
*
*/
class GEOS_DLL SnapOverlayOp
{
public:
static std::unique_ptr<geom::Geometry>
overlayOp(const geom::Geometry& g0, const geom::Geometry& g1,
OverlayOp::OpCode opCode)
{
SnapOverlayOp op(g0, g1);
return op.getResultGeometry(opCode);
}
static std::unique_ptr<geom::Geometry>
intersection(const geom::Geometry& g0, const geom::Geometry& g1)
{
return overlayOp(g0, g1, OverlayOp::opINTERSECTION);
}
static std::unique_ptr<geom::Geometry>
Union(const geom::Geometry& g0, const geom::Geometry& g1)
{
return overlayOp(g0, g1, OverlayOp::opUNION);
}
static std::unique_ptr<geom::Geometry>
difference(const geom::Geometry& g0, const geom::Geometry& g1)
{
return overlayOp(g0, g1, OverlayOp::opDIFFERENCE);
}
static std::unique_ptr<geom::Geometry>
symDifference(const geom::Geometry& g0, const geom::Geometry& g1)
{
return overlayOp(g0, g1, OverlayOp::opSYMDIFFERENCE);
}
SnapOverlayOp(const geom::Geometry& g1, const geom::Geometry& g2)
:
geom0(g1),
geom1(g2)
{
computeSnapTolerance();
}
geos-3.7.3/include/geos/operation/overlay/snap/SnapOverlayOp.h view on Meta::CPAN
double snapTolerance;
std::unique_ptr<precision::CommonBitsRemover> cbr;
// Declare type as noncopyable
SnapOverlayOp(const SnapOverlayOp& other) = delete;
SnapOverlayOp& operator=(const SnapOverlayOp& rhs) = delete;
};
} // namespace geos::operation::overlay::snap
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif // ndef GEOS_OP_OVERLAY_SNAP_SNAPOVERLAYOP_H
geos-3.7.3/include/geos/operation/overlay/validate/FuzzyPointLocator.h view on Meta::CPAN
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
***********************************************************************
*
* Last port: operation/overlay/validate/FuzzyPointLocator.java rev. 1.1 (JTS-1.10)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
#define GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
#include <geos/export.h>
#include <geos/algorithm/PointLocator.h> // for composition
#include <geos/geom/Geometry.h> // for unique_ptr visibility of dtor
#include <geos/geom/Location.h> // for Location::Value enum
geos-3.7.3/include/geos/operation/overlay/validate/FuzzyPointLocator.h view on Meta::CPAN
// Forward declarations
namespace geos {
namespace geom {
class Geometry;
class Coordinate;
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
namespace validate { // geos::operation::overlay::validate
/** \brief
* Finds the most likely Location of a point relative to
* the polygonal components of a geometry, using a tolerance value.
*
* If a point is not clearly in the Interior or Exterior,
* it is considered to be on the Boundary.
* In other words, if the point is within the tolerance of the Boundary,
* it is considered to be on the Boundary; otherwise,
* whether it is Interior or Exterior is determined directly.
geos-3.7.3/include/geos/operation/overlay/validate/FuzzyPointLocator.h view on Meta::CPAN
//
/// @param g the geometry from which to extract
/// @return a lineal geometry containing the extracted linework
std::unique_ptr<geom::Geometry> extractLineWork(const geom::Geometry& geom);
// Declare type as noncopyable
FuzzyPointLocator(const FuzzyPointLocator& other) = delete;
FuzzyPointLocator& operator=(const FuzzyPointLocator& rhs) = delete;
};
} // namespace geos::operation::overlay::validate
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif // ndef GEOS_OP_OVERLAY_FUZZYPOINTLOCATOR_H
geos-3.7.3/include/geos/operation/overlay/validate/OffsetPointGenerator.h view on Meta::CPAN
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
***********************************************************************
*
* Last port: operation/overlay/validate/OffsetPointGenerator.java rev. 1.1 (JTS-1.10)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_OFFSETPOINTGENERATOR_H
#define GEOS_OP_OVERLAY_OFFSETPOINTGENERATOR_H
#include <geos/export.h>
#include <geos/algorithm/PointLocator.h> // for composition
#include <geos/geom/Geometry.h> // for unique_ptr visibility of dtor
#include <geos/geom/MultiPoint.h> // for unique_ptr visibility of dtor
geos-3.7.3/include/geos/operation/overlay/validate/OffsetPointGenerator.h view on Meta::CPAN
namespace geom {
//class Geometry;
//class MultiPoint;
class LineString;
//class Coordinate;
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
namespace validate { // geos::operation::overlay::validate
/// Generates points offset from both sides of all segments in a geometry
//
class GEOS_DLL OffsetPointGenerator {
public:
OffsetPointGenerator(const geom::Geometry& geom, double offset);
/// Gets the computed offset points.
geos-3.7.3/include/geos/operation/overlay/validate/OffsetPointGenerator.h view on Meta::CPAN
void extractPoints(const geom::LineString* line);
void computeOffsets(const geom::Coordinate& p0,
const geom::Coordinate& p1);
// Declare type as noncopyable
OffsetPointGenerator(const OffsetPointGenerator& other) = delete;
OffsetPointGenerator& operator=(const OffsetPointGenerator& rhs) = delete;
};
} // namespace geos::operation::overlay::validate
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif // ndef GEOS_OP_OVERLAY_OFFSETPOINTGENERATOR_H
geos-3.7.3/include/geos/operation/overlay/validate/OverlayResultValidator.h view on Meta::CPAN
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Public Licence as published
* by the Free Software Foundation.
* See the COPYING file for more information.
*
***********************************************************************
*
* Last port: operation/overlay/validate/OverlayResultValidator.java rev. 1.4 (JTS-1.10)
*
**********************************************************************/
#ifndef GEOS_OP_OVERLAY_OVERLAYRESULTVALIDATOR_H
#define GEOS_OP_OVERLAY_OVERLAYRESULTVALIDATOR_H
#include <geos/export.h>
#include <geos/operation/overlay/OverlayOp.h> // for OpCode enum
#include <geos/operation/overlay/validate/FuzzyPointLocator.h> // composition
#include <geos/geom/Location.h> // for Location::Value type
#include <vector>
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
#endif
// Forward declarations
namespace geos {
namespace geom {
class Geometry;
class Coordinate;
}
}
namespace geos {
namespace operation { // geos::operation
namespace overlay { // geos::operation::overlay
namespace validate { // geos::operation::overlay::validate
/** \brief
* Validates that the result of an overlay operation is
* geometrically correct within a determined tolerance.
*
* Uses fuzzy point location to find points which are
* definitely in either the interior or exterior of the result
* geometry, and compares these results with the expected ones.
*
* This algorithm is only useful where the inputs are polygonal.
*
* This is a heuristic test, and may return false positive results
* (I.e. it may fail to detect an invalid result.)
geos-3.7.3/include/geos/operation/overlay/validate/OverlayResultValidator.h view on Meta::CPAN
FuzzyPointLocator fplres;
geom::Coordinate invalidLocation;
std::vector<geom::Coordinate> testCoords;
void addTestPts(const geom::Geometry& g);
void addVertices(const geom::Geometry& g);
bool testValid(OverlayOp::OpCode overlayOp);
bool testValid(OverlayOp::OpCode overlayOp, const geom::Coordinate& pt);
bool isValidResult(OverlayOp::OpCode overlayOp,
std::vector<geom::Location::Value>& location);
static double computeBoundaryDistanceTolerance(
const geom::Geometry& g0, const geom::Geometry& g1);
// Declare type as noncopyable
OverlayResultValidator(const OverlayResultValidator& other) = delete;
OverlayResultValidator& operator=(const OverlayResultValidator& rhs) = delete;
};
} // namespace geos::operation::overlay::validate
} // namespace geos::operation::overlay
} // namespace geos::operation
} // namespace geos
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif // ndef GEOS_OP_OVERLAY_OVERLAYRESULTVALIDATOR_H