public class SimplePolygonParser extends AbstractStreamingParser
--
.
Unparseable parts will be treated as labels.
Modifier and Type | Class and Description |
---|---|
static class |
SimplePolygonParser.Parameterizer
Parameterization class.
|
BundleStreamSource.Event
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
COORD
Pattern to catch coordinates
|
private java.util.List<double[]> |
coords
(Reused) storage of coordinates.
|
protected ExternalID |
cureid
Current external id.
|
protected LabelList |
curlbl
Current labels.
|
protected PolygonsObject |
curpoly
Current polygon.
|
protected boolean |
haslabels
Whether or not the data set has labels.
|
private java.util.ArrayList<java.lang.String> |
labels
(Reused) store for labels.
|
private static Logging |
LOG
Class logger
|
protected BundleMeta |
meta
Metadata.
|
(package private) BundleStreamSource.Event |
nextevent
Event to report next.
|
static java.lang.String |
POLYGON_SEPARATOR
Polygon separator
|
private java.util.List<Polygon> |
polys
(Reused) storage of polygons.
|
reader, tokenizer
Constructor and Description |
---|
SimplePolygonParser(CSVReaderFormat format)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
buildMeta()
Update the meta element.
|
java.lang.Object |
data(int rnum)
Access a particular object and representation.
|
protected Logging |
getLogger()
Get the logger for this class.
|
BundleMeta |
getMeta()
Get the current meta data.
|
BundleStreamSource.Event |
nextEvent()
Get the next event
|
private boolean |
parseLine()
Parse a single line.
|
asMultipleObjectsBundle, assignDBID, cleanup, hasDBIDs, initStream, parse
private static final Logging LOG
public static final java.util.regex.Pattern COORD
public static final java.lang.String POLYGON_SEPARATOR
BundleStreamSource.Event nextevent
protected BundleMeta meta
protected boolean haslabels
protected PolygonsObject curpoly
protected LabelList curlbl
protected ExternalID cureid
private final java.util.List<double[]> coords
private final java.util.List<Polygon> polys
private final java.util.ArrayList<java.lang.String> labels
public SimplePolygonParser(CSVReaderFormat format)
format
- Input formatpublic BundleStreamSource.Event nextEvent()
BundleStreamSource
protected void buildMeta()
public BundleMeta getMeta()
BundleStreamSource
public java.lang.Object data(int rnum)
BundleStreamSource
rnum
- Representation numberprivate boolean parseLine()
true
if the line was read successful.protected Logging getLogger()
AbstractStreamingParser
getLogger
in class AbstractStreamingParser
Copyright © 2019 ELKI Development Team. License information.