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_REMARKS

    Fields inherited from interface org.h2gis.api.ScalarFunction

    PROP_DETERMINISTIC
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static void
    readAscii(Connection connection, String fileName)
    Read the ASCII file.
    static void
    readAscii(Connection connection, String fileName, String tableReference, org.h2.value.Value option)
    Read the ASCII file.
    static void
    readAscii(Connection connection, String fileName, String tableReference, org.locationtech.jts.geom.Geometry envelope, int downScale, boolean extractAsPolygons)
    Import a small subset of ASC file.
    static void
    readAscii(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 void
    readAscii(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 void
    readAscii(Connection connection, String fileName, org.h2.value.Value option)
    Read the ASCII file.

    Methods inherited from class org.h2gis.api.AbstractFunction

    addProperty, getProperty, removeProperty

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.h2gis.api.Function

    getProperty
  • Constructor Details

    • AscRead

      public AscRead()
  • Method Details

    • getJavaStaticMethod

      public String getJavaStaticMethod()
      Specified by:
      getJavaStaticMethod in interface org.h2gis.api.ScalarFunction
    • readAscii

      public static void readAscii(Connection connection, String fileName) throws IOException, SQLException
      Read the ASCII file.
      Parameters:
      connection -
      fileName -
      Throws:
      IOException
      SQLException
    • 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:
      IOException
      SQLException
    • 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:
      IOException
      SQLException
    • 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 filter
      downScale - Coefficient used for exporting less cells (1 all cells, 2 for size / 2)
      extractAsPolygons - If true pixels are converted to polygon. (default false)
      Throws:
      IOException
      SQLException
    • 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 filter
      downScale - Coefficient used for exporting less cells (1 all cells, 2 for size / 2)
      extractAsPolygons - If true pixels are converted to polygon. (default false)
      Throws:
      IOException
      SQLException
    • 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 filter
      downScale - Coefficient used for exporting less cells (1 all cells, 2 for size / 2)
      extractAsPolygons - If true pixels are converted to polygon. (default false)
      Throws:
      IOException
      SQLException