All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.geolatte.geom.codec.Sfa121WktDialect Maven / Gradle / Ivy

Go to download

This geoLatte-geom library offers a geometry model that conforms to the OGC Simple Features for SQL specification.

The newest version!
package org.geolatte.geom.codec;

import org.geolatte.geom.Geometry;

class Sfa121WktDialect extends WktDialect{

    final static Sfa121WktDialect INSTANCE = new Sfa121WktDialect();

    @Override
    void addGeometryZMMarker(StringBuilder buffer, Geometry geometry) {
        if (!(geometry.hasZ() || geometry.hasM())) return;

        if (geometry.hasZ() && geometry.hasM())  buffer.append(" ZM");
        else if (geometry.hasZ()) buffer.append(" Z");
        else if (geometry.hasM()) buffer.append(" M");

        if(!geometry.isEmpty())
            buffer.append(' ');
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy