Package org.h2gis.functions.io.asc
Class AscRead
java.lang.Object
org.h2gis.api.AbstractFunction
org.h2gis.functions.io.asc.AscRead
- All Implemented Interfaces:
org.h2gis.api.Function,org.h2gis.api.ScalarFunction
public class AscRead
extends org.h2gis.api.AbstractFunction
implements org.h2gis.api.ScalarFunction
SQL function to import ESRI ASCII Raster file as points or polygons table.
- Author:
- Nicolas Fortin (Université Gustave Eiffel 2020)
-
Field Summary
Fields inherited from interface org.h2gis.api.Function
PROP_NAME, PROP_REMARKSFields inherited from interface org.h2gis.api.ScalarFunction
PROP_DETERMINISTIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidreadAscii(Connection connection, String fileName) Read the ASCII file.static voidreadAscii(Connection connection, String fileName, String tableReference, org.h2.value.Value option) Read the ASCII file.static voidreadAscii(Connection connection, String fileName, String tableReference, org.locationtech.jts.geom.Geometry envelope, int downScale, boolean extractAsPolygons) Import a small subset of ASC file.static voidreadAscii(Connection connection, String fileName, String tableReference, org.locationtech.jts.geom.Geometry envelope, int downScale, boolean extractAsPolygons, boolean deleteTable) Import a small subset of ASC file.static voidreadAscii(Connection connection, String fileName, String tableReference, org.locationtech.jts.geom.Geometry envelope, int downScale, boolean extractAsPolygons, boolean deleteTable, String encoding, int zType) Import a small subset of ASC file.static voidreadAscii(Connection connection, String fileName, org.h2.value.Value option) Read the ASCII file.Methods inherited from class org.h2gis.api.AbstractFunction
addProperty, getProperty, removePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.h2gis.api.Function
getProperty
-
Constructor Details
-
AscRead
public AscRead()
-
-
Method Details
-
getJavaStaticMethod
- Specified by:
getJavaStaticMethodin interfaceorg.h2gis.api.ScalarFunction
-
readAscii
public static void readAscii(Connection connection, String fileName) throws IOException, SQLException Read the ASCII file.- Parameters:
connection-fileName-- Throws:
IOExceptionSQLException
-
readAscii
public static void readAscii(Connection connection, String fileName, org.h2.value.Value option) throws IOException, SQLException Read the ASCII file.- Parameters:
connection-fileName-option-- Throws:
IOExceptionSQLException
-
readAscii
public static void readAscii(Connection connection, String fileName, String tableReference, org.h2.value.Value option) throws IOException, SQLException Read the ASCII file.- Parameters:
connection-fileName-tableReference-option-- Throws:
IOExceptionSQLException
-
readAscii
public static void readAscii(Connection connection, String fileName, String tableReference, org.locationtech.jts.geom.Geometry envelope, int downScale, boolean extractAsPolygons) throws IOException, SQLException Import a small subset of ASC file.- Parameters:
connection-fileName-tableReference-envelope- Extract only pixels that intersects the provided geometry envelope, null to disable filterdownScale- Coefficient used for exporting less cells (1 all cells, 2 for size / 2)extractAsPolygons- If true pixels are converted to polygon. (default false)- Throws:
IOExceptionSQLException
-
readAscii
public static void readAscii(Connection connection, String fileName, String tableReference, org.locationtech.jts.geom.Geometry envelope, int downScale, boolean extractAsPolygons, boolean deleteTable) throws IOException, SQLException Import a small subset of ASC file.- Parameters:
connection-fileName-tableReference-envelope- Extract only pixels that intersects the provided geometry envelope, null to disable filterdownScale- Coefficient used for exporting less cells (1 all cells, 2 for size / 2)extractAsPolygons- If true pixels are converted to polygon. (default false)- Throws:
IOExceptionSQLException
-
readAscii
public static void readAscii(Connection connection, String fileName, String tableReference, org.locationtech.jts.geom.Geometry envelope, int downScale, boolean extractAsPolygons, boolean deleteTable, String encoding, int zType) throws IOException, SQLException Import a small subset of ASC file.- Parameters:
connection-fileName-tableReference-envelope- Extract only pixels that intersects the provided geometry envelope, null to disable filterdownScale- Coefficient used for exporting less cells (1 all cells, 2 for size / 2)extractAsPolygons- If true pixels are converted to polygon. (default false)- Throws:
IOExceptionSQLException
-