public class IlvMIFReader extends Object implements IlvMapFeatureIterator
IlvMIFReader
reads geometries from a
MapInfo® Interchange file.
.mif
file of a MID/MIF file contains the attribute
field definition, the positioning information, the geometries and rendering
parameters of a MapInfo® Interchange file.
IlvMIFFeatureRenderer
can take advantage of these properties
to perform the proper rendering.IlvMIDMIFReader
,
IlvMIFFeatureRenderer
Modifier and Type | Field and Description |
---|---|
static String |
BRUSH_STYLE_NAME
The name of the map feature property to specify a brush style.
|
static String |
PEN_STYLE_NAME
The name of the map feature property to specify a pen style.
|
static String |
SYMBOL_STYLE_NAME
The name of the map feature property to specify a symbol style.
|
static String |
TEXT_STYLE_NAME
The name of the map feature property to specify a text style.
|
Constructor and Description |
---|
IlvMIFReader(Reader reader)
Constructs a new
IlvMIFReader to read from the
specified reader. |
IlvMIFReader(String fileName)
Constructs a new
IlvMIFReader to read from the file
which name is specified. |
IlvMIFReader(URL url)
Constructs a new
IlvMIFReader to read from the file
which URL is specified. |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Releases the resources allocated to the reader.
|
IlvAttributeInfoProperty |
getAttributeInfo()
Returns information about the attribute values.
|
String |
getCharset()
Returns a string indicating the character set used to encode strings
of this MIF/MID file.
|
IlvCoordinateSystem |
getCoordinateSystem()
Returns the spatial reference system that describes the coordinate
system of geometric coordinates of the map features.
|
IlvMIFCoordinateSystemFactory |
getCoordinateSystemFactory()
Returns the factory used to create
IlvProjection from
MID/MIF files |
IlvFeatureRenderer |
getDefaultFeatureRenderer()
Returns the default renderer used to display the map features returned
by the reader.
|
char |
getDelimiter()
Returns the character used as separator
in the MID file associated to this MIF file.
|
int |
getFileVersion()
Returns the MID/MIF file version of this file.
|
String |
getJavaCharset()
Returns a string indicating the charset used to encode strings of this
MIF file.
|
IlvCoordinate |
getLowerRightCorner()
Returns the lower-right corner of the bounding box that delimits the
objects read from the file.
|
IlvMapFeature |
getNextFeature()
Returns the next feature read from file.
|
IlvMIFPenFactory |
getPenFactory()
Returns the factory used to create
IlvMapLineRenderingStyle
associated to pen styles from the read MIF features. |
static boolean |
getTextCompatibility()
Tells if the reader is in backward compatibility mode.
|
int[] |
getUniqueList()
Returns a array of integer indexes referring to the MID file columns
associated to this MIF file.
|
IlvUnit |
getUnit()
Returns the
IlvUnit describing the unit of the
coordinates of the IlvMapFeature returned by this feature
iterator. |
IlvCoordinate |
getUpperLeftCorner()
Returns the upper-left corner of the bounding box that delimits the
objects read from the file.
|
boolean |
isGeoreferenced()
Returns
true if this feature iterator is georeferenced. |
void |
setCoordinateSystemFactory(IlvMIFCoordinateSystemFactory factory)
Sets the factory used to create
IlvCoordinateSystem from
MID/MIF coordinate system specifications. |
void |
setPenFactory(IlvMIFPenFactory factory)
Sets the factory used to create
IlvMapLineRenderingStyle
from pen styles of MIF features. |
static void |
setTextCompatibility(boolean compat)
Ensure backward text mode compatibility.
|
public static final String PEN_STYLE_NAME
public static final String BRUSH_STYLE_NAME
public static final String TEXT_STYLE_NAME
public static final String SYMBOL_STYLE_NAME
public IlvMIFReader(String fileName) throws IOException, IlvMapFormatException
IlvMIFReader
to read from the file
which name is specified.fileName
- The name of the .mif
file to read.IOException
- if an I/O error occurs.IlvMapFormatException
- if the file is not in the MID/MIF format.public IlvMIFReader(URL url) throws IOException, IlvMapFormatException
IlvMIFReader
to read from the file
which URL is specified.url
- The name of the .mif
URL to read.IOException
- if an I/O error occurs.IlvMapFormatException
- if the file is not in the MID/MIF format.public IlvMIFReader(Reader reader) throws IOException, IlvMapFormatException
IlvMIFReader
to read from the
specified reader.reader
- The java.io.Reader
to read from.IOException
- if an I/O error occurs.IlvMapFormatException
- if the file is not in the MID/MIF format.public static void setTextCompatibility(boolean compat)
compat
- The compatibility mode.public static boolean getTextCompatibility()
public IlvMIFPenFactory getPenFactory()
IlvMapLineRenderingStyle
associated to pen styles from the read MIF features.IlvMIFPenFactory
public void setPenFactory(IlvMIFPenFactory factory)
IlvMapLineRenderingStyle
from pen styles of MIF features.factory
- The pen factory.public IlvMIFCoordinateSystemFactory getCoordinateSystemFactory()
IlvProjection
from
MID/MIF filesIlvMIFCoordinateSystemFactory
public void setCoordinateSystemFactory(IlvMIFCoordinateSystemFactory factory)
IlvCoordinateSystem
from
MID/MIF coordinate system specifications.public IlvMapFeature getNextFeature() throws IOException, IlvMapFormatException
getNextFeature
in interface IlvMapFeatureIterator
IOException
- if an error occurs while reading the file.IlvMapFormatException
- if the file contains a format error.public void dispose()
dispose
in interface IlvMapFeatureIterator
public IlvCoordinate getUpperLeftCorner()
getUpperLeftCorner
in interface IlvMapFeatureIterator
public IlvCoordinate getLowerRightCorner()
getLowerRightCorner
in interface IlvMapFeatureIterator
public IlvFeatureRenderer getDefaultFeatureRenderer()
IlvMIFFeatureRenderer
getDefaultFeatureRenderer
in interface IlvMapFeatureIterator
IlvMIFFeatureRenderer
public IlvCoordinateSystem getCoordinateSystem()
getCoordinateSystem
in interface IlvMapFeatureIterator
null
if the coordinate system is unknown.public boolean isGeoreferenced()
true
if this feature iterator is georeferenced.isGeoreferenced
in interface IlvMapFeatureIterator
public int getFileVersion()
public String getCharset()
public String getJavaCharset()
java.lang.String
. The possible values are:
null
: This value is returned when the reader does
not know how to convert the charset of the file to a Java encoding.
public char getDelimiter()
public int[] getUniqueList()
null
if no unique list has been defined.public IlvUnit getUnit()
IlvUnit
describing the unit of the
coordinates of the IlvMapFeature
returned by this feature
iterator.
IlvUnitConverter
or null
if none
defined.public IlvAttributeInfoProperty getAttributeInfo()
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.