Class ALfnCoverageMetadata
- All Implemented Interfaces:
ILcdBounded
- Direct Known Subclasses:
TLfnCoverageMetadata
,TLfnRasterCoverageMetadata
,TLfnVectorCoverageMetadata
-
type: the data type of a coverage, one of
ELfnDataType
. If not set or set tonull
, an auto-default value will be used based on the assets' types. -
bounding box: the 2D bounding box of a coverage.
If not set or set to
null
, an auto-default value will be used based on the union of the bounding boxes of the assets. -
geographic reference: the geographic reference of the bounding box.
If not nset or set to
null
, an auto-default value will be used based on the common geographic references of the assets, or EPSG:4326 if the assets don't have a common geographic reference. -
format: the format of the tile data provided by this coverage.
If not set or set to
null
, an auto-default value will be used based on the assets' types. - level 0 row count: the # rows at level 0, which is the least detailed level. If not set or set to a negative value, an auto-default value will be used such that the tiles are square as much as possible.
- level 0 column count: the # columns at level 0. If not set or set to a negative value, an auto-default value will be used such that the tiles are square as much as possible.
-
assets: the assets which contributed to the coverage.
If not set or set to
null
, this defaults to the empty list. -
scale denominators: the scale denominators identifying the scales at which this coverage is best used.
If not set or set to
null
, this defaults to the empty list.
Instances of this class are immutable, thus thread-safe.
Asset info status
The asset info status tells if an asset has already been completely fused in a coverage or not. Initially, the status isALfnCoverageMetadata.AssetInfo.STATUS_INCOMPLETE
.
While fusion is ongoing, the status remains STATUS_COMPLETE
.
Once fusion is done, the fusion engine sets the statuses of all assets in a coverage to ALfnCoverageMetadata.AssetInfo.STATUS_COMPLETE
,
hereby bumping the coverage metadata's update sequence.
When adding a new asset to a coverage, its status should always be STATUS_INCOMPLETE
.
You should never 'choose' to change the status to STATUS_COMPLETE
, that is the responsibility of the fusion engine.
Resource metadata resolvers
In order to compute auto-defaults for its properties, anALfnCoverageMetadata.Builder
needs access to the asset metadata.
An ILfnResourceMetadataResolver
allows a builder to gain access to the asset metadata using an asset ID.
You need a resolver if both the following conditions are true:
- You need the builder to compute auto-defaults from the asset metadata.
- You haven't passed the asset metadata directly to the builder using
ALfnCoverageMetadata.Builder.addAssetInfo(ALfnAssetMetadata, String)
.
ALfnCoverageMetadata.Builder.addAssetInfo(ALfnAssetMetadata, String)
.Examples
Use specific values for a coverage's geographic reference and bounding box, leave everything else to the auto-defaults:
ALfnAssetMetadata assetMetadata1;
ALfnAssetMetadata assetMetadata2;
TLcdGeodeticReference epsg4326 = new TLcdGeodeticReference();
ILcdBounds world = new TLcdLonLatBounds(-180, -90, 360, 180);
ALfnCoverageMetadata coverageMetadata = TLfnRasterCoverageMetadata
.newBuilder()
.assetInfo(assetMetadata1)
.assetInfo(assetMetadata2)
.geoReference(epsg4326)
.boundingBox(world)
.build();
Given a coverage, create a new coverage and reset its geographic reference and bounding box to the auto-defaults.
We have to us a resource resolver so that the builder can resolve asset IDs to asset metadata:
List<ALfnAssetMetadata> assetMetadatas = Arrays.asList(assetMetadata1, assetMetadata2);
ILfnResourceMetadataResolver resolver = new TLfnCollectionResourceMetadataResolver(assetMetadatas);
ALfnCoverageMetadata newCoverageMetadata = coverageMetadata
.asBuilder(resolver)
.geoReference(null)
.boundingBox(null)
.build();
- Since:
- 10.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A reference to an asset with an associated status.static class
Abstract builder for coverage 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 ALfnCoverageMetadata.Builder
<?> Creates a new builder from this resource metadata.abstract ALfnCoverageMetadata.Builder
<?> asBuilder
(ILfnResourceMetadataResolver aResolver) Creates a new builder from this coverage metadata using a given resolver.boolean
Gets the list of asset infos of this coverage.Gets the bounding box of this coverage.Returns the bounding box of this coverage.Returns what the density of the data in the coverage is.Gets the SLD feature type styles to be used for the visualization of this coverage.Gets the format of this coverage.Gets the format version of this coverage.Gets the geographic reference of this coverage.long
Gets the number of columns at level 0 of this coverage.long
Gets the number of rows at level 0 of this coverage.Gets the message digest algorithm of this coverage, possiblynull
.Gets the denominators of the scales at which this coverage will typically be viewed.getType()
Gets the type of this coverage.int
hashCode()
boolean
Tells whether or not the asset sources are in the Tile Store.boolean
Indicates whether non-fatal failures can be ignored during the fusion process.Methods inherited from class com.luciad.fusion.tilestore.metadata.ALfnResourceMetadata
accept, getAbstract, getGlobalUpdateSequence, getId, getISO19115Metadata, getName, getUpdateSequence, toString
-
Method Details
-
getType
Gets the type of this coverage.OGC filter property XPath:
Since 2013.1 the type may belts:Type
null
whenisAssetSourcesInTileStore()
istrue
. In this case the coverage only contains the raw asset data but has no tile structure. Parameters such as format, geo reference then become irrelevant (although they may still be defined).- Returns:
- the type of the coverage, never
null
whenisAssetSourcesInTileStore()
isfalse
, possiblynull
whenisAssetSourcesInTileStore()
istrue
-
isAssetSourcesInTileStore
public boolean isAssetSourcesInTileStore()Tells whether or not the asset sources are in the Tile Store. The default isfalse
. Whentrue
, fusion will copy the asset sources into the Tile Store for all assets of this coverage. Such a coverage does not need to have a tile structure. Both the WMS "GetMap" and "GetFeatureInfo" requests will be served using the asset sources. When a coverage has both asset sources and a tile structure, the image tiles will be used to serve WMS "GetMap" requests while the asset data will be used to serve WMS "GetFeatureInfo" requests. When this method returnsfalse
, this coverage must have a tile structure.- Returns:
- whether or not the asset sources of the assets of this coverage are in the Tile Store
- Since:
- 2013.1
-
getFeatureTypeStyles
Gets the SLD feature type styles to be used for the visualization of this coverage. The SLD feature type styles are possibly empty, but never
null
. The default is an empty list.- Returns:
- the SLD feature type styles to be used for the visualization of this coverage, possibly empty but never
null
- Since:
- 2013.1
- See Also:
-
getLevel0RowCount
public long getLevel0RowCount()Gets the number of rows at level 0 of this coverage. Sane values are in the range[1..15]
, although this is not enforced.OGC filter property XPath:
lts:Level0RowCount
- Returns:
- the number of rows at level 0
-
getLevel0ColumnCount
public long getLevel0ColumnCount()Gets the number of columns at level 0 of this coverage. Sane values are in the range[1..15]
, although this is not enforced.OGC filter property XPath:
lts:Level0ColumnCount
- Returns:
- the number of columns at level 0
-
getBoundingBox
Gets the bounding box of this coverage.OGC filter property XPath:
lts:BoundingBox
This property can be used with the OGC filter bounding box operator- Returns:
- the bounding box, never
null
-
getGeoReference
Gets the geographic reference of this coverage.OGC filter property XPath:
lts:GeoReference
- Returns:
- the geographic reference, never
null
-
getFormat
Gets the format of this coverage. The format is a MIME type.OGC filter property XPath:
lts:Format
- Returns:
- a format, never
null
-
getFormatVersion
Gets the format version of this coverage. The format version indicates which version of a format is used in the coverage, if multiple versions exist.null
indicates that a format version is irrelevant for this coverage's format.For the built-in formats, only the Vector Tile format currently has multiple versions, 0 and 1.0. The main difference between the two versions is that version 1.0 supports text features. When backwards compatibility is not required, always use the latest version.
OGC filter property XPath:
lts:FormatVersion
- Returns:
- a format version, possibly
null
-
getAssetInfos
Gets the list of asset infos of this coverage. The order of the assets is not relevant.OGC filter property XPath:
lts:AssetInfo/
assetInfoPropertyName
SeeALfnCoverageMetadata.AssetInfo
for the asset info property names.- Returns:
- a list of assets, possibly empty but never
null
-
getScaleDenominators
Gets the denominators of the scales at which this coverage will typically be viewed. The corresponding scale 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.The returned list is immutable thus thread-safe.
OGC filter property XPath:
lts:ScaleDenominator
The scale denominators are optional, and may be empty. When present, they may be used by client applications as hints as to which scales the coverage is best viewed at. For example the "CTRL-mousewheel" zoom controller uses it to snap-zoom.
It is not required that the scale denominators are related to its levels, although this will often be the case. For vector data, it is possible to use the scale denominators to "override" the default visualization levels with. SeeTLfnGXYVectorLayer.setUseCoverageScalesAsLevelScales(boolean)
.- Returns:
- a list of scale denominators, possibly empty but never
null
- Since:
- 11.0
-
getDataDensity
Returns what the density of the data in the coverage is. The data density information can be used by rendering engines as a hint on how to render the data in a coverage, for example, which tiles are rendered on screen, which level of detail is chosen for a given scale, how the rendering of the data towards the horizon is done, ... The default isELfnDataDensity.OVERVIEW
forTLfnVectorCoverageMetadata
andnull
for others.- Returns:
- the density of the data in the coverage, possibly
null
- See Also:
-
getBounds
Returns the bounding box of this coverage. 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 coverage, never
null
- See Also:
-
getMessageDigestAlgorithm
Gets the message digest algorithm of this coverage, possiblynull
. The message digest algorithm may be used to sign each tile, which can be used on the server to do corruption checks on a coverage on a per-tile basis. An example of a message digest algorithm is"MD5"
. A message digest algorithm is valid ifMessageDigest.getInstance(String)
returns a valid message digest instance. Note that setting a message digest algorithm will in not in itself trigger the actual signing of tiles. In order to perform signing, you should use theTLfnDigestTileStore
decorator.- Returns:
- the message digest algorithm for signing tiles of this coverage, possibly
null
- Since:
- 2012.0
-
isIgnoreNonFatalFailures
public boolean isIgnoreNonFatalFailures()Indicates whether non-fatal failures can be ignored during the fusion process.- If
true
: the fusion process may continue when certain failures occur, for example missing or corrupt source data - If
false
: the fusion process must immediately abort
By default, this is
false
.If set to
true
, the fusion processing engine will report these non-fatal failures for inspection.- Returns:
true
if non-fatal failures may be ignored,false
if the fusion process should fail- Since:
- 2013.0
- If
-
equals
- Overrides:
equals
in classALfnResourceMetadata
-
hashCode
public int hashCode()- Overrides:
hashCode
in classALfnResourceMetadata
-
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
-
asBuilder
Creates a new builder from this coverage metadata using a given resolver. If notnull
, the resolver is used to resolve asset metadata when computing a coverage's auto-defaults. SeeALfnCoverageMetadata.Builder
for the uses of a resolver.- Parameters:
aResolver
- a resolver to resolve the asset metadata for computing auto-defaults, which may benull
- Returns:
- this builder
- Since:
- 2014.0
-