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

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

class MySqlWkbDialect extends Sfa110WkbDialect {
    final public static WkbDialect INSTANCE = new MySqlWkbDialect();

    @Override
    protected 

int extraHeaderSize(Geometry

geom) { return 4; } @Override protected

int sizeEmptyGeometry(Geometry

geometry) { return ByteBuffer.UINT_SIZE; } private

boolean hasEmpty(Geometry

geometry) { if (geometry.isEmpty()) { return true; } if (geometry instanceof AbstractGeometryCollection) { for (Geometry

part : (AbstractGeometryCollection) geometry) { if (hasEmpty(part)) return true; } } return false; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy