GeoTools 2.4.1

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 
GeoTools
License:GNU Library or Lesser General Public License (LGPL)
URL:http://www.geotools.org/
Description:GeoTools is an open source (LGPL) Java code library which provides standards compliant methods for the manipulation of geospatial data
Package NameComment
com.esri.sde.sdk
com.esri.sde.sdk.client
com.esri.sde.sdk.pe
it.geosolutions.imageio.plugins.jhdf
it.geosolutions.imageio.plugins.jhdf.aps
it.geosolutions.imageio.plugins.jhdf.pool
it.geosolutions.imageio.plugins.jhdf.tovs
it.geosolutions.imageio.plugins.slices2D
it.geosolutions.utils
it.geosolutions.utils.coveragetiler
it.geosolutions.utils.imagemosaic
it.geosolutions.utils.imageoverviews
it.geosolutions.utils.imagepyramid
it.geosolutions.utils.progress
org.apache.commons.events
org.apache.commons.events.observable
org.example.geotools.base
org.geotools
org.geotools.arcsde
org.geotools.arcsde.data DataStore implementation for the ArcSDE 8.x and 9.x spatial gateway.

This implementation is based on the ESRI's ArcSDE Java API. This API is based on a single jar file wich maven downloads automatically and a couple of platform specific libraries (.dll or .so). So we have made an effort in order to this DataStore implementation not being dependant of those native libraries.

The feature set of the ArcSDEDataStore includes feature write support but is actually limited to the inprocess locking manager. Native locking should be developed and will be higly appreciated, so volunteers are wellcome.

org.geotools.arcsde.data.view
org.geotools.arcsde.filter
org.geotools.arcsde.gce
org.geotools.arcsde.gce.band
org.geotools.arcsde.gce.imageio
org.geotools.arcsde.pool
org.geotools.axis package org.geotools.axis Support for drawable axis with graduation. Axis objects ({@link org.geotools.axis.Axis2D}) are lines ({@link java.awt.geom.Line2D}) with a graduation ({@link org.geotools.axis.Graduation}). Axis are graduated from the starting point ({@link java.awt.geom.Line2D#getP1()}) to the end point ({@link java.awt.geom.Line2D#getP2()}). Since axis can have arbitrary starting and end points (usually expressed in pixel coordinates), axis can be located anywhere in a widget and have any direction: vertical, horizontal, inclined, increasing up or down, etc. Two axis don't have to be perpendicular. As long as they are not parallel, it is always possible to construct an {@link java.awt.geom.AffineTransform} mapping logical values to pixel coordinates on any arbitrary axis, no matter their orientation.

org.geotools.brewer.color
org.geotools.caching
org.geotools.caching.demo
org.geotools.caching.impl
org.geotools.caching.quatree
org.geotools.caching.spatialindex.rtree
org.geotools.caching.spatialindex.spatialindex
org.geotools.caching.spatialindex.storagemanager
org.geotools.caching.util
org.geotools.catalog
org.geotools.catalog.adaptable
org.geotools.catalog.defaults
org.geotools.catalog.postgis
org.geotools.catalog.property
org.geotools.catalog.shapefile
org.geotools.catalog.styling
org.geotools.catalog.wfs
org.geotools.catalog.wms
org.geotools.coverage package org.geotools.coverage {@linkplain org.geotools.coverage.AbstractCoverage Coverage} implementation. An explanation for this package is provided in the {@linkplain org.opengis.coverage OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.
org.geotools.coverage.grid package org.geotools.coverage.grid {@linkplain org.geotools.coverage.grid.GridCoverage2D} implementation. An explanation for this package is provided in the {@linkplain org.opengis.coverage.grid OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.
org.geotools.coverage.grid.io
org.geotools.coverage.grid.io.imageio
org.geotools.coverage.image
org.geotools.coverage.io package org.geotools.coverage.io Helper classes for coverage reader implementations. {@link org.geotools.coverage.io.AbstractGridCoverageReader} is the base class for any object capable to read a {@link org.geotools.coverage.grid.GridCoverage2D} object.

Sometime, remote sensing data are not contained in a single file. For example it is common to find sample values in a raw binary file (a flat matrix), and metadata informations in a separated text file. There is a wide variety of formats for such text file, and supporting them is not always straightforward. {@link org.geotools.coverage.io.MetadataBuilder} is a helper class for making easier to parse the header file. The content (the actual pixel values) can be parsed using the {@link org.geotools.image.io} package.

org.geotools.coverage.processing package org.geotools.coverage.processing {@linkplain org.geotools.coverage.processing.DefaultProcessor Coverage processing} implementations. An explanation for this package is provided in the {@linkplain org.opengis.coverage.processing OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.

If the operation to apply is know at compile time, then the easiest way to use this package is to use the {@link org.geotools.coverage.processing.Operations} convenience class. For example a {@linkplain org.opengis.coverage.grid.GridCoverage grid coverage} can be resampled to a different {@linkplain org.opengis.referencing.crs.CoordinateReferenceSystem coordinate reference system} using the following code:

Coverage reprojected = Operations.DEFAULT.{@linkplain org.geotools.coverage.processing.Operations#resample resample}(myCoverage, newCRS);

If the operation to apply is unknow at compile time (for example because it is selected at runtime by the user in some widget), or if the operation is not listed in the {@code Operations} convenience class, then the generic way is to invoke the {@link org.geotools.coverage.processing.DefaultProcessor#doOperation doOperation} method on the {@linkplain org.geotools.coverage.processing.AbstractProcessor#getInstance default processor instance}. Available operations are listed in the {@linkplain org.geotools.coverage.processing.operation operation package}.

Supported operations

 


 

Convolve

Computes each output sample by multiplying elements of a kernel with the samples surrounding a particular source sample.

Name: "Convolve"
JAI operator: "{@linkplain javax.media.jai.operator.ConvolveDescriptor Convolve}"
Parameters:

Name Class Default value Minimum value Maximum value
{@code "Source"} {@link org.geotools.coverage.grid.GridCoverage2D} N/A N/A N/A
{@code "kernel"} {@link javax.media.jai.KernelJAI} N/A N/A N/A

Back to summary

 


 

LaplaceType1Filter

Perform a laplacian filter operation on a grid coverage. This is a high pass filter which highlights the edges having positive and negative brightness slopes. This filter mulitples the co-efficients in the tabe below with the corresponding grid data value in the kernel window. The new grid value will be calculated as the sum of (grid value * co-efficient) for each kernel cell divised by 9.

0 -1 0
-1 4 -1
0 -1 0

Name: "LaplaceType1Filter"
JAI operator: "{@linkplain javax.media.jai.operator.ConvolveDescriptor Convolve}"
Parameters:

Name Class Default value Minimum value Maximum value
{@code "Source"} {@link org.geotools.coverage.grid.GridCoverage2D} N/A N/A N/A

Back to summary

 


 

LaplaceType2Filter

Perform a laplacian filter operation on a grid coverage. This is a high pass filter which highlights the edges having positive and negative brightness slopes. This filter mulitples the co-efficients in the tabe below with the corresponding grid data value in the kernel window. The new grid value will be calculated as the sum of (grid value * co-efficient) for each kernel cell divised by 9.

-1 -1 -1
-1 8 -1
-1 -1 -1

Name: "LaplaceType1Filter"
JAI operator: "{@linkplain javax.media.jai.operator.ConvolveDescriptor Convolve}"
Parameters:

Name Class Default value Minimum value Maximum value
{@code "Source"} {@link org.geotools.coverage.grid.GridCoverage2D} N/A N/A N/A

Back to summary

 


 

MaxFilter

Non-linear filter which is useful for removing isolated lines or pixels while preserving the overall appearance of an image. The filter is implemented by moving a mask over the image. For each position of the mask, the center pixel is replaced by the max of the pixel values covered by the mask. There are several shapes possible for the mask, which are enumerated in the {@linkplain javax.media.jai.operator.MaxFilterDescriptor JAI documentation}.

Name: "MaxFilter"
JAI operator: "{@linkplain javax.media.jai.operator.MaxFilterDescriptor MaxFilter}"
Parameters:

Name Class Default value Minimum value Maximum value
{@code "Source"} {@link org.geotools.coverage.grid.GridCoverage2D} N/A N/A N/A
{@code "Xsize"} {@link java.lang.Integer} 3 1 N/A
{@code "Ysize"} {@link java.lang.Integer} 3 1 N/A
{@code "maskShape"} {@link javax.media.jai.operator.MaxFilterShape} {@link javax.media.jai.operator.MaxFilterDescriptor#MAX_MASK_SQUARE} N/A N/A

Note: In current implementation, Xsize and Ysize must have the same value (i.e. rectangular shapes are not supported).

Back to summary

 


 

MedianFilter

Non-linear filter which is useful for removing isolated lines or pixels while preserving the overall appearance of an image. The filter is implemented by moving a mask over the image. For each position of the mask, the center pixel is replaced by the median of the pixel values covered by the mask. This filter results in a smoothing of the image values. There are several shapes possible for the mask, which are enumerated in the {@linkplain javax.media.jai.operator.MedianFilterDescriptor JAI documentation}.

Name: "MedianFilter"
JAI operator: "{@linkplain javax.media.jai.operator.MedianFilterDescriptor MedianFilter}"
Parameters:

Name Class Default value Minimum value Maximum value
{@code "Source"} {@link org.geotools.coverage.grid.GridCoverage2D} N/A N/A N/A
{@code "Xsize"} {@link java.lang.Integer} 3 1 N/A
{@code "Ysize"} {@link java.lang.Integer} 3 1 N/A
{@code "maskShape"} {@link javax.media.jai.operator.MedianFilterShape} {@link javax.media.jai.operator.MedianFilterDescriptor#MEDIAN_MASK_SQUARE} N/A N/A

Note: In current implementation, Xsize and Ysize must have the same value (i.e. rectangular shapes are not supported).

Back to summary

 


 

MinFilter

Non-linear filter which is useful for removing isolated lines or pixels while preserving the overall appearance of an image. The filter is implemented by moving a mask over the image. For each position of the mask, the center pixel is replaced by the min of the pixel values covered by the mask. There are several shapes possible for the mask, which are enumerated in the {@linkplain javax.media.jai.operator.MinFilterDescriptor JAI documentation}.

Name: "MinFilter"
JAI operator: "{@linkplain javax.media.jai.operator.MinFilterDescriptor MinFilter}"
Parameters:

Name Class Default value Minimum value Maximum value
{@code "Source"} {@link org.geotools.coverage.grid.GridCoverage2D} N/A N/A N/A
{@code "Xsize"} {@link java.lang.Integer} 3 1 N/A
{@code "Ysize"} {@link java.lang.Integer} 3 1 N/A
{@code "maskShape"} {@link javax.media.jai.operator.MinFilterShape} {@link javax.media.jai.operator.MinFilterDescriptor#MIN_MASK_SQUARE} N/A N/A

Note: In current implementation, Xsize and Ysize must have the same value (i.e. rectangular shapes are not supported).

Back to summary

 


 

Recolor

Changes the colors associated to arbitrary {@linkplain org.geotools.coverage.Category categories} in arbitrary bands. The ColorMaps arguments must be an array of {@link java.util.Map}s with a minimal length of 1. The Map in array element 0 is used for band 0; the Map in array element 1 is used for band 1, etc. If there is more bands than array elements in ColorMaps, then the last Map is reused for all remaining bands.

For each {@link java.util.Map} in ColorMaps, the keys are category names as {@link java.lang.String} and the values are colors as an array of type {@linkplain java.awt.Color}[]. All categories with a name matching a key in the Map will be {@linkplain org.geotools.coverage.Category#recolor recolored} with the associated colors. All categories with no corresponding entries in the Map will be left unchanged. The null key is a special value meaning "any quantitative category". For example in order to repaint forest in green, river in blue and lets other categories unchanged, one can write:

    Map map = new HashMap();
    map.put("Forest", new Color[]{Color.GREEN});
    map.put("River",  new Color[]{Color.BLUE });
    Map[] colorMaps = new Map[] {
        map  // Use for all bands
    }
    

Name: "Recolor"
JAI operator: N/A
Parameters:

Name Class Default value Minimum value Maximum value
{@code "Source"} {@link org.geotools.coverage.grid.GridCoverage2D} N/A N/A N/A
{@code "ColorMaps"} {@linkplain java.util.Map}[] A gray scale N/A N/A

Back to summary

 


 

Threshold

A gray scale threshold classifies the grid coverage values into a boolean value. The sample dimensions will be modified into a boolean value and the dimension type of the source sample dimension will be represented as 1 bit.

Name: "Threshold"
JAI operator: "{@linkplain javax.media.jai.operator.BinarizeDescriptor Binarize}"
Parameters:

Name Class Default value Minimum value Maximum value
{@code "Source"} {@link org.geotools.coverage.grid.GridCoverage2D} N/A N/A N/A
{@code "threshold"} {@code double[]} N/A N/A N/A

Back to summary

org.geotools.coverage.processing.operation package org.geotools.coverage.processing.operation List of coverage {@linkplain org.geotools.coverage.processing.AbstractOperation operations}. This package is useful for documentation purpose since class names match exactly operation names, and the javadoc for each class provides a table of valid arguments. But the classes provided there should not be used directly. There is no need to instantiate them, since it is already done by the {@linkplain org.geotools.coverage.processing.DefaultProcessor processor} which manage them.
org.geotools.data Defines the DataStoreAPI via which all data is imported or exported.

All DataStores (e.g. PostGIS, Shapefile(tm), GML...) must provide implementations of the DataStore interface and the DataStoreFactorySpi interface. These interfaces allow new types of datastore to be plugged into applications which use geotools without the need to modify any code.

Example:


FeatureStore postgis = new PostGisDataStore( ... );
Query all = Query.ALL;
FeatureType roadType = postgis.getFeatureType( "roads" );

// reader 1 streams over all roads
FeatureReader reader1 = postgis.getFeatureReader( roadsType, all, Transaction.AUTO_COMMIT );

// allRoads = featureResults is a prepaired query of all roads
FeatureSource roads = postgis.getFeatureSource( "roads" );
FeatureResults allRoads = roads.getFeatures( all );

// reader 2 & 3 streams over all roads in the same manner as reader 1
FeatureReader reader2 = allRoads.reader();
FeatureReader reader3 = allRoads.reader();

// bounds1 returns the bounding box of roads, may be null depending on expense
Envelope bounds1 = roads.getBounds( all );

// bounds2 returns the bounding box of roads, may actually calculate by going over the entire dataset
Envelope bounds 2 = allRoads.getBounds(); 

org.geotools.data.collection
org.geotools.data.complex

This package contains the implementation of a ComplexDataStore,

Author note: though this "Complex" datastore has born to provide complex features out of a simple features data source, it may be better called a DerivativeDataStore or something like that, you'll see why later.

This DataStore implementation acts as a wrapper over one or more DataStores, from now on, the surrogate DataStores, and allows to specify a series of mappings between the properties of surrogate FeatureTypes and output schemas. This mappings, in turn, allows to specify properties of the target FeatureTypes as being derivated by the evaluation of an org.geotools.filter.Expression defined against the surrogate FeautreType.

So, what is this useful for? Suppose you have a database of feature types you need to serve out of your office or organization. Furthermore, suppose you need to serve that data in an externally defined schema (like one defined by INSPIRE or any other organization). Obviously you don't want to rearchitect your database to conform to that schema! And indeed you probably even can't do that without the assistance of some kind of object-relational mapping layer. Now you can better figure out what this ComplexDataStore is about if you think on it as a kind of object-relational mapping layer, but targeted to GIS data. Though not exact, this pseudo definition can help you understand it if its your first time reading this document.

Of course it has nothing to do with relational databases directly, but with mapping an existing GeoTools FeatureType from your internal storage schema to an externally defined one, which we're getting used to call "community schemas".

How does ComplexDataStore achieves that?
You need:

  • An output (community) schema. This schema exists independently of your actual data structures, so it will be loaded from a GML schema file, defined in XML Schema language.
  • An input FeatureType. GeoTools FeatureTypes are exposed by GeoTools DataStores, so you need a way to specify the DataStore's connection parameters and the source FeatureType name.
  • The attribute and attribute id mapping definitions. They consists of a series of couples of XPath and OGC Filter 1.0 Expressions. The former addresses the output schema properties and the later defines how the value of that properties are derived from the source Feature instances.
All this information is held by a FeatureTypeMapping object, and a ComplexDataStore, in turn, may hold an arbitrary number of that objects, each one defining one (derived) FeatureType the DataStore exposes.

To persist this information, use a XML file which contains this definitions, and whose location in the form of an URL must be used to create a DataStore instance through the GeoTools DataStoreFinder lookup system.

org.geotools.data.complex.config
org.geotools.data.complex.filter
org.geotools.data.coverage.grid package org.geotools.data.gridcoverage This package contains the support classes necessary to implement a GridCoverageExchange and the data formats, such as ArcGrid or Geotiff. The StreamGridCoverageExchange is an example of a GridCoverageExchange.

The AbstractGridFormat class is a helper class to make implementing GridFormats simpler.

Currently the StreamGridCoverageExchange is hardcoded with only the ArcGrid format. In the future a plug-in framework will be added so the formats can be found dynamically.

org.geotools.data.crs package org.opengis.catalog Provides support for the OGC Catalog Specification.

This package provides the base interfaces needed to support the concept of a {@linkplain org.opengis.catalog.Catalog catalog} of {@linkplain org.opengis.catalog.CatalogEntry catalog entries}. Catalog access is granted by both an iterator, and a query method. The query language is not specified by this api, although the specification expects it to perform similarly to the Simple Feature.

NOTE:
The specification Catalog Services 1.1.1 does not specify the methods of the {@link org.opengis.catalog.CatalogEntry} interface. The methods in this interface were inferred from reading the abstract catalog specification: Catalog Services section 3.1.2.

Representation of Metadata

We could not decide on a unified approach for the representation of Metadata. The choices were between ISO 19115, ISO 19119 and the Dublin core. Our feedback for implementing ISO 19115 is described in the {@link org.opengis.metadata} package.

Our insight came when examining the Catalog Services 1.1.1 document - in the abstract catalog specification: CatalogServices section 3.1.2. By making real classes out of these definitions we have been able to programatically declare the api used by catalog services {@link org.opengis.catalog.QueryDefinition} to access metadata without being tied to a specific Metadata standard.

Specifically the following definitions:

  • 4.6 Metadata dataset - Metadata describing a specific dataset [ISO 19101]
  • 4.7 Metadata entity - Group of metadata elements and other metadata entities describing the same aspect of data.
    • NOTE 1: A metadata entity may contain one or more metadata entities.
    • NOTE 2: A metadata is equivalent to a class in UML terminology [ISO 19101].
  • 4.8 Metadata schema - Conceptual schema describing metadata.
    • NOTE ISO 19115 describes a standard for a metadata schema [ISO 19101]

From these definitions we have formalized the following:

  • {@link org.opengis.catalog.MetadataEntity}
  • {@link org.opengis.catalog.MetadataEntity.EntityType}
  • {@link org.opengis.catalog.MetadataEntity.Element}

This abstraction allows our implementation of ISO 19115 ({@link org.opengis.metadata}) to exist independently of {@link org.opengis.catalog.Catalog}, {@link org.opengis.catalog.CatalogEntry}, {@link org.opengis.catalog.QueryDefinition} and {@link org.opengis.catalog.QueryResult}.

Package Specification

This package is based on the following specifications:

Since the time of creation the following has been released:

Q: Is practice of creating objects for MetadataEntity, Element and EntityType not in the spirit of the specification, if so can they recommend an alternative? One alternative would be to port the CORBA IDL from v2. Problem is InsertMetadata/UpdateMetadata using "any payload".

Q: Does the Catalog v2 section 10: HTTP protocol binding replace the Web Registry Service draft document? Or should we expect any progress on that front?

Related Documentation

  • {@link org.opengis.metadata} - ISO 19115 (TC211) Metadata specification
  • {@link org.opengis.filter} - defines a query language similar in scope to QueryDefinition
org.geotools.data.db2
org.geotools.data.db2.filter
org.geotools.data.dir

Directory DataStore

Overview

This package represents the functionality required to chain datastores, ie. to represents a directory of mixed file types as a single datastore. Inlcuded are the required interfaces and default implementations for datastores which wish to support single file reading, and as such be included as a datatype for the directory datastore.

Extensions

Addition formats may be included simply by having the dataStore extend AbstractFileDataStore and the DataStore Factory extending FileDataStoreFactorySpi. You will also have to fill in the META_INF directory in similar to a generic dataStore.

org.geotools.data.feature
org.geotools.data.feature.adapter
org.geotools.data.feature.memory
org.geotools.data.geomedia
org.geotools.data.geomedia.attributeio
org.geotools.data.geometryless
org.geotools.data.geometryless.attributeio
org.geotools.data.geometryless.filter
org.geotools.data.geometryless.wrapper
org.geotools.data.gml
org.geotools.data.h2
org.geotools.data.hsql
org.geotools.data.hsql.fidmapper
org.geotools.data.jdbc
org.geotools.data.jdbc.attributeio
org.geotools.data.jdbc.collection
org.geotools.data.jdbc.datasource
org.geotools.data.jdbc.ds
org.geotools.data.jdbc.fidmapper
org.geotools.data.jdbc.referencing
org.geotools.data.memory
org.geotools.data.mif
org.geotools.data.mysql
org.geotools.data.ogr
org.geotools.data.oracle
org.geotools.data.oracle.attributeio
org.geotools.data.oracle.referencing
org.geotools.data.oracle.sdo
org.geotools.data.ows
org.geotools.data.ows.test
org.geotools.data.postgis
org.geotools.data.postgis.attributeio
org.geotools.data.postgis.collection
org.geotools.data.postgis.fidmapper
org.geotools.data.postgis.referencing
org.geotools.data.property
org.geotools.data.shapefile
org.geotools.data.shapefile.dbf
org.geotools.data.shapefile.indexed
org.geotools.data.shapefile.prj
org.geotools.data.shapefile.shp
org.geotools.data.shapefile.shp.xml
org.geotools.data.sql
org.geotools.data.sql.view
org.geotools.data.store
org.geotools.data.tiger
org.geotools.data.view
org.geotools.data.vpf
org.geotools.data.vpf.exc
org.geotools.data.vpf.file
org.geotools.data.vpf.ifc
org.geotools.data.vpf.io
org.geotools.data.vpf.readers
org.geotools.data.vpf.util
org.geotools.data.wfs
org.geotools.data.wfs.demo
org.geotools.data.wms Provides for Web Map Server client access as a Grid Coverage Exchange.
Overview Diagram Please

Example Use:



Package Specification

The current implementation is targeted towards the 1.3.0 OGC WMS Implementation Specification. There are plans to generalize this support for previous revisions.

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:
  • http://docs.codehaus.org/display/GEOTOOLS/Grid+Coverage+tutorial
org.geotools.data.wms.gce
org.geotools.data.wms.gce.test
org.geotools.data.wms.request
org.geotools.data.wms.response
org.geotools.data.wms.test
org.geotools.data.wms.xml
org.geotools.data.wms.xml.test
org.geotools.demo
org.geotools.demo.coverage
org.geotools.demo.data
org.geotools.demo.example
org.geotools.demo.feature
org.geotools.demo.introduction
org.geotools.demo.libraryJTS
org.geotools.demo.mappane
org.geotools.demo.metadata.example
org.geotools.demo.postgis
org.geotools.demo.referencing
org.geotools.demo.xml
org.geotools.event package org.geotools.event Allows for events on GeoTools nested data structures.

Several of the GeoTools objects are produced in reference to specifications, in particular XML based specifications. Often we try and match the same abstractions present in a specification like SLD or Filter. But rather then make use of pure Java Beans, and make user interface code responsible for managing a host of listeners we are providing a single set of listeners located at the object matching the document base.

For more Details:

  • This design is similar to EMF, or JFace use (aka borrow code examples)
  • Not specific to Documents (just nesting), the Catalog api will use these events
  • We do try and match the document structure perfectly for Feature/FeatureCollection/GML (so that the same XPath expressions can be respected). FeatureCollection and Feature have their own well explored structure and issues and will not be using this event system. Given the size of FeatureCollections it is not practicle for each child to "know" its parent.

References

The following links will be of interest:
  • Eclipse Modeling Framework
  • JFace
@author Jody Garnett, Refractions Research
org.geotools.factory org.geotools.factory Utility classes which enable dynamic binding to factory implementations at runtime.

Because Geotools core API consists almost exclusively of interfaces (including GeoAPI), factories play a role in how developers use the API. Although the interfaces that are declared in GeoAPI are implemented in various Geotools packages you should not use those classes directly. Instead you should use factories.

J2SE's {@link javax.imageio.spi.ServiceRegistry} provides a general way (even if it is defined in a {@code javax.imageio} subpackage) to instantiate and manage factories (also called providers). Each factory implementation should be declared in {@code META-INF/services} directory, usually bundled in every JAR file. For example if a JAR file provides one or more {@link org.opengis.referencing.datum.DatumFactory} implementations, then it must provide the following file:

META-INF/services/org.opengis.referencing.datum.DatumFactory

with a content similar to the one below:

com.mycompany.MyDatumFactory1
com.mycompany.MyDatumFactory2
com.mycompany.MyDatumFactory3

The ordering is initially unspecified. Users can {@linkplain javax.imageio.spi.ServiceRegistry#setOrdering set an ordering} explicitly themselves, or implementations can do that automatically {@linkplain javax.imageio.spi.RegisterableService#onRegistration on registration}. The {@link org.geotools.factory.AbstractFactory} class provides a simple way to setup ordering on registration on the basis of a {@linkplain org.geotools.factory.AbstractFactory#priority priority} number.

If a user wants a specific implementation, he can {@linkplain javax.imageio.spi.ServiceRegistry#getServiceProviders iterates through registered ones} and pickup the desired implementation himself. An alternative is to bundle the criterions in a {@linkplain org.geotools.factory.Hints map of hints} and lets the registry selects an implementation accordingly. This later functionality is not provided by the standard {@link javax.imageio.spi.ServiceRegistry}, but is provided by Geotools's {@link org.geotools.factory.FactoryRegistry} extension. This class extends the service registry API with the following functionalities:

  • A {@link org.geotools.factory.FactoryRegistry#scanForPlugins() scanForPlugins()} method that scans for plugins in the {@linkplain java.lang.Class#getClassLoader registry class loader}, the {@linkplain java.lang.Thread#getContextClassLoader thread context class loader} and the {@linkplain java.lang.ClassLoader#getSystemClassLoader system class loader}. Additionally, {@code scanForPlugins()} looks for any implementation specified as {@linkplain java.lang.System#getProperty(String) system property}.

  • Filters out automatically {@linkplain org.geotools.factory.OptionalFactory optional factories} when they are not {@linkplain org.geotools.factory.OptionalFactory#isAvailable available}.

  • When more than one implementation is available for the same {@link org.geotools.factory.Factory} subinterface, an optional set of {@linkplain org.geotools.factory.Hints hints} can specifies the criterions that the desired implementation must meets. If a factory implementation depends on other factories, the dependencies hints are checked recursively.

  • Optionally, if no factory matches the given hints, a new instance can be {@linkplain org.geotools.factory.FactoryCreator#createServiceProvider automatically created}. However, those new instances are not registered. If creation of new instances at every {@link org.geotools.factory.FactoryRegistry#getServiceProvider getServiceProvider(...)} method invocation is undesired, an implementation matching the expected {@linkplain org.geotools.factory.Hints hints} should be registered in the {@code META-INF/services} directory, as explained above.

Note that the {@linkplain org.geotools.factory.Hints hints}, if provided, don't need to apply directly to the requested factory category. They may apply indirectly through some dependency. A typical example is a request for any {@link com.vividsolutions.jts.geom.GeometryFactory} instance, providing that this instance uses a particular {@link com.vividsolutions.jts.geom.CoordinateSequenceFactory} implementation.

org.geotools.feature
org.geotools.feature.collection package org.geotools.feature.collection Helper classes for implementing FeatureCollections.

References

The following links will be of interest:
  • Simple Features for SQL
@author Jody Garnett, Refractions Research @since GeoTools 2.2.
org.geotools.feature.iso
org.geotools.feature.iso.attribute
org.geotools.feature.iso.collection package org.geotools.feature.collection Helper classes for implementing FeatureCollections. Please note that this is mostly of interest to DataStore implementors who can use these classes as a starting point for their providing their own content (backed by a resultset or disk file etc.).

Meaning of FeatureCollections

FeatureCollections can be grouped into the following categories:

  • FeatureCollection - providing access to a set of Features, both bounds and count are supported (although you are warned that both may be O(N))
  • RandomFeatureAccess - provides access to Feature by ID
  • FeatureList - provides access to sorted set of Features
You can use the instanceof operator to check before casting although the API will be explicit where appropriate. Please note that the API may be explicit in Javadocs due to the limitations of Java 1.4.
  • Explicit: FeatureCollection.sort( SortBy ) returns a FeatureList
  • Explict: FeatureCollection.filter( Filter ) returns a FeatureCollection
  • Implicit: FeatureList.filter( Filter ) returns a FeatureCollection, impled that this instance also is an instnaceof FeatureList
Where possible we have placed this kind of thing into the GeoAPI FeatureCollection interface where Java5 can make these ideas exact.

Use of SortBy and Filter

You can explicitly obtain a FeatureList by using a sort( SortBy ) on an FeatureCollection. You can also obtain a "sub" feature collection by using a filter( Filter ). In both these cases the resulting construct is considered a "view" onto the origional FeatureCollection (which in the case of a DataStore will represent contents located externally).

  FeatureList list = featureCollection.filter( filter ).sort( sort );  
  

In addition to working directly with a "view" you can often use this technique to stage an opperation such as addAll or remove.


  collection.addAll( list.filter( filter ) );
  list.filter( filter ).remove();
  

Seperation Of Concerns

By using the sub collection opperations such as sort and filter you can carefully define set of data you wish to query against. This seperation of concerns can be maintained by ensuring the use of Expression when accessing content, and not acceing content directly.

This seperation of concerns is manditory for geotools library code, and is strongly recommended for client code.

Choosing a FeatureCollection Implementation for Client Code

The most basic FeatureCollection available in this package is the one that store information completly in memory. This is designed to be used by end users and is available for construction via a FeatureFactory (or SimpleFeatureFactory as required).

A common request involves using a MemoryFeatureCollection to cache information for display. You are warned that this approach will often fail in real GIS useage where the quantity of information can not be limited by memory.

Implementing a FeatureCollection Implementation as a Data Provider

As a Data provideder you are expected to extend the AbstractFeatureCollection classes provided here to make the most performant implementation of feature access you can.

You are responsible for providing the following:
  • All FeatureCollection Implementation: required to represent all content on accessed with Transaction.AUTO_COMMIT, bounds and count information provided by metadata. This implementation is mostly used to defined sub collections via filter and sort methods.
  • "Sub"FeatureCollection Implementation: produced in response to a filter or sort method should be either lazy, or backed by a result set obtained by the first opperation. A cache may be emplyed for information such as bounds and count.
  • FeatureList Implementation: if for file or feature result can be sorted (either via an initial SQL request or via consulting an attribute index file) you can "out" this capability to your end users by use of a FeatureList.
  • Getting Spatial with your Collections: many spatial file formats can make use of a spatial index (or SFSQL class) to provide an optimized experience. If possible please engage this early and often as we are spatial library, on a related note GeometryAttribute and Feature both support the settings of bounds, if this information is available please make use of it to prevent the running an expensive bounds calculation in software.
Although not recommended as general practice some implementations will be forced to "burn memory" by making use of the FeatureCollection Implementations intented for client code for manipulations such as sorting. If this applies to use please try to set yourself up to be lazy - it may be that the user will perform additional sub collection calls.

A word about Simple Features

The SimpleFeature interface is by no means required, it only represents a set of additional methods that can be defined safely when the content is a flat ordered list of atomic types with no multiplicity as dictated exactly in agreement with their type definition.

What does this mean for a FeatureCollection? For a SimpleFeatureCollection no attributes are supported at the SimpleFeatureCollectionType level, and the content members are restricted to a belonging single SimpleFeatureType.

References

The following links will be of interest:
  • Simple Features for SQL
@author Jody Garnett, Refractions Research @since GeoTools 2.2.
org.geotools.feature.iso.simple
org.geotools.feature.iso.type
org.geotools.feature.iso.xpath
org.geotools.feature.type
org.geotools.feature.visitor
org.geotools.filter
org.geotools.filter.expression
org.geotools.filter.function
org.geotools.filter.function.math
org.geotools.filter.identity
org.geotools.filter.parser
org.geotools.filter.spatial
org.geotools.filter.text.cql2 package org.opengis.filter.cql

Common Query Language (CQL)

This package implements the OGC_Common Catalogue Query Language. OGC CQL is the query language to be supported by all OGC Catalogue Interfaces in order to support search interoperability. Catalogue Service Implementation Specification (OGC 04-021r3):

CQL BNF with SQL Extensions

The original BNF was extended thinking in a SQL where expression. The original BNF is reproduced to indicate the extensions highlighted with bold characters.

Extensions in original BNF

	
    <SequenceOfSearchConditions > ::= 
              <search condition> 
         |    <SequenceOfSearchConditions> ";" <search condition> 
     
    
    <between predicate> ::= 
    		<attribute name> [ NOT ] BETWEEN <literal> AND < literal > 
	
    <routine invocation> ::= 
             <geoop name><georoutine argument list>
           | <relgeoop name><relgeoop argument list>
           | <routine name><argument list>
           | <BBOX> <bbox argument list>	
           
    <geoop name> ::= 
           EQUAL | DISJOINT | INTERSECT | TOUCH | CROSS | 
           WITHIN | CONTAINS |OVERLAP | RELATE [1]
      
    <bbox argument list>::= 
       "(" <attribute> ","<min X> ","<min Y> ","<max X> ","<max Y>["," <crs>] ")"
    <min X> ::= <signed numerical literal> 
    <min Y> ::= <signed numerical literal> 
    <max X> ::= <signed numerical literal> 
    <max Y> ::= <signed numerical literal>
    <crs> ::= [2]  
      
      
    [1] RELATE is not supported (implementation in GeoTools is required)
    [2] If not supplied, the BoundingBox CRS is EPSG:4326.

    

Implementation Notes

The parser was generated using javacc. In expr.jjt file you can see the input grammar for javacc required to parse CQL with extensions.

This implementation does not check CRS. The problem can be solved adding tokens (standards simbols in grammar) or checking in semantic actions consturction (FilterBuilder). The last solution requires to fix a bug retrieved the correspondent factory for crs (srs).

org.geotools.filter.v1_0
org.geotools.filter.v1_1
org.geotools.filter.visitor
org.geotools.gce.arcgrid package org.geotools.data.arcgrid A datasource to manage the ARCGrid ASCII format. Loads the raster file but cannot georeference it, default georeferencing is WGS84 lat/long.
org.geotools.gce.ecw
org.geotools.gce.geotiff package org.geotools.data.geotiff A grid coverage exchange to manage the GeoTIFF Revision 1.0 format.

This package is going to be "evolutionary", rather than "revolutionary". As functionality is added to the package, this page will be updated. This page should be considered a current synopsis of the capabilities of the module.

Revision Date

May 31, 2005

Requirements

This package requires that the runtime environment have access to Java Advanced Imaging (JAI) and the JAI Image I/O extensions available from Sun. Specifically, the GeoTiffFormatFactorySpi will report itself unavailable if any of the following are unavailable:
  • javax.media.jai.JAI
  • com.sun.media.jai.operator.ImageReadDescriptor
  • com.sun.media.imageio.plugins.tiff.GeoTIFFTagSet

Other classes are of course necessary to successfully read in the GeoTIFF image. As they typically come bundled with one or more of the above, they are assumed to be present if all of the above are present.

CRS Information

The ability of the GeoTiff module to interpret and accurately express the geographic information encoded in the GeoTIFF file relies strongly on it's ability to use the Geotools framework to construct a meaningful coordinate reference system (CRS) object. Geotools has a number of Authority Factories which take care of constructing CRS information given the code assigned to that CRS.

The central problem is that a complete CRS is composed of many smaller pieces (coordinate systems (CS), datums, and coordinate operations.) Each of these smaller peices is assigned a code for berevity. So when a GeoTIFF file is written, the coordinate information can either be a single code representing the entire CRS (if you're lucky), or a combination of each of the component codes. Reading a GeoTIFF involves the reverse process: looking up either a single code or a collection of the component codes and building up a CRS object from these components.

Geotools supports the looking up of EPSG codes in plugins. Therefore it is critical that the environment inside which the GeoTIFF plugin is running contain the appropriate epsg authority factory plugins. Unfortunately, the definition of "appropriate" varies according to the type of GeoTIFF file you are trying to read. If you know that your GeoTIFF file contains only codes for complete CRSes, then you can use an EPSG plugin which only looks up complete CRSes (e.g., epsg-wkt, the property file based EPSG authority factory.) If, however, you want to be able to handle more types of GeoTIFF files (perhaps you do not know where your GeoTIFF files are coming from), you must choose an EPSG authority factory which can lookup components of a CRS (e.g., epsg-access, the MS Access backed authority factory.)

In short, the exact means by which EPSG codes are turned into actual Java Objects is left up to the application writer. Ensure that the capabilities you have configured match the requirements imposed by the data you are trying to read.

Current Functionality

The current iteration of the GeoTIFF plugin will read GeoTIFF files with the following restrictions:

  • The coordinate system must be either projected or geographic (geodetic coordinate systems not supported.)
  • The EPSG authority factory plugin chosen by the application writer must successfully construct everything necessary to represent the scene coordinates.
  • The Raster to Model transformation must be a simple translation.
  • This plugin does not use the "Hints" mechanism as of yet. I don't know how to have the user specify the EPSG factories they wish to use.
  • When constructing a user defined projected CRS, the Cartesian CS associated with the system always has easting as the first axis and northing as the second axis, and the units are always the length units defined in the GeoTIFF file. I do not know if it is possible to have a different combination.

The GeoTIFF plugin currently does not write GeoTIFF files. The current obstacles to writing a GeoTIFF file are:

  1. The GeoTiffIIOMetadataAdapter cannot modify the IIOMetadata object (e.g., it's read-only).
  2. No mechanism exists to examine the parameters of a coordinate system and produce an EPSG code.

Key features of the package:

  1. Has a reasonable level of isolation from the Geotools library ala the GeoAPI interfaces. Areas of best isolation are CRS, and areas of worst isolation are the grid coverage exchange API.
  2. Utilizes the JAI ImageI/O tools to perform the actual file I/O.
  3. Interprets metadata retrieved as IIOMetadata.
  4. Functionality is logically subdivided:
    • Classes required to interface to Geotools.
    • An adapter class to retrieve GeoKeys from the IIOMetadata by symbolic name (GeoTiffIIOMetadataAdapter).
    • An adapter class to interpret the values in the GeoKeys and create a corresponding coordinate system with a factory (GeoTiffCoordinateSystemAdapter).

License Information

The GeoTIFF plugin for Geotools is public domain. The GeoTiffIIOMetadataAdapter is Copyright 2004 by Mike Gelbin and released under a liberal license as noted in that file.
org.geotools.gce.geotiff.crs_adapters
org.geotools.gce.geotiff.IIOMetadataAdpaters
org.geotools.gce.geotiff.IIOMetadataAdpaters.utils
org.geotools.gce.geotiff.IIOMetadataAdpaters.utils.codes
org.geotools.gce.gtopo30 package org.geotools.data.gtopo30 Data source for reading the GTOPO30 file format. For more information see the GTOP030 web site
org.geotools.gce.image
org.geotools.gce.imagemosaic package org.geotools.gce.ImageMosaic
org.geotools.gce.imagepyramid package org.geotools.gce.ImageMosaic
org.geotools.gce.mrsid
org.geotools.geometry package org.geotools.geometry {@linkplain org.geotools.geometry.Geometry} implementation. An explanation for this package is provided in the {@linkplain org.opengis.spatialschema.geometry OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.

The {@link org.geotools.geometry.GeneralDirectPosition} class represents a point in a multi-dimensional space. This space may have an arbitrary number of dimensions. For a two-dimensional space, DirectPosition is conceptually equivalent to {@link java.awt.geom.Point2D}.

The class {@link org.geotools.geometry.GeneralEnvelope} represents a box in a multi-dimensional space. For a two-dimensional space, Envelope is conceptually equivalent to {@link java.awt.geom.Rectangle2D}.

org.geotools.geometry.coordinatesequence
org.geotools.geometry.jts
org.geotools.geometry.jts.coordinatesequence
org.geotools.gml

Reads GML files and translates them into Java objects.

Note that the final OGC simple geometry types used by these classes are the ones developed by Vivid Solutions as part of the Java Topology Suite.  However, this not the only type of Java object that may be generated by using this suite of filters.  For example, you could implement a GMLGeometryHandler to create custom geometry types or to store OGC simple types in your own custom format.  The illustration shows how this works.

GMLDocumentFilter reads in an arbitrary XML file, extracts all GML-namespace associate elements, and translates them into primitive geometry calls, handled by the GMLGeometryHandler.  Essentially, GMLDocumentFilter handles all coordinate parsing so that handlers further down the chain never see any character data within GML objects.

GMLGeometryFilter implements a GMLGeometryHandler and uses the SubHandlers to create finished JTS-based geometries.  This is the only object that GMLGeometryFilter passes on down the chain from the GML namespace.  All other XML is passed through without modification.

org.geotools.gml.producer
org.geotools.gml2
org.geotools.gml2.bindings
org.geotools.gml3
org.geotools.gml3.bindings
org.geotools.gml3.bindings.smil
org.geotools.gml3.smil
org.geotools.graph
org.geotools.graph.build
org.geotools.graph.build.basic
org.geotools.graph.build.feature
org.geotools.graph.build.line
org.geotools.graph.build.opt
org.geotools.graph.build.polygon
org.geotools.graph.io
org.geotools.graph.io.standard
org.geotools.graph.linegraph
org.geotools.graph.path
org.geotools.graph.structure
org.geotools.graph.structure.basic
org.geotools.graph.structure.line
org.geotools.graph.structure.opt
org.geotools.graph.traverse
org.geotools.graph.traverse.basic
org.geotools.graph.traverse.standard
org.geotools.graph.util
org.geotools.graph.util.delaunay
org.geotools.graph.util.geom
org.geotools.graph.util.graph
org.geotools.gui.headless package org.geotools.gui.headless A set of non-graphical classes sending informations to the standard output stream or through emails.
org.geotools.gui.swing package org.geotools.gui.swing Miscellaneous widgets.
org.geotools.gui.swing.event package org.geotools.gui.swing.event Events fire from the Swing's widgets package.
org.geotools.gui.swing.image package org.geotools.gui.swing.table Widgets related to {@linkplain java.awt.image.RenderedImage rendered image}.
org.geotools.gui.swing.referencing package org.geotools.gui.swing.referencing Widgets relative to the {@linkplain org.geotools.referencing referencing} package.
org.geotools.gui.swing.table package org.geotools.gui.swing.table A set of {@linkplain javax.swing.table.TableModel} implementations.
org.geotools.gui.swing.tree package org.geotools.gui.swing.tree Workaround for the missing {@code javax.swing.tree.TreeNode.getUserObject()} method. Sun seem to have forgotten this method in the first Swing draft. Unfortunately, since {@link javax.swing.tree.TreeNode} is an interface, Sun can't fix it without breaking compatibility. We have to fix it ourselves, which is the main purpose of this package.
org.geotools.image package org.geotools.image Helper classes for building images. The classes in this package are independent from any {@link org.opengis.coverage.Coverage} classes and can be used for plain {@link java.awt.image.RenderedImage} handling.
org.geotools.image.io package org.geotools.image.io Extensions to {@link javax.imageio.ImageReader} for binary and ASCII files.

{@link org.geotools.image.io.StreamImageReader} is the base class for image decoders reading stream with few (if any) meta-data. Examples of such streams are matrix containing the pixels values in a binary form (RAW images), or ASCII files containing values written as decimal numbers. Such files contain often geophysical values (e.g. temperature in Celsius degrees, elevation in metres, etc.) better represented as floating point numbers than integers.

By default, {@link org.geotools.image.io.StreamImageReader} stores decoded image using data type {@link java.awt.image.DataBuffer#TYPE_FLOAT} and a grayscale color space. This politic produce images matching closely the original data, i.e. it involves as few transformations as possible. But displaying floating-point images is usually very slow. Users are strongly encouraged to use Java Advanced Imaging's operations after reading in order to scale data as they see fit. The example below reformats the {@link java.awt.image.DataBuffer#TYPE_FLOAT} data into {@link java.awt.image.DataBuffer#TYPE_BYTE} and changes the grayscale colors to an indexed color model.

 


import {@link javax.media.jai.JAI javax.media.jai.JAI};
import {@link javax.media.jai.ImageLayout javax.media.jai.ImageLayout};
import {@link java.awt.RenderingHints java.awt.RenderingHints};
import {@link java.awt.image.DataBuffer java.awt.image.DataBuffer};
import {@link java.awt.image.IndexColorModel java.awt.image.IndexColorModel};
import {@link java.awt.image.renderable.ParameterBlock java.awt.image.renderable.ParameterBlock};

// Omitting class and method declaration...


/*
 * Prepare the indexed color model. Arrays
 * R, G and B should contains 256 RGB values.
 */
final byte[] R=...
final byte[] G=...
final byte[] B=...
final IndexColorModel colors = new IndexColorModel(8, 256, R,G,B);
final ImageLayout     layout = new ImageLayout().setColorModel(colorModel);
final RenderingHints   hints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout);

/*
 * Rescale the image.   First, all pixels values are transformed using
 * the equation pi=CO+C1*p. Then, type float is clamp to type byte and
 * the new index color model is set.   Displaying such an image should
 * be much faster.
 */
final double C0 = ...
final double C1 = ...
image = JAI.create("Rescale", new ParameterBlock().addSource(image).add(new double[]{C1}).add(new double[]{C0}));
image = JAI.create("Format",  new ParameterBlock().addSource(image).add(DataBuffer.TYPE_BYTE), hints);
org.geotools.image.io.metadata package org.geotools.image.io.metadata Geographic informations encoded in images as metadata.

This package defines a {@link org.geotools.image.io.metadata.GeographicMetadataFormat geographic metadata format} which is aimed as image format neutral. The metadata format defines a structure for a tree of nodes in a way similar to the way methods are defined in GeoAPI interfaces. For example it defines a {@code "CoordinateReferenceSystem"} node with {@code "CoordinateSystem"} and {@code "Datum"} child nodes.

The {@link org.geotools.image.io.metadata.GeographicMetadata} class contains convenience methods for encoding metatadata. Metadata are usually given as {@link java.lang.String} or {@code double} attributes only, but image readers can optionaly attach fully constructed GeoAPI objects if they wish. If only {@link java.lang.String} and {@code double} are used, then the duty to create GeoAPI objects from them incomb to the {@link org.geotools.coverage.io} package.

org.geotools.image.io.netcdf package org.geotools.image.io.netcdf {@linkplain javax.imageio.ImageReader Image readers} for the NetCDF format. The default implementation assumes that the NetCDF files follow the CF Metadata conventions.
org.geotools.image.io.stream package org.geotools.image.io.stream Services provider for {@linkplain javax.imageio.stream.ImageInputStream image input streams}. This package adds a service provider for creating input stream from URL. The default service provider assumes no {@linkplain java.net.Proxy proxy}.

This package should not be used directly, since providers are declared in the {@code META-INF/services/} directory.

org.geotools.image.io.text package org.geotools.image.io.text Extensions to {@link javax.imageio.ImageReader} for ASCII files.

The gt2-imageio.jar file declares a service provider for the following image readers:

{@link javax.imageio.ImageReader} subclass Name MIME type
{@link org.geotools.image.io.RawBinaryImageReader} raw image/raw
{@link org.geotools.image.io.text.TextMatrixImageReader} matrix text/matrix
{@link org.geotools.image.io.text.TextRecordImageReader} gridded records text/x-grid

Example: a user may want to read an ASCII file containing gridded elevation on the ocean floor (left side below). The {@link org.geotools.image.io.TextRecordImageReader} class can read such file, detect automatically minimum and maximum values (in order to scale the grayscale palette) and produce the image below:

Longitude Latitude Altitude
59.9000   -30.0000   -3022
59.9333   -30.0000   -3194
59.9667   -30.0000   -3888
60.0000   -30.0000   -3888
45.0000   -29.9667   -2502
45.0333   -29.9667   -2502
45.0667   -29.9667   -2576
45.1000   -29.9667   -2576
45.1333   -29.9667   -2624
45.1667   -29.9667   -2690
45.2000   -29.9667   -2690
45.2333   -29.9667   -2692
45.2667   -29.9667   -2606
45.3000   -29.9667   -2606
45.3333   -29.9667   -2528
etc...
org.geotools.image.jai package org.geotools.image.jai A set of Java Advanced Imaging operations. All operations defined here work on J2SE's {@linkplain java.awt.image.RenderedImage rendered images}; there is no OpenGIS's {@linkplain org.opengis.coverage.grid.GridCoverage grid coverage} depencencies here.

The JAI operations provided in this package should be registered automatically at JAI startup time, since they are declared in the {@code META-INF/registryFile.jai} file. However, this default JAI mechanism may fail in some occasions, for example when the Geotools JAR file is unreachable from the JAI class loader. In such case, the {@link org.geotools.image.jai.Registry#registerGeotoolsServices registerGeotoolsServices} method may be invoked programmatically as a fallback. This is done automatically by the {@link org.geotools.coverage.processing} package; users need to care only if they want to use directly the custom JAI operations provided in this package.

org.geotools.index
org.geotools.index.quadtree
org.geotools.index.quadtree.fs
org.geotools.index.rtree
org.geotools.index.rtree.cachefs
org.geotools.index.rtree.database
org.geotools.index.rtree.database.mysql
org.geotools.index.rtree.fs
org.geotools.index.rtree.memory
org.geotools.io package org.geotools.io Extensions to standard {@link java.io.Reader} and {@link java.io.Writer}. Classes provided in this package are filters for expanding the tab character ('\t'). Replaces various EOL characters with the platform-dependent one, etc.
org.geotools.map package org.geotools.map List of layers to be rendered.
org.geotools.map.event package org.geotools.map.event A set of events fired by map interfaces.
org.geotools.math Package org.geotools.math A set of mathematical objects and algebraic utilities.

 

References
org.geotools.maven
org.geotools.maven.taglet Javadoc taglets for processing custom tags in Geotools source code comments.
org.geotools.maven.tools package org.geotools.maven.tools Contains helper tools for managing Geotools code base. Those tools are not Maven plugins, but are used for managing the code source (e.g. {@link org.geotools.maven.tools.CommentUpdater}) or for managing snaptshot releases on some servers.
org.geotools.maven.xmlcodegen
org.geotools.maven.xmlcodegen.templates
org.geotools.measure package org.geotools.measure Measures (like {@linkplain org.geotools.measure.Angle angles}) and their formatter.
org.geotools.metadata package org.geotools.metadata Root package for various metadata implementations. This root package is not linked to any particular metadata standard. It assumes that a standard is defined through a set of Java interfaces (for example {@link org.opengis.metadata}) and uses reflection for performing basic operations like comparaisons and copies.

Possible metadata implementations (already available or planed in a future Geotools version) are:

  • {@link org.geotools.metadata.iso}: concrete implementation of ISO interfaces, including ISO 19115.

  • {@code org.geotools.metadata.dublin}: concrete implementation of Dublin core interfaces. Not yet implemented.

  • {@link org.geotools.metadata.sql}: implementation of metadata interfaces backed by a SQL database. The metadata interfaces doesn't need to be ISO ones, which is why this package is not a sub-package of the ISO's one.

  • {@code org.geotools.metadata.xml}: implementation of metadata interfaces backed by a XML files. The metadata interfaces doesn't need to be ISO ones, which is why this package is not a sub-package of the ISO's one. Not yet implemented.

org.geotools.metadata.iso package org.geotools.metadata.iso {@linkplain org.geotools.metadata.iso.MetaDataImpl Metadata} implementation. An explanation for this package is provided in the {@linkplain org.opengis.metadata OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.
org.geotools.metadata.iso.citation package org.geotools.metadata.iso.citation {@linkplain org.geotools.metadata.iso.citation.CitationImpl Citation} implementation. An explanation for this package is provided in the {@linkplain org.opengis.metadata.citation OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.
org.geotools.metadata.iso.constraint package org.geotools.metadata.iso.constraint {@linkplain org.geotools.metadata.iso.constraint.ConstraintsImpl Constraints} implementation. An explanation for this package is provided in the {@linkplain org.opengis.metadata.constraint OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.
org.geotools.metadata.iso.content package org.geotools.metadata.iso.content {@linkplain org.geotools.metadata.iso.content.ContentInformationImpl Content information} implementation. An explanation for this package is provided in the {@linkplain org.opengis.metadata.content OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.
org.geotools.metadata.iso.distribution package org.geotools.metadata.iso.distribution {@linkplain org.geotools.metadata.iso.distribution.DistributionImpl Distribution} implementation. An explanation for this package is provided in the {@linkplain org.opengis.metadata.distribution OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.
org.geotools.metadata.iso.extent package org.geotools.metadata.iso.extent {@linkplain org.geotools.metadata.iso.extent.ExtentImpl Extent} implementation. An explanation for this package is provided in the {@linkplain org.opengis.metadata.extent OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.
org.geotools.metadata.iso.identification package org.geotools.metadata.iso.spatial {@linkplain org.geotools.metadata.iso.identification.IdentificationImpl Identification} implementation. An explanation for this package is provided in the {@linkplain org.opengis.metadata.identification OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.
org.geotools.metadata.iso.lineage package org.geotools.metadata.iso.lineage {@linkplain org.geotools.metadata.iso.lineage.LineageImpl Lineage} implementation. An explanation for this package is provided in the {@linkplain org.opengis.metadata.lineage OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.
org.geotools.metadata.iso.maintenance package org.geotools.metadata.iso.maintenance {@linkplain org.geotools.metadata.iso.maintenance.MaintenanceInformationImpl Maintenance information} implementation. An explanation for this package is provided in the {@linkplain org.opengis.metadata.constraint OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.
org.geotools.metadata.iso.quality package org.geotools.metadata.iso.quality {@linkplain org.geotools.metadata.iso.quality.DataQualityImpl Data quality} implementation. An explanation for this package is provided in the {@linkplain org.opengis.metadata.quality OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.
org.geotools.metadata.iso.spatial package org.geotools.metadata.iso.spatial {@linkplain org.geotools.metadata.iso.spatial.SpatialRepresentationImpl Spatial representation} implementation. An explanation for this package is provided in the {@linkplain org.opengis.metadata.spatial OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.
org.geotools.metadata.sql package org.geotools.metadata.sql An implementation of {@linkplain org.opengis.metadata.MetaData Metadata} interfaces fetching the data from an SQL database.
org.geotools.ml
org.geotools.ml.bindings
org.geotools.nature package org.geotools.nature Algorithms related to the observations of natural phenomenons. Most algorithms in this package are derived from empirical measurements; their results are approximative. Algorithms include:
  • Sea water properties (density, sound velocity, fusion temperature, etc.) computed from salinity, temperature and pression using algorithms published by UNESCO.
  • Values relative to earth calendar, like tropical year length.
  • etc.

 

References

Alain Poisson, M.H. Gashoumi and Selim Morcos.
    Salinity and density of seawater: table for high salinities (42 to 50).
    Unesco technical papers in marine science #62 (1991).

Unesco
    International oceanographic tables, volume 4.
    Unesco technical papers in marine science #40 (1987).

Franck J. Millero.
    Solubility of oxygen in sea water in Progress on oceanographic tables and standards 1983-1986.
    Unesco technical papers in marine science #50 (1986) pp.13-14.

Unesco
    The international system of units (SI) in oceanography.
    Unesco technical papers in marine science #45 (1985).

N.P. Fofonoff and R.C. Millard Jr.
    Algorithms for computation of fundamental properties of seawater.
    Unesco technical papers in marine science #44 (1983).


Tropical year length is computed using formula by Laskar (1986). Synodic month length is computed using formula by Chapront-Touze and Chapront (1988). Those formulas was taken from the following adress:
org.geotools.openoffice package org.geotools.openoffice Provides Geotools functionalities as add-ins for OpenOffice.

Compilation and deployment instruction

All {@code XFoo} Java interfaces are generated from IDL files with the same name. As long as {@code XFoo} Java/IDL interfaces are not modified, there is no need for the OpenOffice SDK. But if any {@code XFoo} interface is modified, then steps 1 to 3 below must be done. Steps 5 to 7 are performed by Maven, but are cited here for completness. Step 8 must be executed on the client machine (users can also use the "Tools / Package manager" menu from OpenOffice GUI).

Tool Provided with
idlc OpenOffice SDK
regmerge OpenOffice SDK
javamaker OpenOffice SDK
javap Java SDK
javac Java SDK
jar Java SDK
zip Unix distribution
unopkg OpenOffice suite

 

Required OOo JARs
ridl.jar
unoil.jar
jurt.jar
juh.jar
  1. Compiles the UNO {@code .urd} binary file

    idlc -C -cid -w -I $OO_SDK_HOME/idl org/geotools/openoffice/XReferencing.idl
  2. Compiles the UNO {@code .rdb} registry file

    regmerge geotools.rdb /UCR org/geotools/openoffice/XReferencing.urd
  3. Creates the {@code .class} file for Java interfaces

    javamaker -BUCR -nD -Torg.geotools.openoffice.XReferencing geotools.rdb $OFFICE_PROGRAM_PATH/types.rdb
  4. Derives a {@code .java} source from the {@code .class} file

    javap org.geotools.openoffice.XReferencing

  5. Compiles {@code .java} source files

    javac org/geotools/openoffice/*.java
  6. Creates the {@code .jar} file

    jar -cfm0 openoffice-2.3-SNAPSHOT.jar META-INF/MANIFEST.MF org/geotools/openoffice/*.class
  7. Creates the {@code .pkg} file

    zip -9 geotools.uno.pkg geotools.rdb openoffice-2.3-SNAPSHOT.jar META-INF/manifest.xml

  8. Register the component to OpenOffice

    unopkg add geotools.uno.pkg
org.geotools.ows package org.geotools.ows A placeholder for data objects common to OWS code, such as WMS, WFS, etc.
org.geotools.parameter package org.geotools.parameter {@linkplain org.geotools.parameter.Parameter Parameter} implementation. An explanation for this package is provided in the {@linkplain org.opengis.parameter OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.

The starting point is often {@link org.opengis.parameter.ParameterDescriptorGroup}. Operation implementations need to defines one. Operation usages typically invoke its {@link org.opengis.parameter.ParameterDescriptorGroup#createValue createValue} method and fill the returned object with parameter values. This Geotools package provides the following implementations:

  • {@link org.geotools.parameter.DefaultParameterDescriptorGroup} for the general case.

  • {@link org.geotools.parameter.ImagingParameterDescriptors} for wrappers around {@linkplain javax.media.jai.ParameterListDescriptor Java Advanced Imaging's parameters}.

  • {@link org.geotools.parameter.MatrixParameterDescriptors} for matrix parameters, including the number of rows and columns. The total number of parameters in this group vary according the number of rows and columns.

org.geotools.po
org.geotools.po.bindings
org.geotools.referencing package org.geotools.referencing {@linkplain org.geotools.referencing.AbstractReferenceSystem Reference systems} implementation. An explanation for this package is provided in the {@linkplain org.opengis.referencing OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.

This package provides implementations for general positioning, coordinate reference systems (CRS), and coordinate transformations. Coordinates can have any number of dimensions. So this implementation can handle 2D and 3D coordinates, as well as 4D, 5D, etc.

This package provides a special implementation of {@linkplain org.geotools.referencing.NamedIdentifier identifier}, which is also a {@linkplain org.opengis.util.GenericName generic name}. By implementing those two interfaces, it is possible to use the same kind of object for specifying both the {@linkplain org.geotools.referencing.AbstractIdentifiedObject#getName main identifier} and the {@linkplain org.geotools.referencing.AbstractIdentifiedObject#getAlias aliases} of an {@linkplain org.geotools.referencing.AbstractIdentifiedObject identified object}.

All factory methods are capable to find an object using an unscoped (or local) name. However, in order to avoid potential conflict, it is recommanded to use scoped name when possible. For example even if both can work, prefer "EPSG:9624" instead of "9624" for the affine transform in order to avoid potential conflict with an other authority using the same code number.

Command-line tools

A set of command lines tools is provided for performing queries. The tools are implemented in the main method of some key classes. The tools are:

{@link org.geotools.referencing.FactoryFinder#main FactoryFinder}  Lists registered factories found in the class path (not only Geotools implementations).
{@link org.geotools.referencing.operation.DefaultMathTransformFactory#main DefaultMathTransformFactory}  Lists registered math transforms found in the class path.
{@link org.geotools.referencing.CRS#main CRS}  Prints some informations about objects specified by their authority codes.
{@link org.geotools.referencing.Console Console}  A command-line tool for testing transformations.
org.geotools.referencing.crs package org.geotools.referencing.crs {@linkplain org.geotools.referencing.crs.AbstractCRS Coordinate reference systems} implementation. An explanation for this package is provided in the {@linkplain org.opengis.referencing.crs OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.

{@link org.geotools.referencing.crs.AbstractCRS} is the base class for all coordinate reference systems (CRS). CRS can have an arbitrary number of dimensions. Some are two-dimensional (e.g. {@link org.geotools.referencing.crs.DefaultGeographicCRS GeographicCRS} and {@link org.geotools.referencing.crs.DefaultProjectedCRS ProjectedCRS}), while some others are one-dimensional (e.g. {@link org.geotools.referencing.crs.DefaultVerticalCRS VerticalCRS} and {@link org.geotools.referencing.crs.DefaultTemporalCRS TemporalCRS}). Those simple coordinate systems can be used as building blocks for more complex coordinate reference systems. For example, it is possible to construct a three-dimensional CRS with (latitude, longitude, time) with an aggregation of {@link org.geotools.referencing.crs.DefaultGeographicCRS GeographicCRS} and {@link org.geotools.referencing.crs.DefaultTemporalCRS TemporalCRS}. Such aggregations are built with {@link org.geotools.referencing.crs.DefaultCompoundCRS CompoundCRS}.

org.geotools.referencing.cs package org.geotools.referencing.cs {@linkplain org.geotools.referencing.cs.AbstractCS Coordinate systems} implementation. An explanation for this package is provided in the {@linkplain org.opengis.referencing.cs OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.

Geotools provides some convenience methods for fetching specific coordinate values in standard units. For example the {@link org.geotools.referencing.cs.DefaultEllipsoidalCS} class provides a {@link org.geotools.referencing.cs.DefaultEllipsoidalCS#getLongitude getLongitude} method that returns the longitude value in a given set of coordinates. This convenience method free the user from the task of finding which axis is for the longitude, and performing unit conversion.

org.geotools.referencing.datum package org.geotools.datum {@linkplain org.geotools.referencing.datum.AbstractDatum Datum} implementation. An explanation for this package is provided in the {@linkplain org.opengis.referencing.datum OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.

Extensions to OpenGIS API

Convenience methods were added to the {@linkplain org.geotools.referencing.datum.DefaultEllipsoid default ellipsoid} class in order to compute orthodromic distance.

org.geotools.referencing.example
org.geotools.referencing.factory package org.geotools.referencing.factory Base classes for {@linkplain org.opengis.referencing.Factory factories} and {@linkplain org.opengis.referencing.AuthorityFactory authority factories}.
org.geotools.referencing.factory.epsg package org.geotools.referencing.factory.epsg {@linkplain org.opengis.referencing.AuthorityFactory Authority factories} for the EPSG database.

EPSG codes are numerical identifiers. For example "4326" is the EPSG identifier for the "WGS 84" geographic CRS. However, the default implementation accepts names as well as numeric identifiers. For example "NTF (Paris) / France I" and {@code "27581"} both fetchs the same object. Note that names may be ambiguous since the same name may be used for more than one object. This is the case of "WGS 84" for example. If such an ambiguity is found, an exception will be thrown.

An EPSG authority factory is created using the following code:

{@linkplain org.opengis.referencing.crs.CRSAuthorityFactory} factory = {@linkplain org.geotools.referencing.ReferencingFactoryFinder}.getCRSAuthorityFactory("EPSG", null);

This package provides the general framework for accessing an EPSG database, but the actual connection to a database requires the existence of an EPSG plugin in the classpath. Otherwise, a {@link org.geotools.factory.FactoryNotFoundException} will be thrown. Available plugins are:

Required software Data source Plugin / JAR file Additional notes
MS-Access ODBC driver {@link org.geotools.referencing.factory.epsg.FactoryOnAccess} {@code epsg-access} See installation instructions
HSQL embedded database {@link org.geotools.referencing.factory.epsg.FactoryOnHSQL} {@code epsg-hsql} Note for module mainteners
PostgreSQL database {@link org.geotools.referencing.factory.epsg.FactoryOnPostgreSQL} {@code epsg-postgresql} Note for module mainteners
org.geotools.referencing.factory.wms package org.geotools.referencing.factory.wms Provides {@linkplain org.opengis.referencing.crs.CoordinateReferenceSystem coordinate reference systems} specified in the Web Map Service specification (ISO 19128). This include:

  • {@code CRS} space
  • {@code AUTO2} space: automatic projections (dynamic projections) based on code and location:
    • {@code AUTO2} projection codes are in the range 42000-42499
    • lon0 and lat0 are central point of the projection
    • The lon0/lat0 are provided by the SRS parameter of the map request.

Those CRS are defined in Annex B (CRS definitions) of ISO 19128 (Web Map Service Implementation Specification).

org.geotools.referencing.operation package org.geotools.referencing.operation {@linkplain org.geotools.referencing.operation.AbstractCoordinateOperation Coordinate operation} implementation. An explanation for this package is provided in the {@linkplain org.opengis.referencing.operation OpenGIS® javadoc}. The remaining discussion on this page is specific to the Geotools implementation.

How to know the available {@linkplain org.opengis.referencing.operation.MathTransform math transforms}

The {@linkplain org.geotools.referencing.operation.DefaultMathTransformFactory math transform factory} search for all math transforms in the class path, not just Geotools implementations. To be found, math transforms must be registered as services in its JAR file, more specifically in the following JAR entry:

META-INF/services/org.geotools.referencing.operation.MathTransformProvider

{@link org.geotools.referencing.operation.DefaultMathTransformFactory} can be run from the command line in order to gets the list of all registered math transform, as in the example below:

java org.geotools.referencing.operation.DefaultMathTransformFactory

This will print a table with the name of all math transforms. If a name from this list is specified as a command-line argument, then the parameters expected by the nammed math transform will be listed. The example below prints the arguments expected by the "Mercator 1SP" map projection:

java org.geotools.referencing.operation.DefaultMathTransformFactory Mercator_1SP

Note that instead of the "Mercator_1SP" argument, alias can be specified as well. For example, "EPSG:9804" or just "9804" will produce the same result than above.

org.geotools.referencing.operation.builder package org.geotools.referencing.operation.builder

A package of convenience classes which use control points common to two data sets to derive empirically the transformation parameters needed to convert positions between the coordinate systems of the two data sets.

Note the implementation is currently (January 2008) limited to two dimensions. The methods, however, are generic and could be expanded to three dimensions someday. At that time, we will probably make minor changes to the API.

The package consists of two types of convenience classes: the various builder classes which use a set of individual control points to obtain the conversion and the GridToEnvelopeMapper class which derives the conversion from a grid range to a georeferenced Envelope.

The builder classes should be used by users who have two data sets that are known to share certain common points but who currently do not line up. This could be the case, for example, if a user has two data sets describing the same region but one of these has an unknown coordinate referencing system. In this situation, there is no way to convert coordinate positions between the two data sets. However, if the user can identify a series of positions coupled in each data set, a Builder can calculate an empirical conversion between the two data sets. The different Builder classes use different mathematical approaches to obtain the empirical estimate.

The GridToEnvelopeMapper should be used by users who have a grid, such as an image, which is not georeferenced but the user knows the grid is aligned in one of the four cardinal directions and the user can identify the outer georeferenced envelope of the grid. The Mapper class can then calculate an empirical conversion object to map positions in the image coordinate system to georeferenced positions.

The builder classes require a matched set of known positions, one from a "source" data set and another from a "target" data set; the builder will then provide a structure which contains a conversion object to transform positions from the "source" coordinate system to the "target" coordinate system. The builders require a list of {@linkplain org.geotools.referencing.operation.builder.MappedPosition MappedPosition} objects which are associations of a {@linkplain org.opengis.referencing.DirectPosition DirectPosition} in the "source" data set with another DirectPosition in the "target" data set. The {@linkplain org.geotools.referencing.operation.builder.MathTransformBuilder#getTransformation() getTransformation() method} in the builder can then be used to provide a {@linkplain org.opengis.referencing.operation.Transformation Transformation} object from which the user can obtain the {@linkplain org.opengis.referencing.operation.MathTransform MathTransform} to use for conversion operations.

Different builders use different mathematical approaches for obtaining the empirical estimate of the conversion parameters. The builders are:

  • {@linkplain org.geotools.referencing.operation.builder.ProjectiveTransformBuilder ProjectiveTransformBuilder}
  • {@linkplain org.geotools.referencing.operation.builder.AffineTransformBuilder AffineTransformBuilder}
  • {@linkplain org.geotools.referencing.operation.builder.SimilarTransformBuilder SimilarTransformBuilder}
  • {@linkplain org.geotools.referencing.operation.builder.BursaWolfTransformBuilder BursaWolfTransformBuilder}
  • {@linkplain org.geotools.referencing.operation.builder.RubberSheetBuilder RubberSheetBuilder}
with the mathematical details of each estimation procedure explained in the documentation of the builder class itself. The first four of these use a least squares estimation method in which, if the system is over-determined by having more than the minimum number of control points necessary to derive the estimate, the best matching parameter estimate will be obtained by minimising the sum of the squared distances to the points. The RubberSheet algorithm uses a linear interpolation between the various control points.

org.geotools.referencing.operation.matrix package org.geotools.referencing.operation.matrix Matrix implementations on top of the {@link javax.vecmath} package.
org.geotools.referencing.operation.projection package org.geotools.referencing.operation.projection Basic implementations of {@linkplain org.geotools.referencing.operation.projection.MapProjection map projections}. This package is mostly for internal purpose and should usually not be used directly. Consider using {@link org.opengis.referencing.operation.MathTransformFactory} instead.

Axis units and orientation

Many {@linkplain org.opengis.referencing.crs.GeographicCRS geographic coordinate reference systems} use axis in (latitude,longitude) order, but not all. Axis order, orientation and units are CRS-dependent. For example some CRS use longitude values increasing toward {@linkplain org.opengis.referencing.cs.AxisDirection#EAST East}, while some others use longitude values increasing toward {@linkplain org.opengis.referencing.cs.AxisDirection#WEST West}. The axis order must be specified in all CRS, and any method working with them should take their axis order and units in account.

However, map projections defined in this package are transformation steps, not final CRS. All projections defined in this package must complies with the OGC 01-009 specification. This specification said (quoting section 10.6 at page 34):

Cartographic projection transforms are used by projected coordinate reference systems to map geographic coordinates (e.g. Longitude and Latitude) into (X,Y) coordinates. These (X,Y) coordinates can be imagined to lie on a plane, such as a paper map or a screen. All cartographic projection transforms will have the following properties:

  • Converts from (Longitude, Latitude) coordinates to (X,Y).
  • All angles are assumed to be decimal degrees, and all distances are assumed to be meters.
  • The domain should be a subset of {[-180,180)×(-90,90)}.

Although all cartographic projection transforms must have the properties listed above, many projected coordinate reference systems have different properties. For example, in Europe some projected coordinate reference systems use grads instead of decimal degrees, and often the base geographic coordinate reference system is (Latitude, Longitude) instead of (Longitude, Latitude). This means that the cartographic projected transform is often used as a single step in a series of transforms, where the other steps change units and swap ordinates.

The Geotools implementation extends this rule to axis directions as well, i.e. (X,Y) coordinates must be ({@linkplain org.opengis.referencing.cs.AxisDirection#EAST East}, {@linkplain org.opengis.referencing.cs.AxisDirection#NORTH North}) orientated. This rule implies a non-intuitive behavior for the Transverse Mercator South Orientated projection, which still projects coordinates with Y values increasing toward North. The real axis flip is performed by the rest of the CRS framework upon {@linkplain org.opengis.referencing.cs.CoordinateSystemAxis coordinate system axis} inspection. In order to get a real South orientated projection, the cartographic transform must be concatenated with an affine transform. This is done automatically if the {@linkplain org.opengis.referencing.crs.ProjectedCRS projected CRS} is created with the Geotools's {@link org.geotools.referencing.factory.FactoryGroup#createProjectedCRS createProjectedCRS} convenience method with a South orientated {@linkplain org.opengis.referencing.cs.CoordinateSystem coordinate system} in argument.

In order to reduce the risk of confusion, this package never defines south orientated {@link org.geotools.referencing.operation.projection.MapProjection} implementations. The providers always create south-orientated projections as a concatenation of their north-orientated variants with an affine transform. This approach removes all ambiguity when reading a transform in Well Known Text (WKT) format, since only the north-orientated variant is used and the affine transform coefficients tell exactly which axis flips are applied.

org.geotools.referencing.operation.transform package org.geotools.referencing.operation.transform Basic implementations of {@linkplain org.geotools.referencing.operation.transform.AbstractMathTransform math transforms}. This package is mostly for internal purpose and should usually not be used directly. Consider using {@link org.opengis.referencing.operation.MathTransformFactory} instead.
org.geotools.referencing.wkt package org.geotools.referencing.wkt Well Known Text (WKT) parsing and formatting.
org.geotools.renderer package org.geotools.renderer Basic interface for rendering of features. Rendering is the union of {@link org.geotools.feature.Feature} and {@link org.geotools.styling.Style} targeted toward a rendering device (e.g. {@link java.awt.Graphics2D}).
org.geotools.renderer.lite package org.geotools.renderer.lite A simple renderer implementation. It's supposed to be as simple as possible, thus easy to understand at the source level, and to use as few memory as possible. Should be used when memory is a constraint and/or when the rendering is stateless (that is, the application is not an interactive viewer that displays the same map more than once). In the latter case, a renderer that uses more memory but avoids recomputing map rendering details is to be preferred.
org.geotools.renderer.lite.gridcoverage2d
org.geotools.renderer.shape
org.geotools.renderer.shape.shapehandler.jts
org.geotools.renderer.shape.shapehandler.simple
org.geotools.renderer.style package org.geotools.renderer.style Styling to be applied on {@link org.geotools.renderer.geom.Geometry} objects at rendering time.
org.geotools.resources package org.geotools.resources A set of helper classes for Geotools implementation; Do not use!. This package is for internal use only. Classes in this package may change in incompatible ways in any future version.
org.geotools.resources.coverage
org.geotools.resources.geometry package org.geotools.resources.geometry A set of helper classes for geometry handling in the Geotools implementation; Do not use!. This package is for internal use only. Classes in this package may change in incompatible ways in any future version.
org.geotools.resources.i18n package org.geotools.resources.i18n Localized resources for Geotools.
org.geotools.resources.image package org.geotools.resources.image A set of helper classes for image handling in the Geotools implementation; Do not use!. This package is for internal use only. Classes in this package may change in incompatible ways in any future version.
org.geotools.sld
org.geotools.sld.bindings
org.geotools.styling package org.geotools.styling Allows for symbolization of geospatial data.

For many of us in geotools *this* is the reason we came along for the ride - a pretty picture. The contents of this package are adapted from the OpenGIS® Styled Layer Descriptor specification v1.0.0.

Conformance to SLD 1.0.0

We may experiment with our own (or SLD 1.1) ideas but will mark such experiments for you. This is only an issue of you are considering writing out these objects for interoptability with other systems.

General stratagy for supporting multiple SLD versions (and experiments):

  • These interfaces will reflect the current published specification
  • Our implementations will be BIGGER and more capabile then any one specification
  • We cannot defined explicit interfaces tracking each version until we move to Java 5 (perferably GeoAPI would hold these anyways)
  • We can provided javadocs indicating extentions, and isolate these using the normal java convention: TextSymbolizer and TextSymbolizer2 (In short you will have to go out of your way to work with a hack or experiment, you won't depend on one by accident)
  • We can use Factories (aka SLD1Factory and SLD1_1Factory and SEFactory) to support the creation of conformant datastructures. Code (such as user interfaces) can be parameratized with these factories when they need to confirm to an exact version supported by an individual service. We hope that specifications are always adative, and will be forced to throw unsupported exceptions when functionality is removed from a specification.

Care and Feeding of Style Objects

SLD is an XML specification, the definition of objects capturing this information, the binding of objects to these XML documents, and the provision of events on object modification all need to be accounted for.

StyleFactory

As with all geotools work construction of styling constructs is handled by a Factory(GOF). Quickly a Factory is used when working with interfaces, anything that would of been a constructor is set up as an create method.

  StyleFactory factory = StyleFactoryFinder.createStyleFactory();
  StyleLayerDescriptor sld = factory.createStyleLayerDescriptor();
  // an empty sld document
  sld.setTitle("Basic Black");
  sld.setAbstract("Grayscale style suitable for use with photocopiers");
  
  

When creating a complex data structure direct use of a Factory is a pain. Which leads us to the next section.

Notes:

  • At this time one implementation of StyleFactory is available, this will not provide true in the future (as SLD experiments, and code generation are brought to bare on future specifications).

StyleBuilder

When constructing a complex data structure, such as an SLD document, the use of a Factory is a bit of a pain. That is where StyleBuilder is brought to bare. A Builder is simply a class that help you construct a complicated data structure, for a make involved/interesting example of a builder have a look at the graph package.


  
  

Example

The following code example has been borrowed from the geotools website, for additional examples (and advice) please consult the user documentation.


    private Style buildStyle() throws Exception {
        StyleBuilder sb = new StyleBuilder();
        FilterFactory ff = sb.getFilterFactory();
        Style style = sb.createStyle();
        style.setName("MyStyle");

        // "testPoint" feature type style
        Mark testMark = sb.createMark(sb.attributeExpression("name"),
                sb.createFill(Color.RED, 0.5), null);
        Graphic graph = sb.createGraphic(null, new Mark[] { testMark }, null,
                sb.literalExpression(1), sb.attributeExpression("size"),
                sb.attributeExpression("rotation"));
        style.addFeatureTypeStyle(sb.createFeatureTypeStyle("testPoint",
                new Symbolizer[] { sb.createPointSymbolizer(graph) }));

        // "labelPoint" feature type style
        AnchorPoint anchorPoint = sb.createAnchorPoint(sb.attributeExpression("X"),
                sb.attributeExpression("Y"));
        PointPlacement pointPlacement = sb.createPointPlacement(anchorPoint, null,
                sb.literalExpression(0));
        TextSymbolizer textSymbolizer = sb.createTextSymbolizer(sb.createFill(Color.BLACK),
                new Font[] { sb.createFont("Lucida Sans", 10), sb.createFont("Arial", 10) },
                sb.createHalo(), sb.attributeExpression("name"), pointPlacement, null);
        Mark circle = sb.createMark(StyleBuilder.MARK_CIRCLE, Color.RED);
        Graphic graph2 = sb.createGraphic(null, circle, null, 1, 4, 0);
        PointSymbolizer pointSymbolizer = sb.createPointSymbolizer(graph2);
        style.addFeatureTypeStyle(sb.createFeatureTypeStyle("labelPoint",
                new Symbolizer[] { textSymbolizer, pointSymbolizer }));

        return style;
    }

References

The following links will be of interest:
  • SLD 1.0.0
  • Design Patterns, GOF
@author Ian Turton, CCG @author James Macgill, CCG @author Jody Garnett, Refractions Research @since GeoTools 2.0 @version SLD 1.0
org.geotools.styling.visitor
org.geotools.svg
org.geotools.test package org.geotools.test A set of helper classes for Geotools tests. This package is for internal use only. Classes in this package may change in incompatible ways in any future version.
org.geotools.text.filter package org.opengis.filter.cql

Common Query Language (CQL)

This package implements the OGC_Common Catalogue Query Language. OGC CQL is the query language to be supported by all OGC Catalogue Interfaces in order to support search interoperability. Catalogue Service Implementation Specification (OGC 04-021r3):

CQL BNF with SQL Extensions

The original BNF was extended thinking in a SQL where expression. The original BNF is reproduced to indicate the extensions highlighted with bold characters.

Extensions in original BNF

    <between predicate> ::= 
    		<attribute name> [ NOT ] BETWEEN <literal> AND < literal > 
	
    <routine invocation> ::= 
             <geoop name><georoutine argument list>
           | <relgeoop name><relgeoop argument list>
           | <routine name><argument list>
           | <BBOX> <bbox argument list>	
           
    <geoop name> ::= 
           EQUAL | DISJOINT | INTERSECT | TOUCH | CROSS | 
           WITHIN | CONTAINS |OVERLAP | RELATE [1]
      
    <bbox argument list>::= 
       "(" <attribute> ","<min X> ","<min Y> ","<max X> ","<max Y>["," <crs>] ")"
    <min X> ::= <signed numerical literal> 
    <min Y> ::= <signed numerical literal> 
    <max X> ::= <signed numerical literal> 
    <max Y> ::= <signed numerical literal>
    <crs> ::= [2]  
      
      
    [1] RELATE is not supported (implementation in GeoTools is required)
    [2] If not supplied, the BoundingBox CRS is EPSG:4326.

    

Implementation Notes

The parser was generated using javacc. In expr.jjt file you can see the input grammar for javacc required to parse CQL with extensions.

This implementation does not check CRS. The problem can be solved adding tokens (standards simbols in grammar) or checking in semantic actions consturction (FilterBuilder). The last solution requires to fix a bug retrieved the correspondent factory for crs (srs).

org.geotools.util package org.geotools.util Contains utilities and addition to the collection framework. Some classes implements the {@link java.util.Set} interface and provides facilities for mutually exclusive set, caching or handling ranges of values.
org.geotools.util.logging package org.geotools.util.logging Extensions to the {@linkplain java.util.logging Java logging} framework. The GeoTools project uses the standard {@link java.util.logging.Logger} API for its logging, but this package allows redirection of logs to some other frameworks like Log4J.

All GeoTools code should fetch their logger through a call to {@link org.geotools.util.logging.Logging#getLogger(String)}, not {@link java.util.logging.Logger#getLogger(String)}. This is necessary in order to give GeoTools a chance to redirect log events to an other logging framework.

org.geotools.validation Validation Package Defines the Validation Processor and Support classes.

The Validation Process is defined separately from GeoServer so that it may be reused in the future by other applications.

It is currently lurking in the geotools2 folder in the hopes that when it is finished it may be migrated to the Geotools2 library.

This work has been donated by Refractions Research as part of a GeoConnections funded Validating Web Feature Server project.

@see http://vwfs.refractions.net/ @see http://vwfs.refractions.net/docs/Plugin_API.pdf @see http://cgdi.gc.ca/CGDI.cfm
org.geotools.validation.attributes Attribute Validation Simple Attribute based Validation implementations.

This package is used to store simple Attribute based Validation implementations. Many of these will be simple FeatureValidation implementations concerned with enforcing constraints on the attributes of a Feture.

At least a couple IntegrityValidation tests will also be implemented here performing such opperations as ensuring that an attribute is unique for an entire FeatureType.

org.geotools.validation.dto Validation DTO Package Data Transfer Objects for use with the ValidationProcessor.

The Validation Processor set up is provided using Data Transfer Objects from this package. Both the initial loading the initial XML configuration files and the dynamic configuraiton systems are handled using these objects.

The use of Data Transfer Objects allows the Validation package to not depend on either the Persistence Method or the Dyanmic Configuration System.

org.geotools.validation.network
org.geotools.validation.relate
org.geotools.validation.spatial Spatial Validation Geometry based Validation implementations.

This package is used to store simple Geometry based Validation implementations. Many of these will be simple FeatureValidation implementations concerned with limiting the defaultGeometry of a Feature.

At least a couple IntegrityValidation tests will also be implemented here performing such opperations as ensuring the defaultGeometries do not overlap for an entire FeatureType.

The constraints represented by many of these Validation checks are designed to provide similar coverage to the ArcSDE GeoDatabase appliaction. Where possible we have followed a similar naming convention to the ESRI product.

org.geotools.validation.xml GeoServer package

This package contains the functionality required to read and write XML versions of the org.geotools.validation.dto classes.

These classes have dependencies of SAX and DOM parsers as well as some GeoTools XML io functionality.

org.geotools.wms.v1_1_1.bindings
org.geotools.xlink
org.geotools.xlink.bindings
org.geotools.xml
org.geotools.xml.filter package org.geotools.xml.filter The package name does not map the prefix name because we feel that this is a better representation. Further discussion on the topic is warranted.
org.geotools.xml.gml
org.geotools.xml.handlers

Overview

This package provides the necessary tools to parse an XML instance document using the XMLSAXHandler and DocumentFactory. As the document is parsed, and validated, an instance of the ElementHandlerFactory will gather a collection of valid namespaces for the instance document. The ElementHandlerFactory will then use this information to create Complex and Simple Element handlers.

On occation, generic valid data may exist, but that we are unable to fully parse. This content will be ignored using the IgnoreHandler.

The Document Handler is used by the XMLSAXHandler to bootstrap the process of importing schemas and creating handlers.

org.geotools.xml.handlers.xsi

Overview

This package contains information about xml schemas, and processes to create parse and interpret Schema. One of the more important function is the simplification of a Schema into the interface in the xsi package, as well as compressing some of the heirarchy.

These classes should be used by assessing the SchemaFactory.

Future Work / Caveat

Work can be completed on two fronts, improving the compression algorithms for the Schema compression. The second major work for this schema should be to encode the Schema parsing (this package) as a Schema Object, using the document parser to complete the same task through an xsi extension.

Although it was evident early on that these tasks were similar, the exact nature and method of bootstrapping the process was not evident. Converting these classes to a Schema definition similar to GML would simplify the code, making it easier to maintain.

org.geotools.xml.impl
org.geotools.xml.impl.jxpath
org.geotools.xml.ogc
org.geotools.xml.schema

Schema Interfaces

Overview

This package is intended to provide all the necessary interfaces to semantically represent an XML Schema. Some of the concious shortcomings of this interface set include the in-ability to reproduce exact xml schema documents from a schema represented in memory using just these interfaces (some non-essential constructs have been removed/ignored).

Implementors creating instances of this package should refer to the SchemaFactory (org.geotools.gml) to link your implmentation into the parser.

How to make an extension

This is easy to describe, but hard to implement (or rather to test + debug). Essentially you should create a class that implements Schema, and register it with the SchemaFactory. When creating the appropriate Types as part of the Schema (I assume your Schema will have these) you can link extra parsing into the getValue method (see Type Interface).

org.geotools.xml.schema.impl
org.geotools.xml.styling
org.geotools.xml.test
org.geotools.xml.transform
org.geotools.xml.wfs
org.geotools.xml.xLink
org.geotools.xml.xsi
org.geotools.xs

Captures initial mapping of XML Simple Types to Java Objects.

Intended Use

Where possible mappings are in agreement with JAXB and will make use of the same utility classes.

Please consider the following reference matterial:

The Big Picture

org.geotools.xs.bindings

Captures initial mapping of XML Simple Types to Java Objects.

Intended Use

Where possible mappings are in agreement with JAXB and will make use of the same utility classes.

Please consider the following reference matterial:

The Big Picture

org.geotools.xs.facets

Captures initial mapping of XML Simple Types to Java Objects.

Intended Use

Where possible mappings are in agreement with JAXB and will make use of the same utility classes.

Please consider the following reference matterial:

The Big Picture

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.