JViews 4.0 Maps Release Notes
This document describes the main changes that have been made to the
JViews Maps module since version 3.5.
General Changes
Library Changes
New
Classes and Interfaces
maps.IlvLookAheadFeatureIterator
maps.format.IlvMapTileLoader
maps.format.shapefile.IlvShapeFileIndex
maps.format.shapefile.IlvShapeFileTileLoader
maps.format.shapefile.IlvShapeFileSpatialIndex
Modified Classes
-
maps.format.shapefile.IlvDBFReader
-
maps.format.shapefile.IlvSHPReader
-
maps.format.shapefile.IlvShapeFileReader
Demonstration Changes
General
Changes
Support for load-on-demand on ESRI Shapefiles has been added. To load Shapefiles
on demand, a new type of file, with the .idx extension, has been
introduced. These files contain the spatial indexes associated with Shapefiles.
The following classes have been added to support the load-on-demand
feature:
-
ilog.views.maps.format.shapefile.IlvShapeFileIndex
- To read ESRI Shapefile index files (.shx extension).
-
ilog.views.maps.format.shapefile.IlvShapeFileSpatialIndex
- To read the newly introduced spatial index files (.idx extension).
-
ilog.views.maps.format.shapefile.IlvShapeFileTileLoader
- The tile loader for Shapefiles, to create load-on-demand layers when
used in conjunction with IlvTiledLayer.
A new class has been added to simplify the creation of tile loaders: the
IlvMapTileLoader
class. This class includes all standard rendering features and tile loading
for all tile loaders.
Library
Changes
New Classes
and Interfaces
New Interfaces
ilog.views.maps.IlvLookAheadFeatureIterator
Defines the interface for IlvMapFeatureIterator
that has the ability to fetch the ID of the next feature before reading
it, allowing you to skip the next feature if it is not needed.
New Classes
ilog.views.maps.format.IlvMapTileLoader
This abstract class proposes a default
implementation of an IlvTileLoader.
This implementation has a load()
method that can take advantage of IlvLookAheadFeatureIterators.
Tile loaders that use this class as the base class have only a few methods
to implement.
ilog.views.maps.format.shapefile.IlvShapeFileIndex
This class brings the support of ESRI Shapefile index files
(.shx extension). Shapefile index files provide file offset information
for random access of geometries in a Shapefile geometry file (.shp).
ilog.views.maps.format.shapefile.IlvShapeFileTileLoader
This class is an IlvMapTileLoader
specialized in reading tiles from a Shapefile. This class provides IlvLookAheadFeatureIterator
to load from Shapefile tiles, and thus can be exploited by the load()
method of IlvMapTileLoader.
ilog.views.maps.format.shapefile.IlvShapeFileSpatialIndex
This class stores the spatial information of Shapefiles. Basically,
for each tile corresponding to the Shapefile, this class stores the IDs
of the geometries, thereby enabling the load-on-demand feature.
The spatial index can be saved as an .idx file to allow load-on-demand
without the need to rebuild the spatial index each time.
Modified Classes
ilog.views.maps.format.shapefile.IlvDBFReader
-
Overview of new features
-
String attributes can now be trimmed so that the stored string is cleaned
of leading and trailing spaces.
-
It is now possible to ignore some attributes. When an attribute is ignored,
it is set to null.
-
Strings read from .dbf files are now decoded using a customizable
character encoding.
-
Retrieving of attribute sizes, that is, .dbf field size, is now
possible on a field basis.
-
New methods
-
get/setTrimmingStringAttributes -
Returns/sets the attribute trimming mode.
-
is/setReadingAttribute - Returns
or sets whether an attribute is being read.
-
get/setStringEncoding - Returns/sets
the encoding used to decode strings.
-
getAttributeSize - Returns the size
of the specified attribute.
ilog.views.maps.format.shapefile.IlvSHPReader
-
Overview of new features
-
An IlvSHPReader can now be constructed
for direct access to geometries contained in the Shapefile.
-
This reader is now able to get the ID of the next feature before reading
it. It is also able to skip the feature if the loading is not needed.
-
New constructor
-
A new constructor with the .shp and the .shx file names
has been added.
-
New methods
-
getFeatureAt - Reads the feature
at the specified index.
-
getNextFeatureIndex - Returns the
index of the next feature returned by getNextFeature.
-
getNextFeatureId - Returns an Object
that is the ID of the next feature returned by getNextFeature.
-
skipNextFeature - Skips the next
feature that should have been returned by getNextFeature.
ilog.views.maps.format.shapefile.IlvShapeFileReader
-
Overview of new features
-
Constructors have been added to support Shapefile index files.
-
New constructors
-
A new constructor with the .shp,.shx, and .dbf
file names has been added.
-
A new constructor with the various readers instead of file names has been
added.
-
New methods
-
getFeatureAt - Returns the feature
at the specified index
-
getNextFeatureIndex - Returns the
index of the next feature returned by getNextFeature.
-
getNextFeatureId - Returns an Object
that is the ID of the next feature returned by getNextFeature.
-
skipNextFeature - Skips the next
feature that should have been returned by getNextFeature.
Demonstration
Changes
The ESRI Shapefile
demos
A new demo has been added in the <installdir>/demos/maps/esri
directory. This demo is the LODViewer. It contains sample code
to create a load-on-demand layer for Shapefiles. You can also use it to
create the spatial index for Shapefiles that do not have one.
To view a Shapefile in load-on-demand:
-
Select "Load a Shapefile..." in the File menu.
-
Choose a Shapefile (.shp extension). If
an attribute file (.dbf extension) is available in the same directory,
it will be used to load the attributes for geometry. A Shapefile index
(.shx) file is mandatory for load-on-demand.
-
A dialog box is displayed. With this dialog box,
you can either select an already-existing spatial index file, or create
a new one.
-
If you select an index file that does not exist,
the program will propose that you create a new one.
To create the spatial index for a Shapefile:
-
Select "Load a Shapefile..." in the File menu.
-
Choose a Shapefile (.shp extension). If
an attribute file (.dbf extension) is available in the same directory,
it will be used to load the attributes for geometry. A Shapefile index
(.shx) file is mandatory for load-on-demand.
-
A dialog box is displayed. Select "Create spatial
index". A file selector is displayed for the spatial index file name.