InputGeometry.h
/**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2020 Paul Ramsey <pramsey@cleverelephant.ca>
*
* 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.
*
**********************************************************************/
#pragma once
#include <geos/algorithm/locate/IndexedPointInAreaLocator.h>
#include <geos/algorithm/locate/PointOnGeometryLocator.h>
#include <geos/geom/Coordinate.h>
#include <geos/geom/Envelope.h>
#include <geos/geom/Geometry.h>
#include <geos/geom/Location.h>
#include <geos/export.h>
#include <array>
namespace geos { // geos.
namespace operation { // geos.operation
namespace overlayng { // geos.operation.overlayng
class GEOS_DLL InputGeometry {
using Geometry = geos::geom::Geometry;
using Envelope = geos::geom::Envelope;
using Coordinate = geos::geom::Coordinate;
using Location = geos::geom::Location;
using PointOnGeometryLocator = geos::algorithm::locate::PointOnGeometryLocator;
private:
// Members
std::array<const Geometry*, 2> geom;
std::unique_ptr<PointOnGeometryLocator> ptLocatorA;
std::unique_ptr<PointOnGeometryLocator> ptLocatorB;
std::array<bool, 2> isCollapsed;
public:
InputGeometry(const Geometry* geomA, const Geometry* geomB);
bool isSingle() const;
int getDimension(uint8_t index) const;
uint8_t getCoordinateDimension(uint8_t index) const;
const Geometry* getGeometry(uint8_t geomIndex) const;
const Envelope* getEnvelope(uint8_t geomIndex) const;
bool isEmpty(uint8_t geomIndex) const;
bool isArea(uint8_t geomIndex) const;
int getAreaIndex() const;
bool isLine(uint8_t geomIndex) const;
bool isAllPoints() const;
bool hasPoints() const;
bool hasEdges(uint8_t geomIndex) const;
Location locatePointInArea(uint8_t geomIndex, const Coordinate& pt);
PointOnGeometryLocator* getLocator(uint8_t geomIndex);
void setCollapsed(uint8_t geomIndex, bool isGeomCollapsed);
};
} // namespace geos.operation.overlayng
} // namespace geos.operation
} // namespace geos
geos::algorithm::locate::PointOnGeometryLocator
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
Definition PointOnGeometryLocator.h:36
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
geos::geom::Envelope
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:59
geos::geom::Geometry
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
geos::operation::overlayng::InputGeometry::hasEdges
bool hasEdges(uint8_t geomIndex) const
geos::operation::overlayng::InputGeometry::locatePointInArea
Location locatePointInArea(uint8_t geomIndex, const Coordinate &pt)
geos::geom::Location
Location
Constants representing the location of a point relative to a geometry.
Definition Location.h:32
geos::index
Provides classes for various kinds of spatial indexes.
Definition CleanCoverage.h:39
geos::operation
Provides classes for implementing operations on geometries.
Definition CleanCoverage.h:34
geos
Basic namespace for all GEOS functionalities.
Definition geos.h:38