Class GridRowSet
java.lang.Object
org.h2gis.functions.spatial.create.GridRowSet
- All Implemented Interfaces:
org.h2.tools.SimpleRowSource
GridRowSet is used to populate a result set with all grid cells. A cell could
be represented as a polygon or its center point.
- Author:
- Erwan Bocher
-
Constructor Summary
ConstructorsConstructorDescriptionGridRowSet(Connection connection, double deltaX, double deltaY, String tableName) The grid will be computed according a table stored in the databaseGridRowSet(Connection connection, double deltaX, double deltaY, org.locationtech.jts.geom.Geometry geometry) The grid will be computed according the envelope of a geometry -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Give the regular gridbooleanReturn true is cell is represented as point, false as a polygonbooleanReturn if the delta x and y must be expressed as number of columns and rowsObject[]readRow()voidreset()voidsetCenterCell(boolean isCenterCell) Set if the cell must be represented as a point or a polygonvoidsetIsRowColumnNumber(boolean isRowColumnNumber) Set true to define the delta x and y as number of columns and rows
-
Constructor Details
-
GridRowSet
The grid will be computed according a table stored in the database- Parameters:
connection-deltaX-deltaY-tableName-
-
GridRowSet
public GridRowSet(Connection connection, double deltaX, double deltaY, org.locationtech.jts.geom.Geometry geometry) The grid will be computed according the envelope of a geometry- Parameters:
connection-deltaX-deltaY-geometry-
-
-
Method Details
-
readRow
- Specified by:
readRowin interfaceorg.h2.tools.SimpleRowSource- Throws:
SQLException
-
close
public void close()- Specified by:
closein interfaceorg.h2.tools.SimpleRowSource
-
reset
- Specified by:
resetin interfaceorg.h2.tools.SimpleRowSource- Throws:
SQLException
-
isCenterCell
public boolean isCenterCell()Return true is cell is represented as point, false as a polygon- Returns:
-
setCenterCell
public void setCenterCell(boolean isCenterCell) Set if the cell must be represented as a point or a polygon- Parameters:
isCenterCell-
-
setIsRowColumnNumber
public void setIsRowColumnNumber(boolean isRowColumnNumber) Set true to define the delta x and y as number of columns and rows- Parameters:
isRowColumnNumber-
-
isRowColumnNumber
public boolean isRowColumnNumber()Return if the delta x and y must be expressed as number of columns and rows- Returns:
-
getResultSet
Give the regular grid- Returns:
- ResultSet
- Throws:
SQLException
-