org.deegree.cs.io.deegree
Class CRSExporter

java.lang.Object
  extended by org.deegree.cs.io.deegree.CRSExporterBase
      extended by org.deegree.cs.io.deegree.CRSExporter

public class CRSExporter
extends CRSExporterBase

Exports a list of coordinate systems into the deegree CRS format.

Version:
$Revision: 30120 $, $Date: 2011-03-22 10:04:15 +0100 (Tue, 22 Mar 2011) $
Author:
Rutger Bezema, last edited by: $Author: aschmitz $

Constructor Summary
CRSExporter()
           
CRSExporter(Properties properties)
           
 
Method Summary
protected  void endDocument(XMLStreamWriter xmlWriter)
          Write the /crs:defintions and the end document and flush the writer.
protected  void export(Helmert wgs84, XMLStreamWriter xmlWriter)
          Export the confInvo to it's appropriate deegree-crs-definitions form.
protected  void export(IAxis axis, String elName, XMLStreamWriter xmlWriter)
          Export an axis to xml in the crs-definitions schema layout.
protected  void export(ICompoundCRS compoundCRS, XMLStreamWriter xmlWriter)
          Export the compoundCRS to it's appropriate deegree-crs-definitions form.
protected  void export(IEllipsoid ellipsoid, XMLStreamWriter xmlWriter)
          Export the ellipsoid to it's appropriate deegree-crs-definitions form.
protected  void export(IGeocentricCRS geocentricCRS, XMLStreamWriter xmlWriter)
          Export the geocentric CRS to it's appropriate deegree-crs-definitions form.
protected  void export(IGeodeticDatum datum, XMLStreamWriter xmlWriter)
          Export the datum to it's appropriate deegree-crs-definitions form.
protected  void export(IGeographicCRS geoGraphicCRS, XMLStreamWriter xmlWriter)
          Export the geocentric/geographic CRS to it's appropriate deegree-crs-definitions form.
protected  void export(IPrimeMeridian pm, XMLStreamWriter xmlWriter)
          Export the PrimeMeridian to it's appropriate deegree-crs-definitions form.
protected  void export(IProjectedCRS projectedCRS, XMLStreamWriter xmlWriter)
          Export the projected CRS to it's appropriate deegree-crs-definitions form.
protected  void export(IProjection projection, XMLStreamWriter xmlWriter)
          Export the projection to it's appropriate deegree-crs-definitions form.
protected  void export(IUnit units, XMLStreamWriter xmlWriter)
          Export a unit to xml in the crs-definitions schema layout.
protected  void export(LeastSquareApproximation ls, XMLStreamWriter xmlWriter)
          Export the transformation to it's appropriate deegree-crs-definitions form.
 void export(List<ICRS> crsToExport, XMLStreamWriter xmlWriter)
          Export the given list of ICoordinateSystems into the crs-definition format.
protected  void export(NTv2Transformation ntv2, XMLStreamWriter xmlWriter)
          Export the NTv2 to it's appropriate deegree-crs-definitions form.
protected  void export(Transformation transformation, XMLStreamWriter xmlWriter)
          Exports the given transformation
protected  void exportAbstractCRS(ICRS crs, XMLStreamWriter xmlWriter)
          Export toplevel crs features.
protected  void exportCoordinateSystems(XMLStreamWriter xmlWriter, Set<ICompoundCRS> compounds, Set<IProjectedCRS> projecteds, Set<IGeographicCRS> geographics, Set<IGeocentricCRS> geocentrics)
          Exports the given sets of ICoordinateSystems
protected  void exportDatums(XMLStreamWriter xmlWriter, Set<IGeodeticDatum> datums)
          Exports the given set of Datums
protected  void exportEllipsoids(XMLStreamWriter xmlWriter, Set<IEllipsoid> ellipsoids)
          Exports the given set of ellipsoids
protected  void exportIdentifiable(CRSResource identifiable, XMLStreamWriter xmlWriter)
          Creates the basic nodes of the identifiable object.
protected  void exportPrimeMeridians(XMLStreamWriter xmlWriter, Set<IPrimeMeridian> pms)
          Exports the given set of PrimeMeridians
 void exportProjections(XMLStreamWriter xmlWriter, Set<IProjection> projections)
          Exports the given set of projections
protected  void exportTransformations(XMLStreamWriter xmlWriter, Set<Transformation> transformations)
          Exports the given set of transformations
protected  void initDocument(XMLStreamWriter xmlWriter)
          Open an XML document from stream for exporting
 
Methods inherited from class org.deegree.cs.io.deegree.CRSExporterBase
export, exportTransformations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRSExporter

public CRSExporter()

CRSExporter

public CRSExporter(Properties properties)
Parameters:
properties -
Method Detail

export

public void export(List<ICRS> crsToExport,
                   XMLStreamWriter xmlWriter)
            throws XMLStreamException
Export the given list of ICoordinateSystems into the crs-definition format.

Overrides:
export in class CRSExporterBase
Parameters:
crsToExport -
xmlWriter - to write the definitions to.
Throws:
XMLStreamException - if an error occurred while exporting

exportEllipsoids

protected void exportEllipsoids(XMLStreamWriter xmlWriter,
                                Set<IEllipsoid> ellipsoids)
                         throws XMLStreamException
Exports the given set of ellipsoids

Parameters:
xmlWriter -
ellipsoids -
Throws:
XMLStreamException

exportPrimeMeridians

protected void exportPrimeMeridians(XMLStreamWriter xmlWriter,
                                    Set<IPrimeMeridian> pms)
                             throws XMLStreamException
Exports the given set of PrimeMeridians

Parameters:
xmlWriter -
pms -
Throws:
XMLStreamException

exportDatums

protected void exportDatums(XMLStreamWriter xmlWriter,
                            Set<IGeodeticDatum> datums)
                     throws XMLStreamException
Exports the given set of Datums

Parameters:
xmlWriter -
datums -
Throws:
XMLStreamException

exportTransformations

protected void exportTransformations(XMLStreamWriter xmlWriter,
                                     Set<Transformation> transformations)
                              throws XMLStreamException
Exports the given set of transformations

Parameters:
xmlWriter -
transformations -
Throws:
XMLStreamException

exportProjections

public void exportProjections(XMLStreamWriter xmlWriter,
                              Set<IProjection> projections)
                       throws XMLStreamException
Exports the given set of projections

Parameters:
xmlWriter -
projections -
Throws:
XMLStreamException

exportCoordinateSystems

protected void exportCoordinateSystems(XMLStreamWriter xmlWriter,
                                       Set<ICompoundCRS> compounds,
                                       Set<IProjectedCRS> projecteds,
                                       Set<IGeographicCRS> geographics,
                                       Set<IGeocentricCRS> geocentrics)
                                throws XMLStreamException
Exports the given sets of ICoordinateSystems

Parameters:
xmlWriter -
compounds -
projecteds -
geographics -
geocentrics -
Throws:
XMLStreamException

initDocument

protected void initDocument(XMLStreamWriter xmlWriter)
Open an XML document from stream for exporting

Overrides:
initDocument in class CRSExporterBase
Parameters:
xmlWriter -

endDocument

protected void endDocument(XMLStreamWriter xmlWriter)
                    throws XMLStreamException
Write the /crs:defintions and the end document and flush the writer.

Overrides:
endDocument in class CRSExporterBase
Parameters:
xmlWriter -
Throws:
XMLStreamException

export

protected void export(Transformation transformation,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Exports the given transformation

Parameters:
transformation -
xmlWriter -
Throws:
XMLStreamException

export

protected void export(NTv2Transformation ntv2,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the NTv2 to it's appropriate deegree-crs-definitions form.

Parameters:
ntv2 - to be exported
xmlWriter - to export to.
Throws:
XMLStreamException

export

protected void export(Helmert wgs84,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the confInvo to it's appropriate deegree-crs-definitions form.

Overrides:
export in class CRSExporterBase
Parameters:
wgs84 - to be exported
xmlWriter - to export to.
Throws:
XMLStreamException

export

protected void export(LeastSquareApproximation ls,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the transformation to it's appropriate deegree-crs-definitions form.

Parameters:
ls - to be exported
xmlWriter - to export to.
Throws:
XMLStreamException

export

protected void export(IPrimeMeridian pm,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the PrimeMeridian to it's appropriate deegree-crs-definitions form.

Overrides:
export in class CRSExporterBase
Parameters:
pm - PrimeMeridian to be exported
xmlWriter - to export to.
Throws:
XMLStreamException

export

protected void export(ICompoundCRS compoundCRS,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the compoundCRS to it's appropriate deegree-crs-definitions form.

Overrides:
export in class CRSExporterBase
Parameters:
compoundCRS - to be exported
xmlWriter - to export the geographic CRS to.
Throws:
XMLStreamException

export

protected void export(IProjectedCRS projectedCRS,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the projected CRS to it's appropriate deegree-crs-definitions form.

Overrides:
export in class CRSExporterBase
Parameters:
projectedCRS - to be exported
xmlWriter - to export the projected CRS to.
Throws:
XMLStreamException

export

protected void export(IProjection projection,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the projection to it's appropriate deegree-crs-definitions form.

Overrides:
export in class CRSExporterBase
Parameters:
projection - to be exported
xmlWriter - to export the projection to.
Throws:
XMLStreamException

export

protected void export(IGeographicCRS geoGraphicCRS,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the geocentric/geographic CRS to it's appropriate deegree-crs-definitions form.

Overrides:
export in class CRSExporterBase
Parameters:
geoGraphicCRS - to be exported
xmlWriter - to export the geographic CRS to.
Throws:
XMLStreamException

export

protected void export(IGeocentricCRS geocentricCRS,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the geocentric CRS to it's appropriate deegree-crs-definitions form.

Overrides:
export in class CRSExporterBase
Parameters:
geocentricCRS - to be exported
xmlWriter - to export the geocentric CRS to.
Throws:
XMLStreamException

exportAbstractCRS

protected void exportAbstractCRS(ICRS crs,
                                 XMLStreamWriter xmlWriter)
                          throws XMLStreamException
Export toplevel crs features.

Overrides:
exportAbstractCRS in class CRSExporterBase
Parameters:
crs - to be exported
xmlWriter - to export to
Throws:
XMLStreamException

export

protected void export(IAxis axis,
                      String elName,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export an axis to xml in the crs-definitions schema layout.

Overrides:
export in class CRSExporterBase
Parameters:
axis - to be exported.
elName - the name of the element, either 'Axis' or 'heightAxis'
xmlWriter - to export to.
Throws:
XMLStreamException

export

protected void export(IUnit units,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export a unit to xml in the crs-definitions schema layout.

Overrides:
export in class CRSExporterBase
Parameters:
units - to be exported.
xmlWriter - to export to.
Throws:
XMLStreamException

export

protected void export(IGeodeticDatum datum,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the datum to it's appropriate deegree-crs-definitions form.

Overrides:
export in class CRSExporterBase
Parameters:
datum - to be exported
xmlWriter - to export the datum to.
Throws:
XMLStreamException

export

protected void export(IEllipsoid ellipsoid,
                      XMLStreamWriter xmlWriter)
               throws XMLStreamException
Export the ellipsoid to it's appropriate deegree-crs-definitions form.

Overrides:
export in class CRSExporterBase
Parameters:
ellipsoid - to be exported
xmlWriter - to export the ellipsoid to.
Throws:
XMLStreamException

exportIdentifiable

protected void exportIdentifiable(CRSResource identifiable,
                                  XMLStreamWriter xmlWriter)
                           throws XMLStreamException
Creates the basic nodes of the identifiable object.

Overrides:
exportIdentifiable in class CRSExporterBase
Parameters:
identifiable - object to be exported.
xmlWriter - to export to
Throws:
XMLStreamException


Copyright © 2011. All Rights Reserved.