deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

org.deegree.gml.geometry
Class GML3GeometryWriter

java.lang.Object
  extended by org.deegree.gml.geometry.GML3GeometryWriter
All Implemented Interfaces:
GMLGeometryWriter

public class GML3GeometryWriter
extends Object
implements GMLGeometryWriter

Generates GML 3 (3.0/3.1/3.2) representations from Geometry objects.

This class is not thread-safe.

Version:
$Revision: $, $Date: $
Author:
Andrei Ionita, Markus Schneider, last edited by: $Author: ionita $

Constructor Summary
GML3GeometryWriter(GMLVersion version, XMLStreamWriter writer)
          Creates a new GML3GeometryWriter instance, with no default crs, the default formatter and no simple feature support.
GML3GeometryWriter(GMLVersion version, XMLStreamWriter writer, CRS outputCrs, CoordinateFormatter formatter, boolean exportSf, Set<String> exportedIds)
          Creates a new GML3GeometryWriter instance.
 
Method Summary
 void export(Geometry geometry)
          Exporting a geometry via the XMLStreamWriter given when the class was constructed
 void exportCompositeCurve(CompositeCurve compositeCurve)
          Exporting a composite curve via the XMLStreamWriter given when the class was constructed
 void exportCompositeGeometry(CompositeGeometry<GeometricPrimitive> geometryComplex)
          Exporting a composite geometry via the XMLStreamWriter given when the class was constructed
 void exportCompositeSolid(CompositeSolid compositeSolid)
          Exporting a composite solid via the XMLStreamWriter given when the class was constructed
 void exportCompositeSurface(CompositeSurface compositeSurface)
          Exporting a composite surface via the XMLStreamWriter given when the class was constructed
 void exportCurve(Curve curve)
          Exporting a curve via the XMLStreamWriter given when the class was constructed
protected  void exportCurveSegment(CurveSegment curveSeg)
          Exporting a curve segment via the XMLStreamWriter given when the class was constructed
 void exportEnvelope(Envelope envelope)
          Exporting an Envelope via the XMLStreamWriter given when the class was constructed
 void exportMultiGeometry(MultiGeometry<? extends Geometry> geometry)
          Exporting a multi-geometry via the XMLStreamWriter given when the class was constructed
 void exportPoint(Point point)
          Exporting a point via the XMLStreamWriter given when the class was constructed
 void exportReference(GeometryReference<Geometry> geometryRef)
           
 void exportRing(Ring ring)
          Exporting a ring via the XMLStreamWriter given when the class was constructed
 void exportSolid(Solid solid)
          Exporting a solid via the XMLStreamWriter given when the class was constructed
 void exportSurface(Surface surface)
          Exporting a surface via the XMLStreamWriter given when the class was constructed
protected  void exportSurfacePatch(SurfacePatch surfacePatch)
          Exporting a SurfacePatch via the XMLStreamWriter given when the class was constructed
 void exportTin(Tin tin)
          Exporting a tin via the XMLStreamWriter given when the class was constructed
 void exportTriangulatedSurface(TriangulatedSurface triangSurface)
          Exporting a triangulated surface via the XMLStreamWriter given when the class was constructed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GML3GeometryWriter

public GML3GeometryWriter(GMLVersion version,
                          XMLStreamWriter writer)
Creates a new GML3GeometryWriter instance, with no default crs, the default formatter and no simple feature support.

Parameters:
version - either GMLVersion.GML_30, GMLVersion.GML_31 or GMLVersion.GML_32
writer - the XMLStreamWriter that is used to serialize the GML, must not be null

GML3GeometryWriter

public GML3GeometryWriter(GMLVersion version,
                          XMLStreamWriter writer,
                          CRS outputCrs,
                          CoordinateFormatter formatter,
                          boolean exportSf,
                          Set<String> exportedIds)
Creates a new GML3GeometryWriter instance.

Parameters:
version - either GMLVersion.GML_30, GMLVersion.GML_31 or GMLVersion.GML_32
writer - the XMLStreamWriter that is used to serialize the GML, must not be null
outputCrs - crs used for exported geometries, may be null (in that case, the crs of the geometries is used)
formatter - formatter to use for exporting coordinates, e.g. to limit the number of decimal places, may be null (use 5 decimal places)
exportSf - if true, the generated GML must to conform to the GML-SF profile (only simple geometries are used and they are exported without id attributes)
exportedIds - for the creation of xlinks, may be null
Method Detail

export

public void export(Geometry geometry)
            throws XMLStreamException,
                   UnknownCRSException,
                   TransformationException
Exporting a geometry via the XMLStreamWriter given when the class was constructed

Specified by:
export in interface GMLGeometryWriter
Parameters:
geometry - the Geometry to be exported
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportReference

public void exportReference(GeometryReference<Geometry> geometryRef)
                     throws XMLStreamException,
                            UnknownCRSException,
                            TransformationException
Specified by:
exportReference in interface GMLGeometryWriter
Throws:
XMLStreamException
UnknownCRSException
TransformationException

exportMultiGeometry

public void exportMultiGeometry(MultiGeometry<? extends Geometry> geometry)
                         throws XMLStreamException,
                                UnknownCRSException,
                                TransformationException
Exporting a multi-geometry via the XMLStreamWriter given when the class was constructed

Specified by:
exportMultiGeometry in interface GMLGeometryWriter
Parameters:
geometry - a MultiGeometry object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportPoint

public void exportPoint(Point point)
                 throws XMLStreamException,
                        UnknownCRSException,
                        TransformationException
Exporting a point via the XMLStreamWriter given when the class was constructed

Specified by:
exportPoint in interface GMLGeometryWriter
Parameters:
point - a Point object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportCurve

public void exportCurve(Curve curve)
                 throws XMLStreamException,
                        UnknownCRSException,
                        TransformationException
Exporting a curve via the XMLStreamWriter given when the class was constructed

Specified by:
exportCurve in interface GMLGeometryWriter
Parameters:
curve - a Curve object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportSurface

public void exportSurface(Surface surface)
                   throws XMLStreamException,
                          UnknownCRSException,
                          TransformationException
Exporting a surface via the XMLStreamWriter given when the class was constructed

Specified by:
exportSurface in interface GMLGeometryWriter
Parameters:
surface - a Surface object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportTriangulatedSurface

public void exportTriangulatedSurface(TriangulatedSurface triangSurface)
                               throws XMLStreamException,
                                      UnknownCRSException,
                                      TransformationException
Exporting a triangulated surface via the XMLStreamWriter given when the class was constructed

Specified by:
exportTriangulatedSurface in interface GMLGeometryWriter
Parameters:
triangSurface - a TriangulatedSurface object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportTin

public void exportTin(Tin tin)
               throws XMLStreamException,
                      UnknownCRSException,
                      TransformationException
Exporting a tin via the XMLStreamWriter given when the class was constructed

Specified by:
exportTin in interface GMLGeometryWriter
Parameters:
tin - a Tin object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportSolid

public void exportSolid(Solid solid)
                 throws XMLStreamException,
                        UnknownCRSException,
                        TransformationException
Exporting a solid via the XMLStreamWriter given when the class was constructed

Specified by:
exportSolid in interface GMLGeometryWriter
Parameters:
solid - a Solid object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportRing

public void exportRing(Ring ring)
                throws XMLStreamException,
                       UnknownCRSException,
                       TransformationException
Exporting a ring via the XMLStreamWriter given when the class was constructed

Specified by:
exportRing in interface GMLGeometryWriter
Parameters:
ring - a Ring object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportCompositeCurve

public void exportCompositeCurve(CompositeCurve compositeCurve)
                          throws XMLStreamException,
                                 UnknownCRSException,
                                 TransformationException
Exporting a composite curve via the XMLStreamWriter given when the class was constructed

Specified by:
exportCompositeCurve in interface GMLGeometryWriter
Parameters:
compositeCurve - the CompositeCurve object
Throws:
XMLStreamException
XMLStreamException - if an error occured writing to the xml stream
TransformationException
UnknownCRSException
UnknownCRSException
TransformationException

exportCompositeSurface

public void exportCompositeSurface(CompositeSurface compositeSurface)
                            throws XMLStreamException,
                                   UnknownCRSException,
                                   TransformationException
Exporting a composite surface via the XMLStreamWriter given when the class was constructed

Specified by:
exportCompositeSurface in interface GMLGeometryWriter
Parameters:
compositeSurface - the CompositeSurface object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportCompositeSolid

public void exportCompositeSolid(CompositeSolid compositeSolid)
                          throws XMLStreamException,
                                 UnknownCRSException,
                                 TransformationException
Exporting a composite solid via the XMLStreamWriter given when the class was constructed

Specified by:
exportCompositeSolid in interface GMLGeometryWriter
Parameters:
compositeSolid - the CompositeSolid object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportEnvelope

public void exportEnvelope(Envelope envelope)
                    throws XMLStreamException,
                           UnknownCRSException,
                           TransformationException
Exporting an Envelope via the XMLStreamWriter given when the class was constructed

Specified by:
exportEnvelope in interface GMLGeometryWriter
Parameters:
envelope - the envelope object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportSurfacePatch

protected void exportSurfacePatch(SurfacePatch surfacePatch)
                           throws XMLStreamException,
                                  UnknownCRSException,
                                  TransformationException
Exporting a SurfacePatch via the XMLStreamWriter given when the class was constructed

Parameters:
surfacePatch - a surface patch object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportCompositeGeometry

public void exportCompositeGeometry(CompositeGeometry<GeometricPrimitive> geometryComplex)
                             throws XMLStreamException,
                                    UnknownCRSException,
                                    TransformationException
Exporting a composite geometry via the XMLStreamWriter given when the class was constructed

Specified by:
exportCompositeGeometry in interface GMLGeometryWriter
Parameters:
geometryComplex - the CompositeGeometry object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

exportCurveSegment

protected void exportCurveSegment(CurveSegment curveSeg)
                           throws XMLStreamException,
                                  UnknownCRSException,
                                  TransformationException
Exporting a curve segment via the XMLStreamWriter given when the class was constructed

Parameters:
curveSeg - a CurveSegment object
Throws:
XMLStreamException - if an error occured writing to the xml stream
UnknownCRSException
TransformationException

deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org

]]>