ilog.views.maps.datasource
Class IlvPolylineSimplifierDataSource

java.lang.Object
  extended by ilog.views.maps.datasource.IlvMapDataSource
      extended by ilog.views.maps.datasource.IlvGraphicLayerDataSource
          extended by ilog.views.maps.datasource.IlvPolylineSimplifierDataSource
All Implemented Interfaces:
IlvPersistentObject, IlvFeatureRenderer, IlvMapFeatureIterator, IlvMapReusableFeatureIterator

public class IlvPolylineSimplifierDataSource
extends IlvGraphicLayerDataSource

IlvPolylineSimplifierDataSource features a utility that simplifies polygons and polylines through the use of an IlvPolygonSimplifyingEngine.

This class is useful when the original data source is too detailed and you want to reduce the map size.

Since:
JViews 8.1

Field Summary
 
Fields inherited from class ilog.views.maps.datasource.IlvMapDataSource
renderer, usingGeodeticComputation
 
Constructor Summary
IlvPolylineSimplifierDataSource(IlvInputStream stream)
          Creates a data source by reading its parameters from an input stream.
IlvPolylineSimplifierDataSource(IlvMapDataSource dataSource)
          Creates an IlvPolylineSimplifierDataSource instance from an IlvMapDataSource object passed as a parameter.
 
Method Summary
 boolean isGeoreferenced()
          Returns false.
 void setSimplifyDistance(double distance)
          Sets the criterion distance used to simplify polylines.
 void start()
          Simplifies the specified collection of polylines.
 void write(IlvOutputStream stream)
          Writes an IlvPolylineSimplifierDataSource instance to an IlvOutputStream.
 
Methods inherited from class ilog.views.maps.datasource.IlvGraphicLayerDataSource
add, add, clear, dispose, get, getDefaultFeatureRenderer, getFeatureIterator, getLowerRightCorner, getMonitoringData, getNextFeature, getUpperLeftCorner, isPersistent, makeGraphic, remove, restart, setCoordinateSystem, setManager, setMonitoringData, size
 
Methods inherited from class ilog.views.maps.datasource.IlvMapDataSource
addDataSourceListener, callListeners, createInsertionLayer, getBackupDataSources, getCoordinateSystem, getDescription, getFeatureRenderer, getInsertionLayer, getManager, getMapLayer, getName, getNode, getValidExtentions, hasInsertionLayer, initBackupDataSource, initInsertionLayer, isAttachingAttributes, isSaveBackupDataSources, isSourceDataAvailable, isUsingGeodeticComputation, mapIntersects, removeDataSourceListener, reset, setAttachingAttributes, setDescription, setFeatureRenderer, setForceUsingBackupDataSource, setInsertionLayer, setName, setSaveBackupDataSources, setValidExtentions, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ilog.views.maps.IlvMapFeatureIterator
getCoordinateSystem
 

Constructor Detail

IlvPolylineSimplifierDataSource

public IlvPolylineSimplifierDataSource(IlvMapDataSource dataSource)
Creates an IlvPolylineSimplifierDataSource instance from an IlvMapDataSource object passed as a parameter.

Parameters:
dataSource - The IlvMapDataSource producing polylines to simplify.

IlvPolylineSimplifierDataSource

public IlvPolylineSimplifierDataSource(IlvInputStream stream)
                                throws IlvReadFileException
Creates a data source by reading its parameters from an input stream.

Parameters:
stream - The stream to read from.
Throws:
IlvReadFileException - if there is a problem reading from stream.
Method Detail

write

public void write(IlvOutputStream stream)
           throws IOException
Writes an IlvPolylineSimplifierDataSource instance to an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Specified by:
write in interface IlvFeatureRenderer
Overrides:
write in class IlvGraphicLayerDataSource
Parameters:
stream - The stream to write to.
Throws:
IOException - if there is a problem writing to stream.
See Also:
IlvFeatureRenderer.write(ilog.views.io.IlvOutputStream)

setSimplifyDistance

public void setSimplifyDistance(double distance)
Sets the criterion distance used to simplify polylines.

Parameters:
distance - The maximum distance in meters for the Douglas Peuker Algorithm.

start

public void start()
           throws Exception
Simplifies the specified collection of polylines. This simplification is done according to the SimplifyDistance criterion.

Overrides:
start in class IlvGraphicLayerDataSource
Throws:
Exception - when the initial source.
See Also:
setSimplifyDistance(double)

isGeoreferenced

public boolean isGeoreferenced()
Returns false.

Specified by:
isGeoreferenced in interface IlvMapFeatureIterator
Overrides:
isGeoreferenced in class IlvGraphicLayerDataSource
Returns:
This method always returns false.
See Also:
IlvMapFeatureIterator.isGeoreferenced()


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.