@LcdService(service=ILcdModelDecoder.class, priority=20000) public class TLcdVPFModelDecoder extends Object implements ILcdModelDecoder, ILcdInputStreamFactoryCapable
ILcdModel
objects
File | Description | Usage |
---|---|---|
database/ | one | |
dht | Database Header Table | mandatory |
dqt | Data Quality Table | optional |
dqx | Data Quality Table Index | optional |
lat | Library Attribute Table | mandatory |
library/ | one for each library | |
cat | Coverage Attribute Table | mandatory |
dqt | Data Quality Table | optional |
dqx | Data Quality Table Index | optional |
grt | Geographic Reference Table | mandatory |
lht | Library Header Table | mandatory |
coverage/ | one for each coverage | |
char.vdt | Character Value Description Table | optional |
dqt | Data Quality Table | optional |
dqx | Data Quality Table Index | optional |
fca | Feature Class Attribute Table | optional |
fcs | Feature Class Schema Table | mandatory |
fcx | Feature Class Schema Table Index | optional |
int.vdt | Integer Value Description Table | optional |
*.abr | Area Bounding Rectangle Table | not used |
*.aft | Area Feature Table | one for each area feature class |
*.ajt | Area Join Table | optional, depends on the feature-primitive multiplicity |
*.ati | Area Thematic Index | not used |
*.cbr | Complex Bounding Rectangle Table | not used |
*.cft | Complex Feature Table | one for each complex feature class |
*.cjt | Complex Join Table | optional, depends on the feature-primitive multiplicity |
*.cti | Complex Thematic Index | not used |
*.doc | Narrative Table | not used |
*.dpt | Diagnostic Point Table | not used |
*.fit | Feature Index Table | not used |
*.fti | Feature Index Table Thematic Index | not used |
*.jti | Join Thematic Index | not used |
*.lbr | Line Bounding Rectangle Table | not used |
*.lft | Line Feature Table | one for each line feature class |
*.ljt | Line Join Table | optional, depends on the feature-primitive multiplicity |
*.lti | Line Thematic Index | not used |
*.pbr | Point Bounding Rectangle Table | not used |
*.pft | Point Feature Table | one for each point feature class |
*.pjt | Point Join Table | optional, depends on the feature-primitive multiplicity |
*.pti | Point Thematic Index | not used |
*.rat | Related Attribute Table | not used |
*.rpt | Registration Point Table | not used |
*.tft | Text Feature Table | one for each text feature class |
*.tti | Text Thematic Index | not used |
[a-z]/[a-z]/[a-z]/[a-z/ | up to 4 levels deep, one leaf directory per tile | |
cnd | Connected Node Primitive Table | mandatory if connected node primitives exist in this tile |
csi | Connected Node Spatial Index | optional, speeds up the model access |
ebr | Edge Bounding Rectangle Table | not used |
edg | Edge Primitive Table | mandatory if edge or face primitives exist in this tile |
end | Entity Node Primitive Table | mandatory if entity node primitives exist in this tile |
esi | Edge Spatial Index | optional, speeds up the model access |
fac | Face Primitive Table | mandatory if face primitives exist in this tile |
fbr | Face Bounding Rectangle Table | not used |
fsi | Face Spatial Index | optional, speeds up the model access |
nsi | Entity Node Spatial Index | optional, speeds up the model access |
rng | Ring Table | mandatory if face primitives exist in this tile |
txt | Text Primitive Table | mandatory if text primitives exist in this tile |
tsi | Text Spatial Index | optional, speeds up the model access |
ILcdInputStreamFactory
that
is set on this decoder.ILcd2DBoundsIndexedModel
.TLcd2DBoundsIndexedModelList
. Users of the API should not rely on this.TLcdVPFModelDescriptor
.ILcdGridReference
or
an ILcdGeodeticReference
.ILcdVPFFeature
, which combines the
ILcdVPFFACCFeature
, ILcdDataObject
and ILcdFeatured
interfaces.ELEMENT_PER_GEOMETRY
and ELEMENT_PER_FEATURE
.
In the former mode, there is an element in the model per geometry in the data, in the latter
mode there is an element in the model per feature in the data (a feature may be linked to multiple
geometries.Model element mode | VPF Feature type | LuciadLightspeed interface |
---|---|---|
ELEMENT_PER_GEOMETRY | Point feature type | ILcdPoint |
ELEMENT_PER_GEOMETRY | Line feature type | ILcdPolyline |
ELEMENT_PER_GEOMETRY | Area feature type | ILcdComplexPolygon, ILcdSurface |
ELEMENT_PER_GEOMETRY | Text feature type | ILcdText |
ELEMENT_PER_FEATURE | Point feature type | ILcdShapeList containing ILcdPoint shapes |
ELEMENT_PER_FEATURE | Line feature type | ILcdShapeList containing ILcdPolyline shapes |
ELEMENT_PER_FEATURE | Area feature type | ILcdShapeList containing ILcdComplexPolygon+ILcdSurface shapes |
ELEMENT_PER_FEATURE | Text feature type | ILcdShapeList containing ILcdText shapes |
Property | Mandatory | Description |
---|---|---|
lcd.vpf.dbpath | x | the path to the VPF database's DHT file |
lcd.vpf.library | x | the name of the library |
lcd.vpf.coverage | x | the name of the coverage |
lcd.vpf.point | the name of a point feature class to decode | |
lcd.vpf.line | the name of a line feature class to decode | |
lcd.vpf.area | the name of a area feature class to decode | |
lcd.vpf.text | the name of a text feature class to decode | |
lcd.vpf.lowerleftX | the lowerleft X coordinate of the decoding bounds | |
lcd.vpf.lowerleftY | the lowerleft Y coordinate of the decoding bounds | |
lcd.vpf.width | the width of the decoding bounds | |
lcd.vpf.height | the height of the decoding bounds |
ILcdModelDecoder decoder = new TLcdVPFModeldecoder();
ILcdModel model = decoder.decode("Data/VMap/vmaplv0/dht");
ModelType
documentation and the VPF
developer guide for more information):
IN_MEMORY_MODEL
: use this model when constant performance is required, or decoding time and
memory usage are unimportant.ON_THE_FLY_MODEL
: use this model when very little memory is available.HYBRID_MODEL
: use this model in all other cases.HYBRID_MODEL
is used by this model decoder.
ELEMENT_PER_FEATURE
, only the HYBRID_MODEL
model
type is supported. other model type settings will be ignored. The ELEMENT_PER_GEOMETRY
mode
may be faster and consume slightly less memory than the ELEMENT_PER_FEATURE
mode, when
both using the HYBRID_MODEL
model type.
By default, the ELEMENT_PER_GEOMETRY
is used by this model decoder.
ModelType.ON_THE_FLY_MODEL
or the ModelType.HYBRID_MODEL
are
used, increasing the JVM memory might improve decoding performance drastically.decode()
methods, not via the setDecodingBounds()
methodMIL-STD-2407
standard
(28 June 1996). No assumptions are made on the product type (VMAP0, VMAP1, VMAP2, DNC, ...)applyOnInteract
operation will only apply
functions on these objects if the applying bounds interact with the part of the object that
is within the decoding bounds. This might result in unexpected behaviour outside the decoding
bounds, e.g., an object might be completely painted while only the part inside the decoding
bounds is selectable.Modifier and Type | Class and Description |
---|---|
static class |
TLcdVPFModelDecoder.ModelElementMode
Enumeration defining the available model element modes for VPF.
|
static class |
TLcdVPFModelDecoder.ModelType
Type-safe enumeration containing the model types that are available in VPF.
|
Modifier and Type | Field and Description |
---|---|
static String |
AREA
Property name for the list of VPF area feature class names, separated by a ';', which to decode.
|
static String |
COMPLEX
Property name for the list of VPF complex feature class names, separated by a ';', which to decode.
|
static String |
COVERAGE_NAME
Property name for the name of the VPF coverage of which to decode the features.
|
static String |
DB_PATH
Property name for the path to the VPF databases DHT file.
|
static String |
DISPLAY_NAME
Property name for the display name to be used.
|
static String |
GEODETIC
Property value to indicate the reference of the limiting bounds are in geodetic coordinates.
|
static String |
HEIGHT
Property name for the height of the limiting bounds.
|
static int |
HIGH_MEMORY
Deprecated.
The
ModelType class is used now to indicate/configure the model type of a VPF model. |
static String |
LIBRARY_NAME
Property name for the name of the VPF library.
|
static String |
LINE
Property name for the list of VPF line feature class names, separated by a ';', which to decode.
|
static int |
LOW_MEMORY
Deprecated.
The
ModelType class is used now to indicate/configure the model type of a VPF model. |
static String |
LOWER_LEFT_X
Property name for the abscis of the lower left point of the limiting bounds.
|
static String |
LOWER_LEFT_Y
Property name for the ordinate of the lower left point of the limiting bounds.
|
static String |
LUCIAD_PREFIX
Property prefix.
|
static String |
POINT
Property name for the list of VPF point feature class names , separated by a ';', which to decode.
|
static String |
PROJECTION
Property value to indicate the reference of the limiting bounds are in grid coordinates.
|
static String |
REFERENCE
Property name to indicate the type of reference of the limiting bounds.
|
static String |
SOURCE_NAME
Property name for the source name to be used.
|
static String |
TEXT
Property name for the list of VPF text feature class names, separated by a ';', which to decode.
|
static String |
WIDTH
Property name for the width of the limiting bounds.
|
Constructor and Description |
---|
TLcdVPFModelDecoder()
Constructs a new
TLcdVPFModelDecoder . |
TLcdVPFModelDecoder(ILcdBuffer aBuffer)
Deprecated.
A buffer is no longer used to load VPF data. Use the constructor without arguments instead.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canDecodeSource(String aString)
Checks whether this model decoder can decode the specified data source.
|
ILcdModel |
decode(Properties aProperties)
Retrieves the VPF feature class defined by this properties, and returns a model containing the features from this feature class.
|
ILcdModel |
decode(Properties aProperties,
ILcdBounds aBounds)
Retrieves the VPF feature class
defined by this properties file, and constructs a model containing the features from this feature class.
|
ILcdModel |
decode(String aSourceName)
Decode the specified file into a model.
|
ILcdModel |
decode(String aSourceName,
ILcdBounds aBounds)
Decode the specified file into a model.
|
ILcdModel |
decode(TLcdVPFFeatureClass aFeatureClass)
Returns a model containing the features from the specified feature class.
|
ILcdModel |
decode(TLcdVPFFeatureClass aFeatureClass,
ILcdBounds aBounds)
Returns a model containing the features from the specified feature class.
|
ILcdBounds |
getDecodingBounds()
Returns the default outermost bounds that are used for limiting the area in which to decode
VPF data.
|
String |
getDefaultExtension()
Returns the default extension for
VPF properties files. |
String |
getDisplayName()
Returns a short, displayable name for the format that is decoded by this
ILcdModelDecoder . |
ILcdInputStreamFactory |
getInputStreamFactory()
Returns the
ILcdInputStreamFactory that is used by this model decoder to create
input streams from. |
static int |
getMemoryUsage()
Deprecated.
Use the non-static
getModelType method. |
TLcdVPFModelDecoder.ModelElementMode |
getModelElementMode()
Returns the model element mode used by this model decoder.
|
TLcdVPFModelDecoder.ModelType |
getModelType()
Returns the model type that is used for decoding data.
|
int |
getThresholdForRegularTiledModel()
Deprecated.
Don't use this method. This feature is not supported anymore.
|
boolean |
isDeepTraceOn()
Returns whether deep (detailed) logging is enabled for this object..
|
boolean |
isTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
boolean |
isUseNullValues()
Returns whether attribute values representing the 'null/no value' value, should be represented as
null or not. |
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setDecodingBounds(ILcdBounds aDecodingBounds)
Registers the default outermost bounds to be used for limiting the area in which to decode VPF data.
|
void |
setDeepTraceOn(boolean aDeepTraceOn)
Enabled deep (detailed) logging on this object.
|
void |
setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
Sets the
ILcdInputStreamFactory to be used for creating InputStreams . |
static void |
setMemoryUsage(int aUsage)
Deprecated.
Use the non-static
setModelType method instead, to indicate whether the decoder
should create full (fast, but high memory usage) or empty (slower, but lower memory
usage) models. |
void |
setModelElementMode(TLcdVPFModelDecoder.ModelElementMode aElementMode)
Sets the model element mode to be used by this model decoder.
|
void |
setModelType(TLcdVPFModelDecoder.ModelType aModelType)
Sets the model types to be created when decoding data.
|
void |
setThresholdForRegularTiledModel(int aThresholdForRegularTiledModel)
Deprecated.
Don't use this method. This feature is not supported anymore.
|
void |
setTraceOn(boolean aTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setUseNullValues(boolean aUseNullValues)
Flag indicating whether attribute values representing the 'null/no value' value, should be represented as
null or not. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canDecodeSource, decodeModelMetadata, decodeModelMetadata, decodeSource, discoverDataSources
public static final String LUCIAD_PREFIX
public static final String DB_PATH
public static final String LIBRARY_NAME
public static final String COVERAGE_NAME
public static final String LINE
public static final String POINT
public static final String AREA
public static final String TEXT
public static final String COMPLEX
public static final String DISPLAY_NAME
public static final String SOURCE_NAME
public static final String LOWER_LEFT_X
public static final String LOWER_LEFT_Y
public static final String WIDTH
public static final String HEIGHT
public static final String REFERENCE
PROJECTION or
GEODETIC
.public static final String PROJECTION
public static final String GEODETIC
public static final int LOW_MEMORY
ModelType
class is used now to indicate/configure the model type of a VPF model.HIGH_MEMORY
,
Constant Field Valuespublic static final int HIGH_MEMORY
ModelType
class is used now to indicate/configure the model type of a VPF model.LOW_MEMORY
,
Constant Field Valuespublic TLcdVPFModelDecoder()
TLcdVPFModelDecoder
.public TLcdVPFModelDecoder(ILcdBuffer aBuffer)
TLcdVPFModelDecoder
.aBuffer
- This argument is not used.public void setDecodingBounds(ILcdBounds aDecodingBounds)
decode
methods.
They should be specified in the coordinate system of the library.
Decoding bounds have two purposes:
IN_MEMORY_MODEL
is used, they can be used to limit the amount
of data to be read/loaded in memory.
aDecodingBounds
- the default outermost bounds for VPF models.NullPointerException
- if aDecodingBounds
is null
.getDecodingBounds()
public ILcdBounds getDecodingBounds()
setDecodingBounds(com.luciad.shape.ILcdBounds)
public void setInputStreamFactory(ILcdInputStreamFactory aInputStreamFactory)
ILcdInputStreamFactory
to be used for creating InputStreams
.
This factory is be used recursively throughout the VPF structures for decoding all VPF files.
This factory is only used if a Properties
source or object is passed to the decoder.
If a TLcdVPFFeatureClass
is passed to the decoder, this object's input stream factory
will be used instead.setInputStreamFactory
in interface ILcdInputStreamFactoryCapable
aInputStreamFactory
- the input stream factory to be used by this model decoder.getInputStreamFactory()
public ILcdInputStreamFactory getInputStreamFactory()
ILcdInputStreamFactory
that is used by this model decoder to create
input streams from.getInputStreamFactory
in interface ILcdInputStreamFactoryCapable
ILcdInputStreamFactory
that is used by this model decoder to create
input streams from.setInputStreamFactory(com.luciad.io.ILcdInputStreamFactory)
public void setModelType(TLcdVPFModelDecoder.ModelType aModelType)
aModelType
- the model type to be created.TLcdVPFModelDecoder.ModelType
,
getModelType()
public TLcdVPFModelDecoder.ModelType getModelType()
TLcdVPFModelDecoder.ModelType
,
setModelType(com.luciad.format.vpf.TLcdVPFModelDecoder.ModelType)
public TLcdVPFModelDecoder.ModelElementMode getModelElementMode()
TLcdVPFModelDecoder.ModelElementMode
,
setModelElementMode(com.luciad.format.vpf.TLcdVPFModelDecoder.ModelElementMode)
public void setModelElementMode(TLcdVPFModelDecoder.ModelElementMode aElementMode)
ILcdModel
elements.
By default, the decoder uses TLcdVPFModelDecoder.ModelElementMode.ELEMENT_PER_GEOMETRY
.aElementMode
- the model element mode to be used by this model decoder.TLcdVPFModelDecoder.ModelElementMode
,
getModelElementMode()
public void setUseNullValues(boolean aUseNullValues)
null
or not. If false
, the value from the data will be used.
E.g. for a short, the value -32768 means 'no value'; if this flag is set to true
, the attribute value will be
null
, whereas otherwise, it will be -32768.
This flag only affects the behaviour of the ILcdFeatured
interface of VPF objects. Its default value is false.
Due to implementation restrictions, it is not possible to use different settings of this flag with a same instance
of TLcdVPFFeatureClass
.aUseNullValues
- flag indicating whether attribute values representing the 'null/no value' value, should be represented as
null
or not.public boolean isUseNullValues()
null
or not.null
or not.setUseNullValues(boolean)
public String getDefaultExtension()
VPF
properties files.public String getDisplayName()
ILcdModelDecoder
ILcdModelDecoder
.getDisplayName
in interface ILcdModelDecoder
ILcdModelDecoder
.public boolean canDecodeSource(String aString)
ILcdModelDecoder
true
for a source name while decode
throws an exception for that same source name.
For performance reasons, we strongly recommend that this will only be a simple test. For example: check the file extension of a file, but not that the file exists or contains expected content.
canDecodeSource
in interface ILcdModelDecoder
aString
- the data source to be verified; typically a file name or a URL.true
if this decoder can likely decode the data specified by the source name, false
otherwise.ILcdModelDecoder.decode(String)
,
ILcdModelDecoder.decodeModelMetadata(String)
public ILcdModel decode(String aSourceName) throws IOException
ILcdModelTreeNode
. The model tree will have the same
hierarchy as the VPF data. At the root level is the database node which contains a node for each available library.
The library nodes contain the coverage nodes containing the feature class nodes.decode
in interface ILcdModelDecoder
aSourceName
- source name specifying the properties file to be decoded.IOException
- if an IO error occurs during the decoding.ILcdModelDecoder.canDecodeSource(String)
public ILcdModel decode(String aSourceName, ILcdBounds aBounds) throws IOException
ILcdModelTreeNode
. The model tree will have the same
hierarchy as the VPF data. At the root level is the database node which contains a node for each available library.
The library nodes contain the coverage nodes containing the feature class nodes.aBounds != null
, only the feature within these bounds will be included.aSourceName
- source name specifying the properties file to be decoded.aBounds
- bounds limiting the set of VPF features to be decoded.IOException
- if an IO error occurs during the decoding.public ILcdModel decode(Properties aProperties) throws IOException
aProperties
- Properties object specifying the VPF feature class (and optionally bounds) for which
to create and return a model.IOException
- if an IO error occurs during the decoding.public ILcdModel decode(Properties aProperties, ILcdBounds aBounds) throws IOException
aBounds != null
, only the feature within these bounds will be included.aProperties
- Properties object specifying the VPF feature class (and optionally bounds) for which
to create and return a model.aBounds
- bounds limiting the set of VPF features to be decoded.IOException
- if an IO error occurs during the decoding.public ILcdModel decode(TLcdVPFFeatureClass aFeatureClass) throws IOException
aFeatureClass
- VPF feature class for which to decode the features and return a model.IOException
- if an IO error occurs during the decoding.public ILcdModel decode(TLcdVPFFeatureClass aFeatureClass, ILcdBounds aBounds) throws IOException
aBounds != null
, only the feature within these bounds will be included.aFeatureClass
- VPF feature class for which to decode the features and return a model.aBounds
- bounds limiting the set of VPF features to be decoded.IOException
- if an IO error occurs during the decoding.public static void setMemoryUsage(int aUsage)
setModelType
method instead, to indicate whether the decoder
should create full (fast, but high memory usage) or empty (slower, but lower memory
usage) models.setModelType
method instead.aUsage
- This argument is not used.getMemoryUsage()
,
setModelType(com.luciad.format.vpf.TLcdVPFModelDecoder.ModelType)
public static int getMemoryUsage()
getModelType
method.getModelType
method instead.setMemoryUsage
. This value is no longer used by VPF model decoder instances.setMemoryUsage(int)
,
getModelType()
public int getThresholdForRegularTiledModel()
setThresholdForRegularTiledModel(int)
public void setThresholdForRegularTiledModel(int aThresholdForRegularTiledModel)
aThresholdForRegularTiledModel
- This feature is not supported anymore.getThresholdForRegularTiledModel()
public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.public void setTraceOn(boolean aTraceOn)
true
or false
as argument automatically turns
off tracing for all other class instances for which
setTraceOn
has not been called.
If the argument is false
then only the informative, warning
and error log messages are recorded.aTraceOn
- if true then all log messages are recorded for this
instance. If false, then only the informative, warning and
error log messages are recorded.public boolean isTraceOn()
true
if tracing is enabled for this class.public void setDeepTraceOn(boolean aDeepTraceOn)
aDeepTraceOn
- boolean indicating whether logging should be enabled for this object.isDeepTraceOn()
public boolean isDeepTraceOn()
true
if deep (detailed) logging is enabled for this object, false
otherwise.setDeepTraceOn(boolean)