public class IlvS57DataSource extends IlvDefaultTilableDataSource
IlvS57DataSource
represents a data source to read S57 files.
Simplified rendering can be activated or deactivated by calling
setSimplifiedRendering(boolean )
.
Rendering Type | Description |
Activated | Whatever the object attributes are, S52 symbols are rendered using a predefined icon for each object type. Polygon and polyline colors are likewise predefined. |
Deactivated | Perforce JViews Maps for Defense uses the IHO ECDIS Presentation library (Edition 3.3, March 2004) definitions to create S52 symbols according to attribute content. |
IlvHierarchicalDataSource.CriterionFilter, IlvHierarchicalDataSource.SingleAttributeFilter
Modifier and Type | Field and Description |
---|---|
static String[] |
S52COLORSETS
The list of the available S52 color sets.
|
GeometryClassInformation
featureIterator, filename, nameMap, styleMap
renderer, usingGeodeticComputation
Constructor and Description |
---|
IlvS57DataSource(IlvInputStream stream)
Creates a new
IlvS57DataSource instance. |
IlvS57DataSource(String filename)
Constructs an
IlvS57DataSource from a file. |
IlvS57DataSource(URL url)
Constructs an
IlvS57DataSource from the specified URL. |
Modifier and Type | Method and Description |
---|---|
protected void |
addLayer(IlvMapLayer parent,
IlvMapLayer layer)
Adds a specified
IlvMapLayer in the specified parent layer. |
protected IlvDefaultFeatureFilter |
createDefaultFilter()
Creates, at construction time, the filter that will be used to separate
features into layers.
|
protected IlvMapReusableFeatureIterator |
createFeatureIterator(String fileName)
Method used in
IlvDefaultTilableDataSource.IlvDefaultTilableDataSource(String) constructor to build the data source reader. |
protected IlvMapReusableFeatureIterator |
createFeatureIterator(URL url)
Method used in the
IlvDefaultTilableDataSource.IlvDefaultTilableDataSource(URL) constructor to build the data source reader. |
protected IlvFeatureRenderer |
createFeatureRenderer()
This method has been overridden to render points using an
IlvS52PointRenderer . |
protected IlvMapRegionOfInterestIterator |
createTiledIterator(IlvFeatureClassInformation featureValue,
IlvGeometryClassFilter geometryClass)
Creates an iterator to iterates through the map features searching for a
specific area of interest.
|
String |
getColorSet()
Returns the S52 color set to use.
|
double |
getDeepContour()
Returns the deep contour depth in meters.
|
double |
getSafetyContour()
Returns the safety contour depth in meters.
|
double |
getShallowContour()
Returns the shallow contour depth in meters.
|
protected IlvMapStyle |
getStyle(IlvMapFeature feature)
Returns a map style for the specified feature.
|
protected void |
initFeatureList()
Specific initialization done when data source is created.
|
boolean |
isFullLengthSectorLines()
Indicates if full length sector lines should be displayed.
|
boolean |
isShallowPattern()
Indicates whether shallow pattern rendering is used.
|
boolean |
isShowS52Text()
Indicates whether S52 rendering will create text.
|
boolean |
isSimplifiedRendering()
Indicates whether simplified rendering is activated.
|
boolean |
isTwoShades()
Indicates if the two shades option is activated.
|
String |
makeLayerName(String name,
IlvGeometryClassFilter d)
Creates a layer name from a feature name and a geometry class.
|
void |
setColorSet(String colorSet)
Sets the color set to use when rendering S52.
|
void |
setDeepContour(double deepContour)
Sets the deep contour depth.
|
void |
setFullLengthSectorLines(boolean fullLengthSectorLines)
Sets the full length sector lines.
|
void |
setSafetyContour(double safetyContour)
Sets the safety contour depth.
|
void |
setShallowContour(double shallowContour)
Sets the shallow contour depth.
|
void |
setShallowPattern(boolean shallowPattern)
Enables the shallow pattern option.
|
void |
setShowS52Text(boolean showS52Text)
Sets to
true for S52 rendering to display text. |
void |
setSimplifiedRendering(boolean simplifiedRendering)
Indicates whether simplified rendering is activated.
|
void |
setTilingParameters(boolean useTiling,
int rows,
int columns)
Sets tiling parameters for this data source.
|
void |
setTwoShades(boolean twoShades)
Sets the two shades option.
|
void |
start()
Starts this data source.
|
acceptsCode, createGenericTiles, createTiledLayers, getColumnCount, getFeatureFilterPropertyName, getFeatureIterator, getFeatureName, getGeometryClassFilters, getGeometryClassInformation, getLatMax, getLatMin, getLayerOrder, getLonMax, getLonMin, getMonitoringData, getRowCount, getURL, isMultiThreaded, isSourceDataAvailable, isUsingTiling, readInfo, reset, setAcceptedCodeList, setAreaOfinterest, setLayerOrder, setMonitoringData, setMultiThreaded, setupLayer, setupTiledLoaders, setURL, write
addCriterionFilter, createInsertionLayer, createStyle, getCriterionFilters, getFeatureRenderer, getFeatureRenderer, getKey, getMapLayer, isAcceptNullValues, removeAllCriterionFilters, removeCriterionFilter, setAcceptNullValues
addDataSourceListener, callListeners, getBackupDataSources, getCoordinateSystem, getDescription, getInsertionLayer, getManager, getName, getNode, getValidExtentions, hasInsertionLayer, initBackupDataSource, initInsertionLayer, isAttachingAttributes, isGrapherMode, isSaveBackupDataSources, isUsingBackupDataSource, isUsingGeodeticComputation, mapIntersects, removeDataSourceListener, setAttachingAttributes, setCoordinateSystem, setDescription, setFeatureRenderer, setForceUsingBackupDataSource, setGrapherMode, setInsertionLayer, setManager, setName, setSaveBackupDataSources, setValidExtentions, toString
public static final String[] S52COLORSETS
public IlvS57DataSource(IlvInputStream stream) throws IlvReadFileException
IlvS57DataSource
instance.stream
- The stream to be created.IlvReadFileException
- if there is a problem reading from
stream
.public IlvS57DataSource(String filename) throws MalformedURLException
IlvS57DataSource
from a file.filename
- The name of the S57 file to read.MalformedURLException
- if filename
cannot be parsed as a URLpublic IlvS57DataSource(URL url) throws IOException
IlvS57DataSource
from the specified URL.url
- The name of the S57 file to read.IOException
- if there is a problem reading from url
.public String getColorSet()
public double getDeepContour()
public double getSafetyContour()
public double getShallowContour()
public boolean isFullLengthSectorLines()
true
is returned.public boolean isShallowPattern()
true
is returned.public boolean isShowS52Text()
true
is returned.public boolean isSimplifiedRendering()
true
is returned.public boolean isTwoShades()
true
is returned.public void setColorSet(String colorSet)
S52COLORSETS
defines the list of available color sets.colorSet
- The color set to use.IllegalArgumentException
- if colorSet
is not in the
S52COLORSETS
list.public void setDeepContour(double deepContour)
deepContour
- The new depth.public void setFullLengthSectorLines(boolean fullLengthSectorLines)
false
.fullLengthSectorLines
- Set to true
to enable
full length sector lines.public void setSafetyContour(double safetyContour)
safetyContour
- The new safety contour depth.public void setShallowContour(double shallowContour)
shallowContour
- The new shallow contour depth.public void setShallowPattern(boolean shallowPattern)
false
.shallowPattern
- Set to true
to enable the
shallow pattern.public void setShowS52Text(boolean showS52Text)
true
for S52 rendering to display text. Examples of
text used in the S52 specification are light information, and sea bed area
names.showS52Text
- Set to true
so rendering will create S52
symbols with text. The default value is false
.public void setSimplifiedRendering(boolean simplifiedRendering)
simplified
is now set to
false
by default. S52 is now rendered by decoding the
digital presentation library.
The following methods indicate how rendering will be performed by this
instance of IlvS57DataSource
:
setShowS52Text(boolean)
setDeepContour(double)
setFullLengthSectorLines(boolean)
setShallowContour(double)
setShallowPattern(boolean)
setSafetyContour(double)
setColorSet(String)
simplifiedRendering
- Set to true
to use the simplified rendering.public void setTwoShades(boolean twoShades)
true
.twoShades
- Set to false
to disable the two shades option.public void start() throws Exception
start
in class IlvDefaultTilableDataSource
Exception
IlvDefaultTilableDataSource.start()
protected void addLayer(IlvMapLayer parent, IlvMapLayer layer)
IlvMapLayer
in the specified parent layer.addLayer
in class IlvDefaultTilableDataSource
parent
- The parent layer.layer
- The IlvMapLayer
to add.IlvDefaultTilableDataSource.addLayer(ilog.views.maps.beans.IlvMapLayer, ilog.views.maps.beans.IlvMapLayer)
protected IlvDefaultFeatureFilter createDefaultFilter()
IlvDefaultFeatureFilter
instance and pass the property used to split features.createDefaultFilter
in class IlvDefaultTilableDataSource
IlvDefaultTilableDataSource.createDefaultFilter()
protected IlvMapReusableFeatureIterator createFeatureIterator(String fileName) throws IOException
IlvDefaultTilableDataSource.IlvDefaultTilableDataSource(String)
constructor to build the data source reader.
For example:protected void createFeatureIterator(String fileName) { return new IlvS57Reader(fileName); }
createFeatureIterator
in class IlvDefaultTilableDataSource
fileName
- The file parameter.IOException
IlvDefaultTilableDataSource.createFeatureIterator(java.lang.String)
protected IlvMapReusableFeatureIterator createFeatureIterator(URL url) throws IOException
IlvDefaultTilableDataSource.IlvDefaultTilableDataSource(URL)
constructor to build the data source reader.
For example:protected void createFeatureIterator(URL urlName) { return new IlvS57Reader(urlName); }
createFeatureIterator
in class IlvDefaultTilableDataSource
url
- The file parameter.IOException
IlvDefaultTilableDataSource.createFeatureIterator(java.net.URL)
protected IlvFeatureRenderer createFeatureRenderer() throws Exception
IlvS52PointRenderer
.createFeatureRenderer
in class IlvHierarchicalDataSource
Exception
IlvHierarchicalDataSource.createFeatureRenderer()
protected IlvMapRegionOfInterestIterator createTiledIterator(IlvFeatureClassInformation featureValue, IlvGeometryClassFilter geometryClass)
createTiledIterator
in class IlvDefaultTilableDataSource
featureValue
- The value to filter features with.geometryClass
- A subclass of IlvMapGeometry
used
to prevent confusing different types of feature on the same layer.protected IlvMapStyle getStyle(IlvMapFeature feature) throws Exception
IlvHierarchicalDataSource.createStyle(Class, Object)
getStyle
in class IlvHierarchicalDataSource
feature
- The IlvMapFeature
.IlvMapStyle
for the featureException
- if an appropriate style could not be found for the specified
feature.IlvHierarchicalDataSource.getStyle(ilog.views.maps.IlvMapFeature)
protected void initFeatureList()
initFeatureList
in class IlvDefaultTilableDataSource
IlvDefaultTilableDataSource.initFeatureList()
public void setTilingParameters(boolean useTiling, int rows, int columns)
setTilingParameters
in class IlvDefaultTilableDataSource
useTiling
- If true
, this data source will use the load-on-demand
mechanism for loading data. If false
, all
the data will be loaded when the start
method is
called.rows
- The number of rows of tiles (only when useTiling
is
true
);columns
- The number of columns of tiles (only when useTiling
is
true
);setSimplifiedRendering(boolean)
public String makeLayerName(String name, IlvGeometryClassFilter d)
makeLayerName
in class IlvDefaultTilableDataSource
name
- The feature name.d
- The geometry class.IlvDefaultTilableDataSource.makeLayerName(java.lang.String, ilog.views.maps.format.IlvGeometryClassFilter)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.