com.supermap.data.processing
类 OSGBVectorCacheBuilder
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.data.InternalHandleDisposable
-
- com.supermap.data.processing.OSGBVectorCacheBuilder
-
- 所有已实现的接口:
- IDisposable
public class OSGBVectorCacheBuilder extends com.supermap.data.InternalHandleDisposable矢量数据集生成三维瓦片类。通过该类可将矢量数据集生成OSGB/S3M格式的三维瓦片文件。
-
-
构造器概要
构造器 构造器和说明 OSGBVectorCacheBuilder()默认构造一个无参的 OSGBVectorCacheBuilder 对象。OSGBVectorCacheBuilder(DatasetVector dataset, String outputFolder, String cacheName)根据指定的参数,构造一个新的矢量瓦片生成类对象。OSGBVectorCacheBuilder(Recordset recordset, String outputFolder)根据指定的参数,构造一个新的矢量瓦片生成类对象。OSGBVectorCacheBuilder(Recordset recordset, String outputFolder, String cacheName)根据指定的参数,构造一个新的矢量瓦片生成类对象。OSGBVectorCacheBuilder(Scene scene, Layer3DDataset layer3DDataset, String outputFolder, String cacheName)构造一个新的OSGBVectorCacheBuilder对象。
-
方法概要
所有方法 静态方法 实例方法 具体方法 已过时的方法 限定符和类型 方法和说明 voidaddSteppedListener(SteppedListener l)添加一个用于接收进度条事件(SteppedEvent)的监听器。BooleanaddTileInfoToConfigFile(double scale, int row, int col)已过时。booleanbuild()生成瓦片。booleanbuildTexture(String texPath, int level)已过时。booleanbuildWithoutConfigFile()为矢量数据创建矢量瓦片。voidcancel()String[]computeFileName()已过时。booleancomputeLevel()已过时。voiddispose()释放OSGBVectorCacheBuilder对象所占的资源。booleanfromConfigFile(String path)已过时。booleanfromJson(String jsonFile)从json文件中获取参数。AttributeExtentTypegetAttributeExtentType()获取属性文件类型。Rectangle2DgetBounds()获取生成瓦片的地理范围。StringgetCacheName()获取生成瓦片配置文件的名称。CacheFileTypegetCacheType()矢量数据集批量生成瓦片时,获取瓦片文件类型,包括OSGB、S3M、S3MB。GeometrygetClipRegion()已过时。CompressedTextureTypegetCompressedTextureType()模型瓦片压缩纹理类型ArrayList<byte[]>getConfigStream(ConfigType configType)已过时。DatasetVectorgetDataset()获取或设置用于创建瓦片的数据集,支持的数据集类型为点数据集、线数据集、面数据集、文本数据集和复合数据集。ArrayList<DatasetSetting>getDatasetSettingArray()获取待瓦片对象属性,包括数据集对象,userIDField,fieldNamesPrjCoordSysTypegetDynamicPrjCoordSysType()获取生成平面还是球面瓦片,目前只有PrjCoordSysType.NoneEarth、PrjCoordSysType.EarthLongitudeLatitude两种。EncodeTypegetEncodeType()获取生成瓦片文件的压缩类型。String[]getFieldNames()已过时。GlobeTypegetGlobeType()获取球体类型,支持椭球和圆球。intgetLevel()已过时。StringgetOutputFolder()获取生成瓦片的存储路径。doublegetOutputScale()获取矢量瓦片比例尺。StringgetPassword()获取用于为地图对象创建瓦片时对数据进行加密的密码。RecordsetgetRecordset()获取或设置用于创建瓦片的记录集,支持的数据集类型为点数据集、线数据集、面数据集、文本数据集和复合数据集。StorageTypegetStorageType()获取瓦片存储方式。ArrayList<String>getTemporalFields()已过时。booleangetTileBoundClip()矢量数据集批量生成瓦片时,获取是否用TileBound做裁剪,进行瓦片切割。ArrayList<TileInfos>getTileInfosArray()获取每个生成瓦片的信息。Tile[]getTiles(Rectangle2D tileBounds, double scale, VectorCacheTileType eTileType)已过时。doublegetTileWidth()获取瓦片大小。intgetUpdateSize()已过时。GeoStyle3DgetUserDefStyle3D()获取用户自定义style,包括贴地模式,拉伸高度,底部高度,前景色,是否生成轮廓线等。VectorCacheTileTypegetVectorCacheTileType()已过时。BooleanisTileExistsInConfigFile(double scale, int row, int col)已过时。voidremoveSteppedListener(SteppedListener l)移除一个用于接收进度条事件(SteppedEvent)的监听器。voidsetAttributeExtentType(AttributeExtentType attributeExtentType)设置属性文件类型。voidsetBounds(Rectangle2D value)设置生成瓦片的地理范围。voidsetCacheName(String value)设置生成瓦片配置文件的名称。voidsetClipRegion(Geometry m_pClipRegion)已过时。voidsetCompressedTextureType(CompressedTextureType value)设置生成瓦片时的压缩纹理的格式。voidsetDataset(DatasetVector value)voidsetDatasetSettingArray(ArrayList<DatasetSetting> datasetSettings)设置待瓦片对象属性,包括数据集对象,userIDField,fieldNamesvoidsetDynamicPrjCoordSysType(PrjCoordSysType prjType)设置动态投影信息。voidsetEncodeType(EncodeType encodeType)已过时。voidsetEncryptCoordinatesSetting(EncryptCoordinatesSetting encryptCoordinatesSetting)设置坐标加密参数。voidsetFieldNames(String[] value)已过时。voidsetFileType(CacheFileType fileType)设置瓦片保存类型, 包括osgb/s3m/s3mb。voidsetGlobeType(GlobeType globeType)设置球体类型,支持椭球和圆球。static voidsetIsDisposable(com.supermap.data.InternalHandleDisposable obj, boolean disposable)voidsetLayer(Layer3DDataset value)设置用于生成瓦片的图层对象。voidsetLevel(int value)已过时。voidsetOutputFolder(String value)设置生成瓦片的存储路径。voidsetOutputScale(double scale)已过时。voidsetPassword(String value)设置用于为地图对象创建瓦片时对数据进行加密的密码。voidsetRecordset(Recordset value)已过时。voidsetS3MVersion(S3MVersion version)设置S3M版本。voidsetScene(Scene value)设置用于生成瓦片的场景对象。voidsetStorageType(StorageType value)已过时。voidsetTemporalFields(ArrayList<String> m_listAttributes)已过时。voidsetTileBoundClip(boolean clipValue)矢量数据集批量生成瓦片时,设置是否用TileBound做裁剪,进行瓦片切割。voidsetTileWidth(double tileWidthValue)设置瓦片大小。voidsetUpdateSize(int value)已过时。voidsetUserDefStyle3D(GeoStyle3D geoStyle3D)设置用户自定义style,包括贴地模式,拉伸高度,底部高度,前景色,是否生成轮廓线等。voidsetVectorCacheTileType(VectorCacheTileType eTileType)已过时。booleantoConfigAndIndexFile(String path)将三维瓦片的所有瓦片信息直接写入到配置文件中,并将属性字段索引写入索引文件。booleantoConfigFile(String path)已过时。booleantoJson(String jsonFile)将参数都写入文件中。
-
-
-
构造器详细资料
-
OSGBVectorCacheBuilder
public OSGBVectorCacheBuilder()
默认构造一个无参的 OSGBVectorCacheBuilder 对象。
-
OSGBVectorCacheBuilder
public OSGBVectorCacheBuilder(Recordset recordset, String outputFolder)
根据指定的参数,构造一个新的矢量瓦片生成类对象。该构造函数生成的瓦片对象的名字与Recordset对应的Dataset的名称相同。
- 参数:
recordset- 用于生成瓦片的记录集。outputFolder- 结果数据存储路径。
-
OSGBVectorCacheBuilder
public OSGBVectorCacheBuilder(Recordset recordset, String outputFolder, String cacheName)
根据指定的参数,构造一个新的矢量瓦片生成类对象。- 参数:
recordset- 用于生成瓦片的记录集。outputFolder- 结果数据存储路径。cacheName- 生成瓦片配置文件的名称。
-
OSGBVectorCacheBuilder
public OSGBVectorCacheBuilder(DatasetVector dataset, String outputFolder, String cacheName)
根据指定的参数,构造一个新的矢量瓦片生成类对象。- 参数:
dataset- 用于生成瓦片的矢量数据集。outputFolder- 结果数据存储路径。cacheName- 生成瓦片配置文件的名称。
-
OSGBVectorCacheBuilder
public OSGBVectorCacheBuilder(Scene scene, Layer3DDataset layer3DDataset, String outputFolder, String cacheName)
构造一个新的OSGBVectorCacheBuilder对象。- 参数:
scene- 指定的场景。layer3DDataset- 指定的矢量数据集图层。outputFolder- 结果数据存储路径。cacheName- 指定的瓦片名称。
-
-
方法详细资料
-
getRecordset
public Recordset getRecordset()
获取或设置用于创建瓦片的记录集,支持的数据集类型为点数据集、线数据集、面数据集、文本数据集和复合数据集。注意:设置Recordset属性,会废弃之前对Dataset的设置,即设置完Recordset之后,Dataset的属性值会变为null。
- 返回:
-
setRecordset
@Deprecated public void setRecordset(Recordset value)
已过时。
-
getDataset
public DatasetVector getDataset()
获取或设置用于创建瓦片的数据集,支持的数据集类型为点数据集、线数据集、面数据集、文本数据集和复合数据集。注意:设置Dataset属性,会废弃之前对Recordset的设置,即设置完Dataset之后,Recordset的属性值会变为null。
- 返回:
-
setDataset
public void setDataset(DatasetVector value)
-
getFieldNames
@Deprecated public String[] getFieldNames()
已过时。
-
setFieldNames
@Deprecated public void setFieldNames(String[] value)
已过时。
-
getBounds
public Rectangle2D getBounds()
获取生成瓦片的地理范围。- 返回:
- 生成瓦片的地理范围。
-
setBounds
public void setBounds(Rectangle2D value)
设置生成瓦片的地理范围。- 参数:
value- 生成瓦片的地理范围。
-
getCacheName
public String getCacheName()
获取生成瓦片配置文件的名称。- 返回:
- 生成瓦片配置文件的名称。
-
setCacheName
public void setCacheName(String value)
设置生成瓦片配置文件的名称。- 参数:
value- 生成瓦片配置文件的名称。
-
getOutputFolder
public String getOutputFolder()
获取生成瓦片的存储路径。- 返回:
- 生成瓦片的存储路径。
-
setOutputFolder
public void setOutputFolder(String value)
设置生成瓦片的存储路径。- 参数:
value- 生成瓦片的存储路径。
-
getStorageType
public StorageType getStorageType()
获取瓦片存储方式。默认为原始模式,即:StorageType.Original。- 返回:
- 瓦片存储方式。
-
setStorageType
@Deprecated public void setStorageType(StorageType value)
已过时。
-
getLevel
@Deprecated public int getLevel()
已过时。
-
setLevel
@Deprecated public void setLevel(int value)
已过时。
-
getUpdateSize
@Deprecated public int getUpdateSize()
已过时。
-
setUpdateSize
@Deprecated public void setUpdateSize(int value)
已过时。
-
getPassword
public String getPassword()
获取用于为地图对象创建瓦片时对数据进行加密的密码。在添加图层时,需要使用该密码才能成功添加。如果使用默认值,便可不指定密码便能打开。默认值为一个空的字符串。该密码不会写到瓦片数据的配置文件中。
注意:当 StorageType.Original 时,Password 属性是无效的;当 StorageType.Compact 时,该属性才有效。
-
setPassword
public void setPassword(String value)
设置用于为地图对象创建瓦片时对数据进行加密的密码。在添加图层时,需要使用该密码才能成功添加。如果使用默认值,便可不指定密码便能打开。默认值为一个空的字符串。该密码不会写到瓦片数据的配置文件中。
注意:当 StorageType.Original 时,Password 属性是无效的;当 StorageType.Compact 时,该属性才有效。
- 参数:
value-
-
build
public boolean build()
生成瓦片。- 返回:
- true表示生成成功,false表示生成失败。
-
buildWithoutConfigFile
public boolean buildWithoutConfigFile()
为矢量数据创建矢量瓦片。使用该方法创建瓦片不会生成矢量瓦片的配置文件。注意:使用该方法时,纹理不会被创建瓦片。
使用场景:该方法用于服务器端接收客户端请求时使用。
- 返回:
-
buildTexture
@Deprecated public boolean buildTexture(String texPath, int level)
已过时。
-
computeFileName
@Deprecated public String[] computeFileName()
已过时。
-
computeLevel
@Deprecated public boolean computeLevel()
已过时。
-
toConfigFile
@Deprecated public boolean toConfigFile(String path)
已过时。
-
fromConfigFile
@Deprecated public boolean fromConfigFile(String path)
已过时。
-
dispose
public void dispose()
释放OSGBVectorCacheBuilder对象所占的资源。
-
cancel
public void cancel()
-
addSteppedListener
public void addSteppedListener(SteppedListener l)
添加一个用于接收进度条事件(SteppedEvent)的监听器。- 参数:
l- 一个用于接收进度条事件的监听器。
-
removeSteppedListener
public void removeSteppedListener(SteppedListener l)
移除一个用于接收进度条事件(SteppedEvent)的监听器。- 参数:
l- 一个用于接收进度条事件的监听器。
-
getEncodeType
public EncodeType getEncodeType()
获取生成瓦片文件的压缩类型。矢量瓦片仅支持None和LZW两种压缩格式,即:仅支持 EncodeType.LZW 或 EncodeType.None 类型。
- 返回:
- 压缩类型
-
setEncodeType
@Deprecated public void setEncodeType(EncodeType encodeType)
已过时。瓦片压缩方式
-
getCompressedTextureType
public CompressedTextureType getCompressedTextureType()
模型瓦片压缩纹理类型
-
setCompressedTextureType
public void setCompressedTextureType(CompressedTextureType value)
设置生成瓦片时的压缩纹理的格式。- 参数:
value- 压缩纹理的格式。
-
getVectorCacheTileType
@Deprecated public VectorCacheTileType getVectorCacheTileType()
已过时。返回瓦片类型。
-
setVectorCacheTileType
@Deprecated public void setVectorCacheTileType(VectorCacheTileType eTileType)
已过时。设置瓦片类型。
-
setOutputScale
@Deprecated public void setOutputScale(double scale)
已过时。
-
getOutputScale
public double getOutputScale()
获取矢量瓦片比例尺。- 返回:
- 比例尺
-
getDynamicPrjCoordSysType
public PrjCoordSysType getDynamicPrjCoordSysType()
获取生成平面还是球面瓦片,目前只有PrjCoordSysType.NoneEarth、PrjCoordSysType.EarthLongitudeLatitude两种。当设置为PrjCoordSysType.NoneEarth,则生成平面瓦片,当设置为PrjCoordSysType.EarthLongitudeLatitude则生成球面瓦片。
- 返回:
-
setDynamicPrjCoordSysType
public void setDynamicPrjCoordSysType(PrjCoordSysType prjType)
设置动态投影信息。- 参数:
prjType- 指定的投影信息。
-
isTileExistsInConfigFile
@Deprecated public Boolean isTileExistsInConfigFile(double scale, int row, int col)
已过时。
-
addTileInfoToConfigFile
@Deprecated public Boolean addTileInfoToConfigFile(double scale, int row, int col)
已过时。
-
getTiles
@Deprecated public Tile[] getTiles(Rectangle2D tileBounds, double scale, VectorCacheTileType eTileType)
已过时。根据bound动态切图获取瓦片数据
-
getTileWidth
public double getTileWidth()
获取瓦片大小。单位与瓦片范围的单位一致。同时适用于批量矢量数据生成瓦片时,设置瓦片边长。- 返回:
- 瓦片大小
-
setTileWidth
public void setTileWidth(double tileWidthValue)
设置瓦片大小。单位与瓦片范围的单位一致。同时适用于批量矢量数据生成瓦片时,设置瓦片边长。- 参数:
tileWidthValue- 瓦片大小
-
getConfigStream
@Deprecated public ArrayList<byte[]> getConfigStream(ConfigType configType)
已过时。获得ConfigData- 参数:
configType-- 返回:
-
getUserDefStyle3D
public GeoStyle3D getUserDefStyle3D()
获取用户自定义style,包括贴地模式,拉伸高度,底部高度,前景色,是否生成轮廓线等。
-
setUserDefStyle3D
public void setUserDefStyle3D(GeoStyle3D geoStyle3D)
设置用户自定义style,包括贴地模式,拉伸高度,底部高度,前景色,是否生成轮廓线等。
-
getTileBoundClip
public boolean getTileBoundClip()
矢量数据集批量生成瓦片时,获取是否用TileBound做裁剪,进行瓦片切割。
-
setTileBoundClip
public void setTileBoundClip(boolean clipValue)
矢量数据集批量生成瓦片时,设置是否用TileBound做裁剪,进行瓦片切割。
-
getCacheType
public CacheFileType getCacheType()
矢量数据集批量生成瓦片时,获取瓦片文件类型,包括OSGB、S3M、S3MB。- 返回:
-
setFileType
public void setFileType(CacheFileType fileType)
设置瓦片保存类型, 包括osgb/s3m/s3mb。- 参数:
fileType- 瓦片的数据格式。
-
getDatasetSettingArray
public ArrayList<DatasetSetting> getDatasetSettingArray()
获取待瓦片对象属性,包括数据集对象,userIDField,fieldNames- 返回:
-
setDatasetSettingArray
public void setDatasetSettingArray(ArrayList<DatasetSetting> datasetSettings)
设置待瓦片对象属性,包括数据集对象,userIDField,fieldNames- 参数:
datasetSettings- 生成瓦片设置对象属性,对批量生成瓦片时使用。如果需要每个数据集生成一个瓦片,请使用setDataset接口。
-
setScene
public void setScene(Scene value)
设置用于生成瓦片的场景对象。- 参数:
value- 指定场景。
-
setLayer
public void setLayer(Layer3DDataset value)
设置用于生成瓦片的图层对象。- 参数:
value- 指定图层。
-
toConfigAndIndexFile
public boolean toConfigAndIndexFile(String path)
将三维瓦片的所有瓦片信息直接写入到配置文件中,并将属性字段索引写入索引文件。使用该方法不生成瓦片。使用场景:该方法用于客户端向服务器请求瓦片文件,服务器端实时切瓦片时使用。
- 参数:
path- 配置文件存储路径。- 返回:
- 一个布尔值,表示是否成功保存瓦片配置文件,即.scp 文件,若保存瓦片配置文件成功返回 true,否则返回 false。
-
setS3MVersion
public void setS3MVersion(S3MVersion version)
设置S3M版本。- 参数:
version- S3M版本。
-
getAttributeExtentType
public AttributeExtentType getAttributeExtentType()
获取属性文件类型。- 返回:
- 属性文件类型。
-
setAttributeExtentType
public void setAttributeExtentType(AttributeExtentType attributeExtentType)
设置属性文件类型。- 参数:
attributeExtentType- 属性文件类型
-
getGlobeType
public GlobeType getGlobeType()
获取球体类型,支持椭球和圆球。- 返回:
-
setGlobeType
public void setGlobeType(GlobeType globeType)
设置球体类型,支持椭球和圆球。当球体类型设置为椭球时,S3M版本需要使用"Version_30"。- 参数:
globeType- 球体类型。
-
getTemporalFields
@Deprecated public ArrayList<String> getTemporalFields()
已过时。
-
setTemporalFields
@Deprecated public void setTemporalFields(ArrayList<String> m_listAttributes)
已过时。
-
getClipRegion
@Deprecated public Geometry getClipRegion()
已过时。
-
setClipRegion
@Deprecated public void setClipRegion(Geometry m_pClipRegion)
已过时。
-
setEncryptCoordinatesSetting
public void setEncryptCoordinatesSetting(EncryptCoordinatesSetting encryptCoordinatesSetting)
设置坐标加密参数。- 参数:
encryptCoordinatesSetting- 坐标加密参数。- 抛出:
IllegalStateException- 当前对象已被释放。- 从以下版本开始:
- 11.2.0。
-
toJson
public boolean toJson(String jsonFile)
将参数都写入文件中。- 参数:
jsonFile- json文件存储路径。- 从以下版本开始:
- 11.3.0。
-
fromJson
public boolean fromJson(String jsonFile)
从json文件中获取参数。- 参数:
jsonFile- json文件路径。- 从以下版本开始:
- 11.3.0。
-
setIsDisposable
public static void setIsDisposable(com.supermap.data.InternalHandleDisposable obj, boolean disposable)
-
-
Copyright © 2021–2025 SuperMap. All rights reserved.