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

org.geolatte.geom.codec.Sfa110WkbDialect 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.ByteBuffer;
import org.geolatte.geom.ByteOrder;
import org.geolatte.geom.Geometry;
import org.geolatte.geom.Position;

class Sfa110WkbDialect extends WkbDialect {

    public final static Sfa110WkbDialect INSTANCE = new Sfa110WkbDialect();

    protected Sfa110WkbDialect() {

    }

    protected 

int getPositionSize(Geometry

geom) { return 2 * ByteBuffer.DOUBLE_SIZE; } @Override

BaseWkbVisitor

mkVisitor(Geometry

geom, ByteOrder bo) { ByteBuffer buffer = mkByteBuffer(geom, bo); return new SFA110WkbVisitor<>(buffer, this); } } class SFA110WkbVisitor

extends BaseWkbVisitor

{ SFA110WkbVisitor(ByteBuffer byteBuffer, WkbDialect dialect) { super(byteBuffer, dialect); } @Override protected void writePoint(double[] coordinates, ByteBuffer output) { output.putDouble(coordinates[0]); output.putDouble(coordinates[1]); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy