use of com.revolsys.record.io.format.saif.geometry.TextOnCurve in project com.revolsys.open by revolsys.
the class TextOnCurveConverter method read.
@Override
public Object read(final OsnIterator iterator) {
final List<Point> points = new ArrayList<>();
String fieldName = iterator.nextFieldName();
while (fieldName != null) {
if (fieldName.equals("characters")) {
while (iterator.next() != OsnIterator.END_LIST) {
final String objectName = iterator.nextObjectName();
final OsnConverter osnConverter = this.converters.getConverter(objectName);
if (osnConverter == null) {
iterator.throwParseError("No Geometry Converter for " + objectName);
}
points.add((TextLinePoint) osnConverter.read(iterator));
}
}
fieldName = iterator.nextFieldName();
}
final Geometry geometry = new TextOnCurve(this.geometryFactory, points);
return geometry;
}
Aggregations