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; }
66 static std::shared_ptr<Matrix<float>>
67 getIntersectionFractions(
const Grid<bounded_extent>& raster_grid,
const geom::Geometry& g);
69 static std::shared_ptr<Matrix<float>>
70 getIntersectionFractions(
const Grid<bounded_extent>& raster_grid,
const geom::Envelope& box);
90 void processRectangularRing(
const geom::Envelope& box,
bool exterior_ring);
92 void addRingResults(
size_t i0,
size_t j0,
const Matrix<float>& areas,
bool exterior_ring);
94 void setAreal(
bool areal);
96 static Matrix<float> collectAreas(
const Matrix<std::unique_ptr<Cell>>& cells,
97 const Grid<bounded_extent>& finite_ring_grid,
100 Grid<infinite_extent> m_geometry_grid;
101 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::Envelope &box, std::shared_ptr< Matrix< float > > cov=nullptr)
Compute the fraction of each cell in a rectangular grid that is covered by an Envelope....
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...
static std::unique_ptr< geom::Geometry > subdividePolygon(const Grid< bounded_extent > &p_grid, const geom::Geometry &g, bool includeExterior)
Partition a polygonal geometry by a grid.
GridIntersection(const Grid< bounded_extent > &raster_grid, const geom::Geometry &g, std::shared_ptr< Matrix< float > > cov=nullptr)
Compute the fraction of each cell in a rectangular grid that is covered by a Geometry....
std::shared_ptr< Matrix< float > > getResults()
Return the intersection result matrix.
Definition GridIntersection.h:59