skip to main content
Defense > Programmer's documentation > Programming with JViews Maps for Defense > Readers and writers > The ASRP reader
 
The ASRP reader
Describes the ASRP readers provided.
*Overview
*Provides packaging and general information for the ASRP reader.
*The IlvRasterASRPReader class
*Describes the characteristics of the IlvRasterASRPReader class.
*Using the IlvRasterASRPReader class to create images
*Explains how to create the ASRP reader, the data source and read the data to create images.
Overview
This package contains classes for reading ARC Standardized Raster Product (ASRP) files. The ASRP format (see DIGEST ASRP and USRP) is a map format for scanned maps that is published by the Digital Geographic Information Exchange Standard (DIGEST), see http://www.digest.org/.
The ASRP readers provided by JViews Maps for Defense are based on the specification document The Arc Standard Raster Product Specification: Edition 1.2, March 1995.
A set of ASRP files describes a single scanned map, transformed to the Equal Arc-Second Raster Chart/Map (ARC) system frame of reference.
The source code for the Map Builder demonstration, which contains all of the code described in this section, can be found at <installdir> /jviews-maps/samples/mapbuilder/index.html
The IlvRasterASRPReader class
The IlvRasterASRPReader IlvRaster class reads ASRP images. It has the following characteristics:
*It needs the ASRP .IMG, .GEN and .QUA files to be able to parse bitmap data.
*It implements the IlvMapFeatureIterator interface.
*It can manage more than one image.
*For each ASRP image added, the reader returns one IlvMapFeature object, which is the geo-referenced image stored in the ASRP files. The map feature has:
*Geometry of type IlvMapImage.
*Attributes created from the .QUA file metadata.
Using the IlvRasterASRPReader class to create images
Creating the reader
To create the IlvRasterASRPReader IlvRaster :
*Provide the name of the .GEN file describing the ASRP image:
 
IlvRasterASRPReader imageReader = new IlvRasterASRPReader();
imageReader.addMap(fileName);
The reader removes the extension, that is, the characters after the last period ( . ) at the end of the filename, and constructs the names of the .GEN, .IMG and .QAL files from that base name. Note that a field inside the .GEN file can possibly override this default mechanism.
Creating a data source
To create a data source and link it with the manager properties:
*Define and insert the data source in the data source tree:
 
 
IlvMapDataSource imageDataSource =
  IlvRasterDataSourceFactory.buildTiledImageDataSource(manager,imageReader,
    true,true,null);
IlvMapDataSourceModel dataSourceModel =
  IlvMapDataSourceProperty.GetMapDataSourceModel(manager);
dataSourceModel.insert(imageDataSource);
Reading the data
To start reading your data:
*Start the data source:
 
dataSourceModel.start();
Starting the data source creates the necessary tiled layers, tile managers, and IlvRasterIcon instances to manage the pixel-on-demand feature and the progressive display of the geo-referenced image.
For further information, see:
*Raster data sources, for defense-specific data sources.
*Introducing the main classes and Creating a map application using the API for non defense-specific data sources, properties, tiling, and pixel-on-demand.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.