org.geolatte.geom.codec.Sfa121WkbDecoder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geolatte-geom Show documentation
Show all versions of geolatte-geom Show documentation
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.Geometry;
import org.geolatte.geom.Position;
import org.geolatte.geom.crs.CoordinateReferenceSystem;
/**
* A WKB decoder for the format specified in Simple Feature Access, version 1.2.1
*/
public class Sfa121WkbDecoder implements WkbDecoder {
@Override
public Geometry
decode(ByteBuffer byteBuffer, CoordinateReferenceSystem
crs) {
BaseWkbParser
parser = new BaseWkbParser<>(Sfa121WkbDialect.INSTANCE, byteBuffer, crs);
try {
return parser.parse();
} catch( WkbDecodeException e) {
throw e;
} catch (Throwable e) {
throw new WkbDecodeException(e);
}
}
}