Search in sources :

Example 1 with OrientedArcLineString

use of com.revolsys.record.io.format.saif.geometry.OrientedArcLineString in project com.revolsys.open by revolsys.

the class OrientedArcConverter method write.

@Override
public void write(final OsnSerializer serializer, final Object object) throws IOException {
    if (object instanceof LineString) {
        final LineString line = (LineString) object;
        serializer.startObject(GEOMETRY_CLASS);
        serializer.fieldName("arc");
        super.write(serializer, object, false);
        serializer.endAttribute();
        if (line instanceof ArcLineString) {
            super.writeAttributes(serializer, (ArcLineString) line);
        }
        if (line instanceof OrientedArcLineString) {
            final OrientedArcLineString orientedLine = (OrientedArcLineString) line;
            final String traversalDirection = orientedLine.getTraversalDirection();
            attributeEnum(serializer, "traversalDirection", traversalDirection);
        }
        serializer.endObject();
    }
}
Also used : OrientedArcLineString(com.revolsys.record.io.format.saif.geometry.OrientedArcLineString) ArcLineString(com.revolsys.record.io.format.saif.geometry.ArcLineString) OrientedArcLineString(com.revolsys.record.io.format.saif.geometry.OrientedArcLineString) LineString(com.revolsys.geometry.model.LineString) ArcLineString(com.revolsys.record.io.format.saif.geometry.ArcLineString) OrientedArcLineString(com.revolsys.record.io.format.saif.geometry.OrientedArcLineString) ArcLineString(com.revolsys.record.io.format.saif.geometry.ArcLineString) OrientedArcLineString(com.revolsys.record.io.format.saif.geometry.OrientedArcLineString) LineString(com.revolsys.geometry.model.LineString)

Aggregations

LineString (com.revolsys.geometry.model.LineString)1 ArcLineString (com.revolsys.record.io.format.saif.geometry.ArcLineString)1 OrientedArcLineString (com.revolsys.record.io.format.saif.geometry.OrientedArcLineString)1