Class ALfnAssetMetadata
- All Implemented Interfaces:
ILcdBounded
- Direct Known Subclasses:
TLfnRasterAssetMetadata
,TLfnVectorAssetMetadata
A representation of an asset. It contains the following parameters in addition to those defined in the superclass:
- asset parts: the parts that make up this asset. Each asset has at least one part. All of the metadata in the asset should apply to each of the parts.
- type: the data type of an asset, one of
ELfnDataType
(required, must not benull
) - clipping shape: the 2D clipping shape of an asset (optional, may be
null
). The clipping shape's coordinates are always in the asset's geographic reference. The clipping shape is typically more complex than the bounding box, it defines the area of the asset. The whole clipping shape must lie within the bounding box. - geographic reference: the geographic reference of the bounding box (required, must not be
null
) - root: the root of the location, for determining the relative path of the location when putting asset sources in Tile Store (optional, may be
null
) - location: the location for which the metadata decoder can decode metadata (but not necessarily a model).
This is optional, it may be
null
. This location is distinct from the locations of the asset parts in that it does not necessarily point to a model itself, but rather to a common catalog file which also needs to be copied when putting asset sources in Tile Store. The typical example is aCATALOG.031
file for S-57 catalogue models. The location must include the root, if present. - support locations: any number of support files which do not belong to a particular asset part.
This is optional, in which case it is empty but not
null
. They will be preserved when putting asset sources in Tile Store, but they cannot be decoded as model nor metadata themselves. The support locations must include the root, if present.
When you want to fuse data, you do not need to create instances of this class yourself.
You can delegate the creation to the available ALfnFormat
instances.
ALfnEngineEnvironment engineEnvironment = ...;
ALfnFormat format = engineEnvironment.getCompositeFormat();
String path = ...;
if ( format.canCreateAsset( path, null ) ){
ALfnAssetMetadata metadata = format.createAsset( path, null );
}
Instances of this class are immutable, thus thread-safe.
- Since:
- 10.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A part of an asset, requiring a location and a bounding box.static class
ALfnAssetMetadata.Builder<B extends ALfnAssetMetadata.Builder<B,
P>, P extends ALfnAssetMetadata.AssetPart> Abstract builder for asset metadata. -
Field Summary
Fields inherited from class com.luciad.fusion.tilestore.metadata.ALfnResourceMetadata
ISO19115_GCO_XML_NAMESPACE, ISO19115_GMD_XML_NAMESPACE, LTS_XML_NAMESPACE, NEW_UPDATE_SEQUENCE, XLINK_XML_NAMESPACE
-
Method Summary
Modifier and TypeMethodDescriptionabstract ALfnAssetMetadata.Builder
<?, ?> Creates a new builder from this resource metadata.boolean
List
<? extends ALfnAssetMetadata.AssetPart> Gets the parts of this asset as aCollection
.Gets the bounding box of this asset.Deprecated.Gets the bounding box of this asset.Gets the 2D clipping shape of this asset.Gets the feature type styles of this asset.Returns the name (seeALfnFormat#getName()
) of theALfnFormat
which created this asset (for example, 'SHP').Gets the geographic reference of the bounding box of this asset.Gets the catalog location, possiblynull
.int
Returns the denominator of the maximum scale at which this asset should be used.int
Returns the denominator of the minimum scale at which this asset should be used.getRoot()
Gets the root of the locations common to all asset parts, possiblynull
.Gets the supported coverage types of this asset.getType()
Gets the type of this asset.int
hashCode()
Methods inherited from class com.luciad.fusion.tilestore.metadata.ALfnResourceMetadata
accept, getAbstract, getGlobalUpdateSequence, getId, getISO19115Metadata, getName, getUpdateSequence, toString
-
Method Details
-
getAssetParts
Gets the parts of this asset as aCollection
.OGC filter property XPath:
lts:AssetPart
- Returns:
- the
Collection
of the parts of this asset, nevernull
or empty
-
getType
Gets the type of this asset. The type reflects the intrinsic type of the source data, as opposed togetSupportedCoverageTypes()
, which represents the type(s) of the coverages this asset can be fused in. The supported coverage types are optional and may be empty, in which case the type is assumed to be the only supported coverage type. Often, the supported coverage types contain the type, but this is not necessarily so. The most notable exception is vector data that can only be fused as image. Some examples:- Imagery can usually only be fused as image.
The concrete metadata instance is
TLfnRasterAssetMetadata
with typeIMAGE
. Supported coverage types may be empty or may containIMAGE
. - Elevation data can usually be fused as elevation and image.
The concrete metadata instance is
TLfnRasterAssetMetadata
with typeELEVATION
. Supported coverage types may contain bothELEVATION
andIMAGE
. - Vector data that can be fused as vector.
The concrete metadata instance is
TLfnVectorAssetMetadata
with typeVECTOR
. Supported coverage types may be empty or may containVECTOR
. - Vector data that can only be fused as image, such as ECDIS.
The concrete metadata instance is
TLfnRasterAssetMetadata
with typeVECTOR
. Supported coverage types containsIMAGE
. - Raster data that supports
ALcdImage
and which is image or elevation. The concrete metadata instance isTLfnRasterAssetMetadata
with typeIMAGE
orELEVATION
. Supported coverage types containsRASTER
, in addition toIMAGE
and/orELEVATION
. - Raster data that supports
ALcdImage
and which is not image nor elevation, for example multispecral data. The concrete metadata instance isTLfnRasterAssetMetadata
with typeRASTER
. Supported coverage types may be empty or may containRASTER
.
OGC filter property XPath:
lts:Type
- Returns:
- the asset type, never
null
- See Also:
- Imagery can usually only be fused as image.
The concrete metadata instance is
-
getFormat
Returns the name (see
ALfnFormat#getName()
) of theALfnFormat
which created this asset (for example, 'SHP').- Returns:
- the name of the
ALfnFormat
which created this asset, possiblynull
-
getSupportedCoverageTypes
Gets the supported coverage types of this asset. When they are empty, the type is assumed to be the supported coverage type. Often, the supported coverage types contain the type, but this is not necessarily so. The most notable exception is vector data that can only be fused as image. Some examples:- Imagery can usually only be fused as image.
The concrete metadata instance is
TLfnRasterAssetMetadata
with typeIMAGE
. Supported coverage types may be empty or may containIMAGE
. - Elevation data can usually be fused as elevation and image.
The concrete metadata instance is
TLfnRasterAssetMetadata
with typeELEVATION
. Supported coverage types may contain bothELEVATION
andIMAGE
. - Vector data that can be fused as vector.
The concrete metadata instance is
TLfnVectorAssetMetadata
with typeVECTOR
. Supported coverage types may be empty or may containVECTOR
. - Vector data that can only be fused as image, such as ECDIS.
The concrete metadata instance is
TLfnRasterAssetMetadata
with typeVECTOR
. Supported coverage types containsIMAGE
. - Raster data that supports
ALcdImage
and which is image or elevation. The concrete metadata instance isTLfnRasterAssetMetadata
with typeIMAGE
orELEVATION
. Supported coverage types containsRASTER
, in addition toIMAGE
and/orELEVATION
. - Raster data that supports
ALcdImage
and which is not image nor elevation, for example multispecral data. The concrete metadata instance isTLfnRasterAssetMetadata
with typeRASTER
. Supported coverage types may be empty or may containRASTER
.
The list returned by this method will be immutable. The instance returned by this method will be a different one than the one passed as parameter to
ALfnAssetMetadata.Builder.supportedCoverageTypes(java.util.Collection)
.OGC filter property XPath:
lts:SupportedCoverageType
- Returns:
- the supported coverage types, possibly empty but never
null
- See Also:
- Imagery can usually only be fused as image.
The concrete metadata instance is
-
getGeoReference
Gets the geographic reference of the bounding box of this asset.OGC filter property XPath:
lts:GeoReference
- Returns:
- the geographic reference of the bounding box, never
null
-
getClippingShape
Gets the 2D clipping shape of this asset.OGC filter is not supported for this property, use bounding box instead.
- Returns:
- the 2D clipping shape, possibly
null
- Since:
- 2013.0
-
getBoundingShape
Deprecated.usegetClippingShape()
instead -
getBoundingBox
Gets the bounding box of this asset. If this asset has multiple parts, the bounding box will be the union of the bounding boxes of the parts.- Returns:
- the bounding box of this asset, never
null
-
getBounds
Gets the bounding box of this asset. This method behaves exactly the same asgetBoundingBox()
, it exists solely to implement theILcdBounded
interface.- Specified by:
getBounds
in interfaceILcdBounded
- Returns:
- the bounding box of this asset, never
null
- See Also:
-
getMinScaleDenominator
public int getMinScaleDenominator()Returns the denominator of the minimum scale at which this asset should be used. The scale of the asset is1:denominator
.The scale is expressed as the ratio between a distance on the displayed map and the corresponding distance in the real geographic environment. For instance, a scale of
1:1000
means that 1 centimeter on the map corresponds to 1000 centimeters in the real geographic context represented by the map.By default, the minimum scale denominator is
-1
, meaning "unlimited" (corresponds to a scale of 0).Use minimum scale denominators on assets to limit their visible range in the fused coverage. When applied correctly, this effectively limits the number of high-detailed assets that need to be loaded in order to fuse low-detailed tiles, thus avoiding memory problems.
- Returns:
- the minimum scale denominator, or
-1
if undefined (unlimited)
-
getMaxScaleDenominator
public int getMaxScaleDenominator()Returns the denominator of the maximum scale at which this asset should be used. The scale of the asset is1:denominator
.The scale is expressed as the ratio between a distance on the displayed map and the corresponding distance in the real geographic environment. For instance, a scale of
1:1000
means that 1 centimeter on the map corresponds to 1000 centimeters in the real geographic context represented by the map.By default, the maximum scale denominator is
-1
, meaning "unlimited" (corresponds to an infinite scale).- Returns:
- the maximum scale denominator, or
-1
if undefined (unlimited)
-
getRoot
Gets the root of the locations common to all asset parts, possiblynull
. This root is used to relativize the locations.- Returns:
- the root of the support files, possibly
null
- Since:
- 2014.0
- See Also:
-
getLocation
Gets the catalog location, possiblynull
. There can be at most a single such location. The catalog location is the equivalent of a catalog source name that can be given to a model decoder to decode a (catalog) model. This is different from the locations of the individual asset parts. This is different from the support locations, because the latter can never be decoded into a model. The S-57 structure for example fits into this metadata model like so:CATALOG.031:
the asset metadata's locationABCXCDV.000:
the cell files, each of which is the location of an asset part
- Since:
- 2014.0
-
getFeatureTypeStyles
Gets the feature type styles of this asset.OGC filter property XPath:
lts:FeatureTypeStyle
This property can be used with the OGC filter bounding box operator.- Returns:
- the feature type styles, never
null
-
asBuilder
Description copied from class:ALfnResourceMetadata
Creates a new builder from this resource metadata. The builder's fields are initialized to the values of this resource metadata. The builder will build a resource metadata of the same type as this instance.- Specified by:
asBuilder
in classALfnResourceMetadata
- Returns:
- a new builder
-
equals
- Overrides:
equals
in classALfnResourceMetadata
-
hashCode
public int hashCode()- Overrides:
hashCode
in classALfnResourceMetadata
-
getClippingShape()
instead