com.supermap.data.processing

类 VectorTemporalCacheBuilder

  • java.lang.Object
    • com.supermap.data.InternalHandle
      • com.supermap.data.InternalHandleDisposable
        • com.supermap.data.processing.VectorTemporalCacheBuilder
  • 所有已实现的接口:
    IDisposable


    public class VectorTemporalCacheBuilder
    extends com.supermap.data.InternalHandleDisposable
    时序瓦片生成类,主要用于为时序数据生成供三维场景发布使用的带时序的三维瓦片。支持点数据集或含三角网结构的数据生成带时序的三维瓦片,优化属性字段处理机制,实现对带时序的三维瓦片中增加业务属性信息,避免反复生成瓦片。
    从以下版本开始:
    11.2.0。
    • 构造器详细资料

      • VectorTemporalCacheBuilder

        public VectorTemporalCacheBuilder()
        构造一个新的时序瓦片生成类对象。
      • VectorTemporalCacheBuilder

        public VectorTemporalCacheBuilder(DatasetVector dataset,
                                          String outputFolder,
                                          String cacheName)
        根据指定的参数,构造一个新的时序瓦片生成类对象。
        参数:
        dataset - 生成时序瓦片的数据集。
        outputFolder - 生成时序瓦片的输出路径。
        cacheName - 时序瓦片名称。
        抛出:
        IllegalStateException - 当前对象已被释放。
    • 方法详细资料

      • getDataset

        public DatasetVector getDataset()
        返回生成时序瓦片的矢量数据集。
        返回:
        生成时序瓦片的矢量数据集。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • setDataset

        public void setDataset(DatasetVector dataset)
        设置生成时序瓦片的矢量数据集。
        参数:
        dataset - 生成时序瓦片的矢量数据集。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • getCacheName

        public String getCacheName()
        返回时序瓦片的名称。
        返回:
        时序瓦片的名称。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • setCacheName

        public void setCacheName(String value)
        设置时序瓦片的名称。
        参数:
        value - 时序瓦片的名称。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • getOutputFolder

        public String getOutputFolder()
        返回时序瓦片的输出路径。
        返回:
        时序瓦片的输出路径。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • setOutputFolder

        public void setOutputFolder(String value)
        设置时序瓦片的输出路径。
        参数:
        value - 时序瓦片的输出路径。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • dispose

        public void dispose()
        释放该对象所占用的资源。当调用该方法之后,此对象不再可用。
        抛出:
        UnsupportedOperationException - 对象不能被释放,不能调用Dispose方法。
      • getTemporalFields

        public ArrayList<String> getTemporalFields()
        返回时序瓦片的时序字段(仅支持以点数据集生成带时序的三维瓦片)。
        返回:
        时序字段。
      • setTemporalFields

        public void setTemporalFields(ArrayList<String> listAttributes)
        设置时序瓦片的时序字段(仅支持以点数据集生成带时序的三维瓦片)。
        参数:
        listAttributes - 时序字段。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • getClipRegion

        public Geometry getClipRegion()
        返回时序瓦片的裁剪面(仅支持以点数据集生成带时序的三维瓦片)。
        返回:
        裁剪面。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • setClipRegion

        public void setClipRegion(Geometry pClipRegion)
        设置时序瓦片的裁剪面(仅支持以点数据集生成带时序的三维瓦片)。
        参数:
        pClipRegion - 裁剪面。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • setPoints

        public void setPoints(ArrayList<Point3D> points)
        设置时序瓦片的网格顶点(仅支持含三角网结构的数据生成带时序的三维瓦片)。
        参数:
        points - 时序瓦片的网格顶点。
      • setIndices

        public void setIndices(ArrayList<Integer> indices)
        设置时序瓦片的网格索引(仅支持含三角网结构的数据生成带时序的三维瓦片)。
        参数:
        indices - 索引集合,每3个构成一个三角形。
      • getPrjCoordSys

        public PrjCoordSys getPrjCoordSys()
        返回时序瓦片网格点的坐标系(仅支持含三角网结构的数据生成带时序的三维瓦片)。
        返回:
        时序瓦片网格点的坐标系.
      • setPrjCoordSys

        public void setPrjCoordSys(PrjCoordSys prjCoordSys)
        设置时序瓦片网格点的坐标系(仅支持含三角网结构的数据生成带时序的三维瓦片)。
        参数:
        prjCoordSys - 索引集合,每3个构成一个三角形。
      • setAttributes

        public void setAttributes(String attributeName,
                                  ArrayList<ArrayList<Double>> pointAttributes)
        设置时序瓦片的网格顶点属性(仅支持含三角网结构的数据生成带时序的三维瓦片)。
        参数:
        attributeName - 属性名称。
        pointAttributes - 属性值 第一层ArrayList需要和瓦片顶点个数保持一致,第二层ArrayList表示每个顶点的属性个数。
        示范代码:
        以下代码示范。
             
                 public void testAttributes(){
                     Recordset recordset = dv.getRecordset(false, CursorType.STATIC);
                     ArrayList> ptsAtts = new ArrayList>();
                     while(!recordset.isEOF()){
                         ArrayList atts = new ArrayList();
                         for (int i = 0; i < names.size(); i++) {
                               atts.add(recordset.getDouble(names.get(i)));
                         }
                         ptsAtts.add(atts);
                         recordset.moveNext();
                     }
                     VectorTemporalCacheBuilder cacheBuilder = new VectorTemporalCacheBuilder();
                     cacheBuilder.setAttributes("vvvv", ptsAtts);
                  }
              
         
      • setAttribtes

        public void setAttribtes(HashMap<String,VectorTemporalFeature> mapFeatures)
        设置网格顶点要素,该接口优先级优于 接口setAttributes(String attributeName, ArrayList> pointAttributes) 通常只需要设置其中一个即可,该接口支持多个要素同时生成
        参数:
        mapFeatures - 要素名称及信息
      • getSCPFile

        public String getSCPFile()
        返回配置文件(仅支持以三角网方式生成带时序的三维瓦片,追加时使用)。
      • setSCPFile

        public void setSCPFile(String strSCPFile)
        设置原始时序瓦片文件(仅支持含三角网结构的数据生成带时序的三维瓦片,追加时使用)。
        参数:
        strSCPFile - 时序瓦片文件。
      • getProcessThreadsCount

        public int getProcessThreadsCount()
        返回时序瓦片生成的线程数。
        返回:
        线程数。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • setProcessThreadsCount

        public void setProcessThreadsCount(int nProcessThreadsCount)
        设置时序瓦片生成的线程数。
        参数:
        nProcessThreadsCount - 线程数。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • getGenerateNormal

        public boolean getGenerateNormal()
        返回是否生成法线。
        返回:
        是否生成法线。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • setGenerateNormal

        public void setGenerateNormal(boolean bGenerateNormal)
        设置是否生成法线。
        参数:
        bGenerateNormal - 是否生成法线。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • build

        public boolean build()
        创建时序瓦片。
        返回:
        一个布尔值,若创建瓦片成功返回 true,否则返回 false。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • buildFromMesh

        public boolean buildFromMesh()
        含三角网结构的数据生成时序瓦片。
        返回:
        返回true表示生成时序瓦片成功;返回false表示生成时序瓦片失败。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • append

        public boolean append()
        追加属性或要素,仅支持以三角网方式生成的时序瓦片。
        返回:
        返回true表示追加成功;返回false表示追加失败。
        抛出:
        IllegalStateException - 当前对象已被释放。
      • setIsDisposable

        public static void setIsDisposable(com.supermap.data.InternalHandleDisposable obj,
                                           boolean disposable)

Copyright © 2021–2024 SuperMap. All rights reserved.