Classes for rendering the MapInfo Interchange File format

Since the MIF file can contain rendering information, the JViews Maps package provides classes to use this rendering information directly. This includes a ready-to-use IlvFeatureRenderer suitable to render geometries found in the MIF file and a factory to create IlvMapLineRenderingStyle.
In addition to these rendering classes, the JViews Maps package also provides a set of specific IlvGraphic objects to display the MID/MIF geometries. These IlvGraphic objects are needed by the MID/MIF specifications but can also be used outside a MID/MIF context.

The IlvMIFFeatureRenderer Class

This class is a subclass of the IlvDefaultFeatureRenderer that dispatches on the appropriate renderer with the rendering styles found in the MIF file. This is the IlvFeatureRenderer returned by the getDefaultFeatureRenderer method of the IlvMIFReader class. The rendering styles found in the MIF file are attached to the IlvMapFeature as properties by the reader and interpreted in the renderer.

The IlvMIFPenFactory Class

This class is a factory to create an IlvMapLineRenderingStyle by specifying a MID/MIF pattern identifier.

The IlvMIFCoordinateSystemFactory Class

This class is a factory to translate a MID/MIF coordinate system into a Maps coordinate system.

Specialized Graphics

The IlvGraphic objects needed to render MID/MIF geometries include the following classes:
  • IlvDecoratedPath: A general path supporting decorations. A decoration is a drawing that follows the path of the graphic. These decorations can be clipped against the clip region of the java.awt.Graphics to provide high performance drawing.
  • IlvMapLabel: A label able to display multiline text. This label supports interline spacing.
  • IlvFontMarkerA graphic object able to display a character of a given font as the marker point. This object is usually used with a symbol font that provides cartographic symbology.

Coordinate System Support

Along with objects and attribute information, MIF files also contain information on the coordinate system used to store the graphic objects of a defined file.
The possible coordinate systems in MID/MIF are:
  • Earth: a coordinate system where coordinates are expressed within a projected coordinate system. See List of Supported MID/MIF Projections for the list of supported projections.
  • NonEarth: a coordinate system where coordinates are expressed in a specified unit. When such a file is encountered, the coordinate system is set to null , and the getUnit method returns the unit defined in the file.
  • Layout: a coordinate system corresponding to coordinates on a sheet of paper. When such a file is encountered, the coordinate system is set to null , and the getUnit method returns the unit defined in the file.
  • Table: a coordinate system corresponding to an open table in MapInfo. This coordinate system is not supported in the JViews Maps package.
  • Window: a coordinate system corresponding to an open window in MapInfo. This coordinate system is not supported in the JViews Maps package.
The JViews Maps package fully supports projected coordinates defined in a MID/MIF file. The supported projections are listed in List of Supported MID/MIF Projections:
List of Supported MID/MIF Projections
MID/MIF Projection Number
Name
Corresponding Projection
9
Albers Equal-Area Conic
IlvAlbersEqualAreaProjection
5
Azimuthal Equidistant
IlvAzimuthalEquidistantProjection
2
Cylindrical Equal Area
IlvCylindricalEqualAreaProjection
14
Eckert IV
IlvEckert4Projection
15
Eckert VI
IlvEckert6Projection
17
Gall
IlvMercatorProjection
7
Hotine Oblique Mercator
IlvObliqueMercatorProjection
4
Lambert Azimuthal Equal Area
IlvLambertAzimuthalEqualAreaProjection
3
Lambert Conformal Conic
IlvLambertConformalConicProjection
19
Lambert Conformal Conic
(modified for Belgium 1972)
IlvLambertConformalConicProjection
1
Longitude/Latitude
Not a projection. An IlvGeographicCoordinateSystem is used.
10
Mercator
IlvMercatorProjection
11
Miller Cylindrical
IlvMillerCylindrical Projection
13
Mollweide
IlvMollweideProjection
27
Polyconic
IlvPolyconicProjection
12
Robinson
IlvRobinsonProjection
16
Sinusoidal
IlvSinusoidalProjection
20
Stereographic
IlvStereographicProjection
8
Transverse Mercator
IlvTransverseMercatorProjection
JViews Maps supports all ellipsoids and nearly all datums from MapInfo (see the MID/MIF file format specification for the full list of ellipsoids and datums).
Note
The MIF format specification allows user datum definition, with either 3 or 7 parameters. As the JViews Maps package does not support 7-parameter datum yet, definitions of 7- parameter datum is decoded as 3-parameter datum, skipping the rotations and scale part of datum definitions.