org.geotools.data.pickle
Class GeometryPickler

java.lang.Object
  extended byorg.geotools.data.pickle.GeometryPickler

public final class GeometryPickler
extends java.lang.Object

The GeometryPickler provides a more efficent serialization of JTS Geometry subclasses.
There is no preservation of PrecisionModel or srid.

 Records for coordinates are:
   short length
   double (x,y,z)*

 Records for non collections are unless otherwise specified:
   byte type
   coordinates
 
 Records for collections are
   byte type
   geometry*

 Record for Point is
   byte POINT
   double (x,y,z)*

 Record for Polygon is
   byte POLY
   short number of interior rings
   linestring+ (outer + interior)
 

Author:
Ian Schneider

Constructor Summary
GeometryPickler()
           
 
Method Summary
 com.vividsolutions.jts.geom.Geometry read(java.io.ObjectInputStream in)
           
 void write(com.vividsolutions.jts.geom.Geometry g, java.io.ObjectOutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryPickler

public GeometryPickler()
Method Detail

write

public void write(com.vividsolutions.jts.geom.Geometry g,
                  java.io.ObjectOutputStream out)
           throws java.io.IOException
Throws:
java.io.IOException

read

public com.vividsolutions.jts.geom.Geometry read(java.io.ObjectInputStream in)
                                          throws java.io.IOException
Throws:
java.io.IOException


Copyright © GeoTools. All Rights Reserved.