Class GenerateThumbnail

java.lang.Object
cn.mapway.common.geo.geotools.GenerateThumbnail

public class GenerateThumbnail extends Object
  • Constructor Details

    • GenerateThumbnail

      public GenerateThumbnail()
  • Method Details

    • generateRaster

      public static void generateRaster(File imageUrl, File labelUrl, File thumbnailUrl, int width, int height) throws IOException
      Throws:
      IOException
    • generateRaster

      public static void generateRaster(File imageUrl, File labelUrl, File thumbnailUrl) throws IOException
      生成缩略图
      Parameters:
      imageUrl - 栅格底图文件
      labelUrl - 栅格标注文件
      thumbnailUrl - 缩略图文件
      Throws:
      IOException
    • generateVector

      public static boolean generateVector(File rasterFile, String geojsons, int splitSize, File exportUrl, boolean gcsFlag) throws IOException
      导出缩略图
      Parameters:
      rasterFile - 栅格底图文件
      geojsons - 矢量geojson信息
      splitSize - 切片大小
      exportUrl - 导出路径, 导出路径最后不要带有后缀
      Returns:
      Throws:
      IOException
    • generateVector

      public static boolean generateVector(File rasterFile, String geojsons, int splitSize, File exportUrl, double quality, String imageFormat, boolean gcsFlag) throws IOException
      Throws:
      IOException
    • createPolygonStyle

      public static org.geotools.styling.Style createPolygonStyle(Color outlineColor, float strokeWidth, Color fillColor, float opacity)
    • readImage

      public static BufferedImage readImage(String imageUrl)
    • readPixelValues

      public static byte[] readPixelValues(org.gdal.gdal.Band band)
    • readPixelValues

      public static byte[] readPixelValues(org.gdal.gdal.Band band, Double min, Double max)
    • readPixelValues

      public static byte[] readPixelValues(org.gdal.gdal.Band band, int dataType, Double min, Double max)
    • stretch

      public static byte[] stretch(float[] data, Double min, Double max)
    • main

      public static void main(String[] args) throws IOException
      Throws:
      IOException