19#include <geos/geom/Geometry.h>
20#include <geos/operation/grid/Grid.h>
21#include <geos/operation/grid/Matrix.h>
28namespace geos::operation::grid {
59 std::shared_ptr<Matrix<float>>
getResults() {
return m_results; }
77 static std::shared_ptr<Matrix<float>>
80 static std::shared_ptr<Matrix<float>>
101 void processRectangularRing(
const geom::Envelope& box,
bool exterior_ring);
103 void addRingResults(
size_t i0,
size_t j0,
const Matrix<float>& areas,
bool exterior_ring);
105 void setAreal(
bool areal);
107 static Matrix<float> collectAreas(
const Matrix<std::unique_ptr<Cell>>& cells,
112 std::shared_ptr<Matrix<float>> m_results;
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:59
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:196
Definition LineString.h:66
The GridIntersection class computes and stores information about intersection of a Grid and a Geometr...
Definition GridIntersection.h:41
GridIntersection(const Grid< bounded_extent > &raster_grid, const geom::Geometry &g, const std::shared_ptr< Matrix< float > > &cov=nullptr)
Compute the fraction of each cell in a rectangular grid that is covered by a Geometry....
static geom::Envelope processingRegion(const geom::Envelope &raster_extent, const geom::Geometry &geometry)
Determines the bounding box of the raster-vector intersection. Considers the bounding boxes of indivi...
GridIntersection(const Grid< bounded_extent > &raster_grid, const geom::Envelope &box, const std::shared_ptr< Matrix< float > > &cov=nullptr)
Compute the fraction of each cell in a rectangular grid that is covered by an Envelope....
static std::shared_ptr< Matrix< float > > getIntersectionFractions(const Grid< bounded_extent > &grid, const geom::Geometry &g)
Calculate the fraction of each cell in a Grid that is covered by a polygon.
static std::unique_ptr< geom::Geometry > subdividePolygon(const Grid< bounded_extent > &grid, const geom::Geometry &g, bool includeExterior)
Partition a polygonal geometry by a grid.
std::shared_ptr< Matrix< float > > getResults()
Return the intersection result matrix.
Definition GridIntersection.h:59
The Grid class represents a grid of constant-size rectangular cells that covers a specified envelope....
Definition Grid.h:43