|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.factory.AbstractFactory org.geotools.coverage.grid.GridCoverageFactory
A factory for grid coverage objects. This factory expects various combinaisons of the following informations:
String
objects (CaselessStringKey
are accepted as well), while
values may be any Object
.The coordinate reference system is inferred from the supplied envelope or grid geometry parameters. If those parameters do not have CRS information, then this factory fallback on a default CRS.
Every methods will ultimately delegate their work to a master
create
variant. Developpers can override this method if they
want to intercept the creation of all GridCoverage2D
objects in this factory.
Field Summary |
Fields inherited from class org.geotools.factory.AbstractFactory |
hints, MAXIMUM_PRIORITY, MINIMUM_PRIORITY, NORMAL_PRIORITY, priority |
Constructor Summary | |
GridCoverageFactory()
Creates a default factory. |
|
GridCoverageFactory(Hints hints)
Creates a factory using the specified set of hints. |
Method Summary | |
GridCoverage2D |
create(java.lang.CharSequence name,
float[][] matrix,
org.opengis.spatialschema.geometry.Envelope envelope)
Constructs a grid coverage from the specified matrix and envelope. |
org.opengis.coverage.grid.GridCoverage |
create(java.lang.CharSequence name,
javax.media.jai.ImageFunction function,
org.opengis.referencing.crs.CoordinateReferenceSystem crs,
GridGeometry2D gridGeometry,
GridSampleDimension[] bands,
java.util.Map properties)
Deprecated. Replaced by the variant without CRS, since the CRS is now included in the grid geometry. |
GridCoverage2D |
create(java.lang.CharSequence name,
javax.media.jai.ImageFunction function,
GridGeometry2D gridGeometry,
GridSampleDimension[] bands,
java.util.Map properties)
Constructs a grid coverage from an image function. |
org.opengis.coverage.grid.GridCoverage |
create(java.lang.CharSequence name,
java.awt.image.RenderedImage image,
org.opengis.referencing.crs.CoordinateReferenceSystem crs,
org.opengis.spatialschema.geometry.Envelope envelope)
Deprecated. Replaced by the variant
without CRS , since the CRS is now included in the envelope. |
org.opengis.coverage.grid.GridCoverage |
create(java.lang.CharSequence name,
java.awt.image.RenderedImage image,
org.opengis.referencing.crs.CoordinateReferenceSystem crs,
org.opengis.spatialschema.geometry.Envelope envelope,
GridSampleDimension[] bands,
org.opengis.coverage.grid.GridCoverage[] sources,
java.util.Map properties)
Deprecated. Replaced by the variant without CRS , since
the CRS is now included in the envelope. |
GridCoverage2D |
create(java.lang.CharSequence name,
java.awt.image.RenderedImage image,
org.opengis.referencing.crs.CoordinateReferenceSystem crs,
org.opengis.referencing.operation.MathTransform gridToCRS,
GridSampleDimension[] bands,
org.opengis.coverage.grid.GridCoverage[] sources,
java.util.Map properties)
Constructs a grid coverage from the specified image and "grid to CRS" transform. |
GridCoverage2D |
create(java.lang.CharSequence name,
java.awt.image.RenderedImage image,
org.opengis.spatialschema.geometry.Envelope envelope)
Constructs a grid coverage from the specified image and envelope. |
GridCoverage2D |
create(java.lang.CharSequence name,
java.awt.image.RenderedImage image,
org.opengis.spatialschema.geometry.Envelope envelope,
GridSampleDimension[] bands,
org.opengis.coverage.grid.GridCoverage[] sources,
java.util.Map properties)
Constructs a grid coverage from the specified image and envelope. |
GridCoverage2D |
create(java.lang.CharSequence name,
java.awt.image.RenderedImage image,
GridGeometry2D gridGeometry,
GridSampleDimension[] bands,
org.opengis.coverage.grid.GridCoverage[] sources,
java.util.Map properties)
Constructs a grid coverage from the specified image and grid geometry. |
org.opengis.coverage.grid.GridCoverage |
create(java.lang.CharSequence name,
java.awt.image.WritableRaster raster,
org.opengis.referencing.crs.CoordinateReferenceSystem crs,
org.opengis.spatialschema.geometry.Envelope envelope,
double[] minValues,
double[] maxValues,
javax.units.Unit units,
java.awt.Color[][] colors,
java.awt.RenderingHints hints)
Deprecated. Replaced by the variant without CRS ,
since the CRS is now included in the envelope. |
GridCoverage2D |
create(java.lang.CharSequence name,
java.awt.image.WritableRaster raster,
org.opengis.referencing.crs.CoordinateReferenceSystem crs,
org.opengis.referencing.operation.MathTransform gridToCRS,
double[] minValues,
double[] maxValues,
javax.units.Unit units,
java.awt.Color[][] colors,
java.awt.RenderingHints hints)
Constructs a grid coverage from the specified raster and "grid to CRS" transform. |
GridCoverage2D |
create(java.lang.CharSequence name,
java.awt.image.WritableRaster raster,
org.opengis.referencing.crs.CoordinateReferenceSystem crs,
org.opengis.referencing.operation.MathTransform gridToCRS,
GridSampleDimension[] bands)
Constructs a grid coverage from the specified raster and "grid to CRS" transform. |
GridCoverage2D |
create(java.lang.CharSequence name,
java.awt.image.WritableRaster raster,
org.opengis.spatialschema.geometry.Envelope envelope)
Constructs a grid coverage from the specified raster and envelope. |
GridCoverage2D |
create(java.lang.CharSequence name,
java.awt.image.WritableRaster raster,
org.opengis.spatialschema.geometry.Envelope envelope,
double[] minValues,
double[] maxValues,
javax.units.Unit units,
java.awt.Color[][] colors,
java.awt.RenderingHints hints)
Constructs a grid coverage from the specified raster and envelope. |
GridCoverage2D |
create(java.lang.CharSequence name,
java.awt.image.WritableRaster raster,
org.opengis.spatialschema.geometry.Envelope envelope,
GridSampleDimension[] bands)
Constructs a grid coverage from the specified raster and envelope. |
protected org.opengis.referencing.crs.CoordinateReferenceSystem |
getDefaultCRS(int dimension)
Returns the default coordinate reference system to use when no CRS were explicitly specified by the user. |
Methods inherited from class org.geotools.factory.AbstractFactory |
getImplementationHints, onDeregistration, onRegistration |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GridCoverageFactory()
FactoryFinder.getGridCoverageFactory(org.geotools.factory.Hints)
instead.
public GridCoverageFactory(Hints hints)
Method Detail |
protected org.opengis.referencing.crs.CoordinateReferenceSystem getDefaultCRS(int dimension)
DEFAULT_COORDINATE_REFERENCE_SYSTEM
hint were provided at factory construction
time, then the specified CRS is returned. Otherwise, the default implementation
returns DefaultGeographicCRS.WGS84
or its 3D variant. Subclasses should
override this method if they want to use different defaults.
dimension
- The number of dimension expected in the CRS to be returned.public org.opengis.coverage.grid.GridCoverage create(java.lang.CharSequence name, javax.media.jai.ImageFunction function, org.opengis.referencing.crs.CoordinateReferenceSystem crs, GridGeometry2D gridGeometry, GridSampleDimension[] bands, java.util.Map properties)
public GridCoverage2D create(java.lang.CharSequence name, javax.media.jai.ImageFunction function, GridGeometry2D gridGeometry, GridSampleDimension[] bands, java.util.Map properties)
name
- The grid coverage name.function
- The image function.gridGeometry
- The grid geometry. The grid
range must contains the expected image size (width and height).bands
- Sample dimensions for each image band, or for
default sample dimensions.properties
- The set of properties for this coverage, or if there is none.public GridCoverage2D create(java.lang.CharSequence name, float[][] matrix, org.opengis.spatialschema.geometry.Envelope envelope)
name
- The grid coverage name.matrix
- The matrix data in a layout.
NaN values are mapped to a transparent color.envelope
- The envelope.public GridCoverage2D create(java.lang.CharSequence name, java.awt.image.WritableRaster raster, org.opengis.spatialschema.geometry.Envelope envelope)
name
- The grid coverage name.raster
- The data (may be floating point numbers). NaN
values are mapped to a transparent color.envelope
- The envelope.public org.opengis.coverage.grid.GridCoverage create(java.lang.CharSequence name, java.awt.image.WritableRaster raster, org.opengis.referencing.crs.CoordinateReferenceSystem crs, org.opengis.spatialschema.geometry.Envelope envelope, double[] minValues, double[] maxValues, javax.units.Unit units, java.awt.Color[][] colors, java.awt.RenderingHints hints)
variant without CRS
,
since the CRS is now included in the envelope.
public GridCoverage2D create(java.lang.CharSequence name, java.awt.image.WritableRaster raster, org.opengis.spatialschema.geometry.Envelope envelope, double[] minValues, double[] maxValues, javax.units.Unit units, java.awt.Color[][] colors, java.awt.RenderingHints hints)
name
- The grid coverage name.raster
- The data (may be floating point numbers). NaN
values are mapped to a transparent color.envelope
- The grid coverage cordinates and its CRS. This envelope must have at least
two dimensions. The two first dimensions describe the image location along
x and y axis. The other dimensions are optional and
may be used to locate the image on a vertical axis or on the time axis.minValues
- The minimal value for each band in the raster, or
for computing it automatically.maxValues
- The maximal value for each band in the raster, or
for computing it automatically.units
- The units of sample values, or if unknow.colors
- The colors to use for values from to
for each bands, or for a default color palette. If non-null,
each arrays may have any length; colors will be
interpolated as needed.hints
- An optional set of rendering hints, or if none. Those hints
will not affect the grid coverage to be created. However, they may affect
the grid coverage to be returned by geophysics
(false)
, i.e. the view to be used at rendering time. The
optional SAMPLE_DIMENSION_TYPE
hint
specifies the SampleDimensionType
to be used at rendering time,
which can be one of UNSIGNED_8BITS
or UNSIGNED_16BITS
.public GridCoverage2D create(java.lang.CharSequence name, java.awt.image.WritableRaster raster, org.opengis.referencing.crs.CoordinateReferenceSystem crs, org.opengis.referencing.operation.MathTransform gridToCRS, double[] minValues, double[] maxValues, javax.units.Unit units, java.awt.Color[][] colors, java.awt.RenderingHints hints)
name
- The grid coverage name.raster
- The data (may be floating point numbers). NaN
values are mapped to a transparent color.crs
- The coordinate reference system. This specifies the CRS used when
accessing a grid coverage with the methods.gridToCRS
- The math transform from grid to coordinate reference system.minValues
- The minimal value for each band in the raster, or
for computing it automatically.maxValues
- The maximal value for each band in the raster, or
for computing it automatically.units
- The units of sample values, or if unknow.colors
- The colors to use for values from to
for each bands, or for a default color palette. If non-null,
each arrays may have any length; colors will be
interpolated as needed.hints
- An optional set of rendering hints, or if none. Those hints
will not affect the grid coverage to be created. However, they may affect
the grid coverage to be returned by geophysics
(false)
, i.e. the view to be used at rendering time. The
optional SAMPLE_DIMENSION_TYPE
hint
specifies the SampleDimensionType
to be used at rendering time,
which can be one of UNSIGNED_8BITS
or UNSIGNED_16BITS
.public GridCoverage2D create(java.lang.CharSequence name, java.awt.image.WritableRaster raster, org.opengis.spatialschema.geometry.Envelope envelope, GridSampleDimension[] bands)
The coordinate reference system is inferred from the supplied envelope. The envelope must have at least two dimensions. The two first dimensions describe the image location along x and y axis. The other dimensions are optional and may be used to locate the image on a vertical axis or on the time axis.
name
- The grid coverage name.raster
- The raster.envelope
- The grid coverage cordinates.bands
- Sample dimensions for each image band, or for default
sample dimensions. If non-null, then this array's length must matches
the number of bands in .public GridCoverage2D create(java.lang.CharSequence name, java.awt.image.WritableRaster raster, org.opengis.referencing.crs.CoordinateReferenceSystem crs, org.opengis.referencing.operation.MathTransform gridToCRS, GridSampleDimension[] bands)
name
- The grid coverage name.raster
- The raster.crs
- The coordinate reference system. This specifies the CRS used when
accessing a grid coverage with the methods. The
number of dimensions must matches the number of target dimensions
of .gridToCRS
- The math transform from grid to coordinate reference system.bands
- Sample dimensions for each image band, or for
default sample dimensions. If non-null, then this array's length
must matches the number of bands in .public org.opengis.coverage.grid.GridCoverage create(java.lang.CharSequence name, java.awt.image.RenderedImage image, org.opengis.referencing.crs.CoordinateReferenceSystem crs, org.opengis.spatialschema.geometry.Envelope envelope)
variant
without CRS
, since the CRS is now included in the envelope.
public GridCoverage2D create(java.lang.CharSequence name, java.awt.image.RenderedImage image, org.opengis.spatialschema.geometry.Envelope envelope)
The envelope must have at least two dimensions. The two first dimensions describe the image location along x and y axis. The other dimensions are optional and may be used to locate the image on a vertical axis or on the time axis.
name
- The grid coverage name.image
- The image.envelope
- The grid coverage cordinates.public org.opengis.coverage.grid.GridCoverage create(java.lang.CharSequence name, java.awt.image.RenderedImage image, org.opengis.referencing.crs.CoordinateReferenceSystem crs, org.opengis.spatialschema.geometry.Envelope envelope, GridSampleDimension[] bands, org.opengis.coverage.grid.GridCoverage[] sources, java.util.Map properties)
variant without CRS
, since
the CRS is now included in the envelope.
public GridCoverage2D create(java.lang.CharSequence name, java.awt.image.RenderedImage image, org.opengis.spatialschema.geometry.Envelope envelope, GridSampleDimension[] bands, org.opengis.coverage.grid.GridCoverage[] sources, java.util.Map properties)
This convenience constructor assumes that axis order in the supplied image matches exactly axis order in the supplied envelope. In other words, in the usual case where axis order in the image is (column, row), then the envelope should probably have a (longitude, latitude) or (easting, northing) axis order.
An exception to the above rule applies for CRS using exactly the following axis order:
(NORTH
|SOUTH
,
EAST
|WEST
).
An example of such CRS is . This convenience constructor will
interchange automatically the (y,x) axis for such CRS.
If more control on axis order and direction reversal is wanted, use the constructor variant expecting an explicit transform.
name
- The grid coverage name.image
- The image.envelope
- The grid coverage cordinates. This envelope must have at least two
dimensions. The two first dimensions describe the image location
along x and y axis. The other dimensions are
optional and may be used to locate the image on a vertical axis or
on the time axis.bands
- Sample dimensions for each image band, or for default
sample dimensions. If non-null, then this array's length must matches
the number of bands in .sources
- The sources for this grid coverage, or if none.properties
- The set of properties for this coverage, or if there is none.public GridCoverage2D create(java.lang.CharSequence name, java.awt.image.RenderedImage image, org.opengis.referencing.crs.CoordinateReferenceSystem crs, org.opengis.referencing.operation.MathTransform gridToCRS, GridSampleDimension[] bands, org.opengis.coverage.grid.GridCoverage[] sources, java.util.Map properties)
name
- The grid coverage name.image
- The image.crs
- The coordinate reference system. This specifies the CRS used when
accessing a grid coverage with the methods. The
number of dimensions must matches the number of target dimensions
of .gridToCRS
- The math transform from grid to coordinate reference system.bands
- Sample dimension for each image band, or for default sample
dimensions. If non-null, then this array's length must matches the number
of bands in the .sources
- The sources for this grid coverage, or if none.properties
- The set of properties for this coverage, or if there is none.public GridCoverage2D create(java.lang.CharSequence name, java.awt.image.RenderedImage image, GridGeometry2D gridGeometry, GridSampleDimension[] bands, org.opengis.coverage.grid.GridCoverage[] sources, java.util.Map properties)
This is the most general constructor, the one that gives the maximum control
on the grid coverage to be created. Every methods will ultimately
delegate their work this master method. Developpers can override this method if they
want to intercept the creation of all GridCoverage2D
objects in this factory.
name
- The grid coverage name.image
- The image.gridGeometry
- The grid geometry (must contains an envelope with its coordinate reference system and a "grid to CRS" transform).bands
- Sample dimensions for each image band, or for default sample
dimensions. If non-null, then this array's length must matches the number
of bands in .sources
- The sources for this grid coverage, or if none.properties
- The set of properties for this coverage, or none.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |