Xj3D 2.0 VRML/X3D Code API

org.web3d.vrml.renderer.common.geospatial
Class GTTransformUtils

java.lang.Object
  extended by org.web3d.vrml.renderer.common.geospatial.GTTransformUtils

public class GTTransformUtils
extends java.lang.Object

Utility class to create a GeoTools2 transformation class for a given geoSystem field definition.

This class runs as a singleton to allow for caching of internal fetched transformation routines.

Version:
$Revision: 1.11 $
Author:
Justin Couch

Method Summary
 org.opengis.referencing.operation.MathTransform createSystemTransform(java.lang.String[] systemDef, boolean[] coordSwap)
          From the given system definition strings, generate a coordinate transformation service.
static GTTransformUtils getInstance()
          Fetch the singleton instance of the factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static GTTransformUtils getInstance()
                                    throws org.opengis.referencing.FactoryException
Fetch the singleton instance of the factory. If needed, a new instance will be created.

Returns:
The shared singleton instance of this class
Throws:
org.opengis.referencing.FactoryException - There was a problem creating the class

createSystemTransform

public org.opengis.referencing.operation.MathTransform createSystemTransform(java.lang.String[] systemDef,
                                                                             boolean[] coordSwap)
                                                                      throws org.opengis.referencing.FactoryException
From the given system definition strings, generate a coordinate transformation service.

Check whether we need to reverse the two primary coordinate systems. If true, then the user needs to swap the coordinate values for X and Y.

Parameters:
systemDef - The X3D system definition string
coordSwap - an array of length 1 for returning the primary coordinate swap flag
Returns:
A transform for taking geo coordinates to cartesian
Throws:
org.opengis.referencing.FactoryException

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium