Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ebocher committed Oct 28, 2024
1 parent ddb7bc7 commit ec469d8
Show file tree
Hide file tree
Showing 26 changed files with 52 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ public static void registerSpatialTables(Connection connection) throws SQLExcept
/**
* Return a string property of the function
* @param function h2gis function
* @param propertyKey
* @param propertyKey name of the function
* @return
*/
private static String getStringProperty(Function function, String propertyKey) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public void setZType(int zType) {
/**
* Set true to delete the input table if exists
*
* @param deleteTable
* @param deleteTable true to delete the table
*/
public void setDeleteTable(boolean deleteTable) {
this.deleteTable = deleteTable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ public void setCreateIndex(boolean createIndex) {
* Write the spatial table to a FlatGeobuf file
*
* @param progress Progress visitor following the execution.
* @param tableName
* @param tableName table to write
* @param fileName input file
* @param deleteFiles
* @param deleteFiles true to delete the output file
*/
public String write(ProgressVisitor progress, String tableName, File fileName, boolean deleteFiles) throws IOException, SQLException {
if (tableName == null) {
Expand Down Expand Up @@ -357,13 +357,13 @@ private String doExport(ProgressVisitor progress, ResultSet rs, String geometryC
/**
* Write the header
*
* @param outputStream
* @param outputStream output file
* @param fileName name of the file
* @param rowCount
* @param geometryType
* @param srid
* @param metadata
* @return
* @param rowCount number of rows
* @param geometryType type of geometry
* @param srid table srid
* @param metadata flatbuffer metadata
* @return flatbuffer header object
*/
private HeaderMeta writeHeader(FileOutputStream outputStream, String fileName, FlatBufferBuilder bufferBuilder, long rowCount, String geometryType, int srid, ResultSetMetaData metadata) throws SQLException, IOException {
outputStream.write(Constants.MAGIC_BYTES);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ public Index addIndex(SessionLocal session, String indexName, int indexId, Index

/**
* Rebuild the index
* @param session
* @param index
* @param session database session
* @param index table index
*/
private void rebuild(SessionLocal session, Index index){
Index scan = getScanIndex(session);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ public class GeoJsonReaderDriver {
/**
* Driver to import a GeoJSON file into a spatial table.
*
* @param connection
* @param connection database connection
* @param fileName input file
* @param encoding
* @param deleteTable
* @param encoding file encoding
* @param deleteTable true to delete the table
*/
public GeoJsonReaderDriver(Connection connection, File fileName, String encoding, boolean deleteTable) {
this.connection = connection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class GeoJsonWriteDriver {
/**
* A simple GeoJSON driver to write a spatial table to a GeoJSON file.
*
* @param connection
* @param connection database connection
*/
public GeoJsonWriteDriver(Connection connection) {
this.connection = connection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class JsonWriteDriver {
/**
* A simple GeoJSON driver to write a spatial table to a GeoJSON file.
*
* @param connection
* @param connection database connection
*/
public JsonWriteDriver(Connection connection) {
this.connection = connection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,8 @@ public static void importTable(Connection connection, String fileName, Value opt
* @param connection database connection
* @param fileName input file
* @param tableReference output table name
* @param encoding
* @param deleteTables
* @throws FileNotFoundException
* @param encoding file encoding
* @param deleteTables true to delete the tables
*/
public static void importTable(Connection connection, String fileName, String tableReference, String encoding, boolean deleteTables) throws FileNotFoundException, SQLException, IOException {
OSMDriverFunction osmdf = new OSMDriverFunction();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ public static void importTable(Connection connection, String fileName, String ta

/**
*
* @param connection
* @param connection database connection
* @param fileName input file
* @param tableReference output table name
* @param encoding
* @param deleteTable
* @param encoding file encoding
* @param deleteTable true to delete the table
*/
public static void importTable(Connection connection, String fileName, String tableReference, String encoding, boolean deleteTable) throws SQLException, FileNotFoundException, IOException {
TSVDriverFunction tsvDriver = new TSVDriverFunction();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public String getJavaStaticMethod() {
/**
* Constructs a MultiLineString from the given geometry's coordinates.
*
* @param geom Geometry
* @param geom Geometry input geometry
* @return A MultiLineString constructed from the given geometry's coordinates
* @throws SQLException
*
*/
public static MultiLineString execute(Geometry geom) throws SQLException {
if (geom != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,9 @@ public String getJavaStaticMethod() {
* EMPTY geometry will be returned. Only points, lines and polygons are
* extracted.
*
* @param geometry
* @param geometry input geometry
* @param dimension1 one dimension to filter
* @param dimension2 second dimension to filter
* @return
*/
public static Geometry execute(Geometry geometry, int dimension1, int dimension2) throws SQLException {
if (geometry == null) {
Expand All @@ -77,9 +76,8 @@ public static Geometry execute(Geometry geometry, int dimension1, int dimension2
* EMPTY geometry will be returned. Only points, lines and polygons are
* extracted.
*
* @param geometry
* @param dimension
* @return
* @param geometry input geometry
* @param dimension dimension to extract
*/
public static Geometry execute(Geometry geometry, int dimension) throws SQLException {
if (geometry == null) {
Expand All @@ -96,8 +94,8 @@ public static Geometry execute(Geometry geometry, int dimension) throws SQLExcep

/**
* Filter dimensions from a geometry
* @param geometries
* @param geometry
* @param geometries list og geometries
* @param geometry input geometry
* @param dimension1 one dimension to filter
* @param dimension2 second dimension to filter
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public String getJavaStaticMethod() {

/**
* Return a string representation of the Geometry envelope
* west, south, east, north -> minX, minY, maxX, maxY
* west, south, east, north : minX, minY, maxX, maxY
*
*
* @param geom input geometry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public String getJavaStaticMethod() {
* @param geomA Geometry A
* @param geomB Geometry B
* @return if this geomA is covered by geomB
* @throws SQLException
*/
public static Boolean execute(Geometry geomA, Geometry geomB) throws SQLException {
if(geomA == null||geomB == null){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public String getJavaStaticMethod() {
* @param geomA Geometry A
* @param geomB Geometry B
* @return True if no point in geometry B is outside geometry A
* @throws java.sql.SQLException
*/
public static Boolean covers(Geometry geomA, Geometry geomB) throws SQLException {
if(geomA == null||geomB == null){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public String getJavaStaticMethod() {
* @param a Geometry Geometry.
* @param b Geometry instance
* @return true if Geometry A crosses Geometry B
* @throws java.sql.SQLException
*/
public static Boolean geomCrosses(Geometry a,Geometry b) throws SQLException {
if(a==null || b==null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public String getJavaStaticMethod() {
* @param a Geometry Geometry.
* @param b Geometry instance
* @return true if the two Geometries are disjoint
* @throws java.sql.SQLException
*/
public static Boolean geomDisjoint(Geometry a, Geometry b) throws SQLException {
if(a==null || b==null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public String getJavaStaticMethod() {
* @param testGeometry Geometry instance
* @return true if the envelope of Geometry A intersects the envelope of
* Geometry B
* @throws java.sql.SQLException
*/
public static Boolean intersects(Geometry surface,Geometry testGeometry) throws SQLException {
if(surface==null && testGeometry==null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public String getJavaStaticMethod() {
* @param a Geometry Geometry.
* @param b Geometry instance
* @return true if Geometry A is equal to Geometry B
* @throws java.sql.SQLException
*/
public static Boolean geomEquals(Geometry a, Geometry b) throws SQLException {
if(a==null || b==null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ public String getJavaStaticMethod() {
/**
* Returns true if the given geometries represent the same geometry and points are in the same directional order.
*
* @param valueA
* @param valueB
* @return
* @throws java.sql.SQLException
* @param valueA geometry A to compare
* @param valueB geometry B to compare
* @return true if the same order
*/
public static boolean orderingEquals(Value valueA, Value valueB) throws SQLException{
if(!(valueA instanceof ValueGeometry) || !(valueB instanceof ValueGeometry)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public String getJavaStaticMethod() {
* @param a Surface Geometry.
* @param b Geometry instance
* @return true if the geometry A overlaps the geometry B
* @throws java.sql.SQLException
*/
public static Boolean isOverlaps(Geometry a,Geometry b) throws SQLException {
if(a==null || b==null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ public String getJavaStaticMethod() {
}

/**
* @param a Geometry Geometry.
* @param b Geometry instance
* @param a Geometry A.
* @param b Geometry B
* @return 9-character String representation of the 2 geometries IntersectionMatrix
* @throws java.sql.SQLException
*/
public static String relate(Geometry a,Geometry b) throws SQLException {
if(a==null || b==null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public String getJavaStaticMethod() {

/**
* Return true if the geometry A touches the geometry B
* @param a Geometry Geometry.
* @param b Geometry instance
* @param a Geometry A.
* @param b Geometry B
* @return true if the geometry A touches the geometry B
* @throws java.sql.SQLException
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public String getJavaStaticMethod() {
* @param a Surface Geometry.
* @param b Geometry instance
* @return true if the geometry A is within the geometry B
* @throws java.sql.SQLException
*/
public static Boolean isWithin(Geometry a,Geometry b) throws SQLException {
if(a==null || b==null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ public String getJavaStaticMethod() {
*
* A default tolerance of 10E-6 is used to snap the cutter point.
*
* @param geomA
* @param geomB
* @return
* @throws SQLException
* @param geomA geometry to split
* @param geomB geometry for splitting
* @return a new geometry split
*/
public static Geometry split(Geometry geomA, Geometry geomB) throws SQLException {
if(geomA == null||geomB == null){
Expand Down Expand Up @@ -110,8 +109,7 @@ else if (geomA instanceof LineString) {
* @param geomA the geometry to be splited
* @param geomB the geometry used to split
* @param tolerance a distance tolerance to snap the split geometry
* @return
* @throws java.sql.SQLException
* @return a new geometry split
*/
public static Geometry split(Geometry geomA, Geometry geomB, double tolerance) throws SQLException {
if (geomA instanceof Polygon) {
Expand All @@ -138,9 +136,9 @@ public static Geometry split(Geometry geomA, Geometry geomB, double tolerance) t
/**
* Split a linestring with a point The point must be on the linestring
*
* @param line
* @param pointToSplit
* @return
* @param line input geometry line
* @param pointToSplit input point
* @return a new geometry split at a point location
*/
private static MultiLineString splitLineWithPoint(LineString line, Point pointToSplit, double tolerance) {
return FACTORY.createMultiLineString(splitLineStringWithPoint(line, pointToSplit, tolerance));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,10 @@ public void testAddIndexOnTableLink() throws SQLException {
/**
* Check if the column is indexed or not.
* Cannot check if the index is spatial or not
* @param connection
* @param tableLocation
* @param geometryColumnName
* @return
* @throws SQLException
* @param connection database connection
* @param tableLocation input table name
* @param geometryColumnName geometry column
* @return true is the column is indexed
*/
private static boolean hasIndex(Connection connection, TableLocation tableLocation, String geometryColumnName) throws SQLException {
String schema = tableLocation.getSchema();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,8 @@ public static boolean hasGeometryColumn(ResultSet resultSet) throws SQLException
/**
* Check if the table contains a geometry column
*
* @param connection
* @param tableLocation
* @param connection database connection
* @param tableLocation input table name
*
* @return True if the ResultSet contains one geometry field
*
Expand All @@ -652,8 +652,8 @@ public static boolean hasGeometryColumn(Connection connection, String tableLocat
/**
* Check if the table contains a geometry column
*
* @param connection
* @param tableLocation
* @param connection database connection
* @param tableLocation input table name
*
* @return True if the ResultSet contains one geometry field
*
Expand Down

0 comments on commit ec469d8

Please sign in to comment.