private class BC_MIFFile.Writer extends Object implements org.geotools.data.FeatureWriter
MIF FeatureWriter
Modifier and Type | Field and Description |
---|---|
private org.geotools.feature.Feature |
editFeature |
private BC_MIFValueSetter[] |
fieldValueSetters |
private org.geotools.data.FeatureReader |
innerReader |
private org.geotools.feature.Feature |
originalFeature |
private PrintStream |
outMid |
private PrintStream |
outMif |
Modifier | Constructor and Description |
---|---|
private |
Writer(PrintStream mif,
PrintStream mid,
boolean append) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
private String |
exportCoord(com.vividsolutions.jts.geom.Coordinate coord)
Renders a single coordinate
|
private String |
exportCoords(com.vividsolutions.jts.geom.Coordinate[] coords,
boolean skipLast)
Renders a coordinate list, prefixing it with the number of points
SkipLast is used for Polygons (in Mapinfo the last vertex of a
polygon is not the clone of first one)
|
private String |
exportGeometry(com.vividsolutions.jts.geom.Geometry geom) |
protected void |
finalize() |
org.geotools.feature.FeatureType |
getFeatureType() |
boolean |
hasNext() |
org.geotools.feature.Feature |
next() |
void |
remove() |
void |
write() |
void |
writeFeature(org.geotools.feature.Feature f)
Writes the given Feature to file
|
private PrintStream outMif
private PrintStream outMid
private org.geotools.data.FeatureReader innerReader
private BC_MIFValueSetter[] fieldValueSetters
private org.geotools.feature.Feature editFeature
private org.geotools.feature.Feature originalFeature
private Writer(PrintStream mif, PrintStream mid, boolean append) throws IOException
IOException
public org.geotools.feature.FeatureType getFeatureType()
getFeatureType
in interface org.geotools.data.FeatureWriter
public org.geotools.feature.Feature next() throws IOException
next
in interface org.geotools.data.FeatureWriter
IOException
public void remove() throws IOException
remove
in interface org.geotools.data.FeatureWriter
IOException
public void write() throws IOException
write
in interface org.geotools.data.FeatureWriter
IOException
public boolean hasNext() throws IOException
hasNext
in interface org.geotools.data.FeatureWriter
IOException
public void close() throws IOException
close
in interface org.geotools.data.FeatureWriter
IOException
protected void finalize() throws Throwable
public void writeFeature(org.geotools.feature.Feature f) throws IOException, org.geotools.feature.SchemaException
f
- The feature to writeIOException
- if cannot access file for readingorg.geotools.feature.SchemaException
- if given Feature is not compatible with MIFFile
FeatureType. TODO: privateprivate String exportGeometry(com.vividsolutions.jts.geom.Geometry geom)
private String exportCoord(com.vividsolutions.jts.geom.Coordinate coord)
coord
- The Coordinate objectprivate String exportCoords(com.vividsolutions.jts.geom.Coordinate[] coords, boolean skipLast)
coords
- The coordinates to renderskipLast
- if true, a polygon coordinate list will be renderedCopyright © 2017 BitCtrl Systems GmbH. All rights reserved.