org.geotools.geometry.iso
Class PositionFactoryImpl

java.lang.Object
  extended by org.geotools.geometry.iso.PositionFactoryImpl
All Implemented Interfaces:
java.io.Serializable, Factory, org.opengis.geometry.PositionFactory

public class PositionFactoryImpl
extends java.lang.Object
implements java.io.Serializable, Factory, org.opengis.geometry.PositionFactory

Default implementation of PositionFactory that stores contents using double.

You should be aware of the following:

Author:
Jody Garnett
See Also:
Serialized Form

Constructor Summary
PositionFactoryImpl()
          This is just here so FactorySPI can find us.
PositionFactoryImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
           
PositionFactoryImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs, org.opengis.geometry.Precision precision)
           
PositionFactoryImpl(Hints hints)
          This is the constructor used by GeometryFactoryFinder when a user requests a new instance.
 
Method Summary
 org.opengis.geometry.DirectPosition createDirectPosition(double[] coords)
           
 PointArrayImpl createPointArray()
           
 DoublePointArray createPointArray(double[] array, int start, int end)
           
 org.opengis.geometry.coordinate.PointArray createPointArray(float[] array, int start, int end)
           
 org.opengis.geometry.coordinate.Position createPosition(org.opengis.geometry.coordinate.Position position)
           
 org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
           
 java.util.Map getImplementationHints()
          Report back to FactoryRegistry about our configuration.
 org.opengis.geometry.Precision getPrecision()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionFactoryImpl

public PositionFactoryImpl()
This is just here so FactorySPI can find us. We have set it up with a default (undocumented) configuration for testing!


PositionFactoryImpl

public PositionFactoryImpl(Hints hints)
This is the constructor used by GeometryFactoryFinder when a user requests a new instance. The provided hints *must* be provided: There is no default for these values - you must describe your data source for us if we are to make useful Geometry object for you.

Parameters:
hints - Hints (must include CRS and PRECISION)

PositionFactoryImpl

public PositionFactoryImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs)

PositionFactoryImpl

public PositionFactoryImpl(org.opengis.referencing.crs.CoordinateReferenceSystem crs,
                           org.opengis.geometry.Precision precision)
Method Detail

getImplementationHints

public java.util.Map getImplementationHints()
Report back to FactoryRegistry about our configuration.

FactoryRegistry will check to make sure that there are no duplicates created (so there will be only a "single" PositionFactory created with this configuration).

Specified by:
getImplementationHints in interface Factory
Returns:
The map of hints, or an empty map if none.

createDirectPosition

public org.opengis.geometry.DirectPosition createDirectPosition(double[] coords)
                                                         throws org.opengis.geometry.MismatchedDimensionException
Specified by:
createDirectPosition in interface org.opengis.geometry.PositionFactory
Throws:
org.opengis.geometry.MismatchedDimensionException

createPosition

public org.opengis.geometry.coordinate.Position createPosition(org.opengis.geometry.coordinate.Position position)
Specified by:
createPosition in interface org.opengis.geometry.PositionFactory

createPointArray

public PointArrayImpl createPointArray()
Specified by:
createPointArray in interface org.opengis.geometry.PositionFactory

createPointArray

public DoublePointArray createPointArray(double[] array,
                                         int start,
                                         int end)
Specified by:
createPointArray in interface org.opengis.geometry.PositionFactory

createPointArray

public org.opengis.geometry.coordinate.PointArray createPointArray(float[] array,
                                                                   int start,
                                                                   int end)
Specified by:
createPointArray in interface org.opengis.geometry.PositionFactory

getCoordinateReferenceSystem

public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
Specified by:
getCoordinateReferenceSystem in interface org.opengis.geometry.PositionFactory

getPrecision

public org.opengis.geometry.Precision getPrecision()
Specified by:
getPrecision in interface org.opengis.geometry.PositionFactory


Copyright © 1996-2010 Geotools. All Rights Reserved.