org.geotools.data.geomedia.attributeio
Class GeoMediaGeometryAdapter

java.lang.Object
  extended byorg.geotools.data.geomedia.attributeio.GeoMediaGeometryAdapter

public class GeoMediaGeometryAdapter
extends java.lang.Object

Title: GeoTools2 Development

Description:

Copyright: Copyright (c) 2003

Company:

Converts geometry objects between JTS geometry types and GeoMedia GDO serlaized geometry blobs. The following tables describe the mappings:

Version:
1.0
Author:
Julian J. Ray
To Do:
Add interior polygons to Polygon constructor, Add support multi-polygon types, Add support for GeoMedia Arcs

Constructor Summary
GeoMediaGeometryAdapter()
          Creates a new GeoMediaGeometryAdapter object.
 
Method Summary
 com.vividsolutions.jts.geom.Geometry deSerialize(byte[] input)
          Converts GeoMedia blobs to JTS geometry types.
 byte[] serialize(com.vividsolutions.jts.geom.Geometry input)
          Converts a JTS geometry to a GeoMedia geometry blob which can be stored in a geomedia spatial database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoMediaGeometryAdapter

public GeoMediaGeometryAdapter()
Creates a new GeoMediaGeometryAdapter object.

Method Detail

deSerialize

public com.vividsolutions.jts.geom.Geometry deSerialize(byte[] input)
                                                 throws java.io.IOException,
                                                        GeoMediaGeometryTypeNotKnownException,
                                                        GeoMediaUnsupportedGeometryTypeException
Converts GeoMedia blobs to JTS geometry types. Performs endian-conversion on data contained in the blob.

Parameters:
input - GeoMedia geometry blob read from geomedia spatial database.
Returns:
JTS Geometry
Throws:
java.io.IOException
GeoMediaGeometryTypeNotKnownException
GeoMediaUnsupportedGeometryTypeException

serialize

public byte[] serialize(com.vividsolutions.jts.geom.Geometry input)
                 throws java.io.IOException,
                        GeoMediaUnsupportedGeometryTypeException
Converts a JTS geometry to a GeoMedia geometry blob which can be stored in a geomedia spatial database.

Parameters:
input - JTS Geometry
Returns:
byte[] GeoMedia blob format
Throws:
java.io.IOException
GeoMediaUnsupportedGeometryTypeException
To Do:
Figure out how to write the GDO_BOUNDS_XHI etc. bounding box for SQL Server data stores


Copyright © GeoTools. All Rights Reserved.