Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Motivation:

Use of an EPSG Authority implementation in a Java EE environment

Contact:

Jody Garnett

Tracker:

http://jira.codehaus.org/browse/GEOT-1219

Tagline:

Excerpt

Publish / Find / Bind for EPSG Authority

This page represents the current plan; for discussion please check the tracker link above.

Description

Use of an EPSG Authority implementation in a Java EE container.

  • Need to supply a Hint that an EPSG Authority can use to look up a DataSource using JNDI
  • Create seperate EPSGAuthorityFactory for this use

Status

Initial research completed J2EE and Connection Pools, this first proposal only touches on the use of data source with respect to EPSG Authority.

Section
Column
width60%

This proposal was reviewed and accepted:

Column
Wiki Markup
{dynamictasklist:Impediments}{dynamictasklist}

Resources

Section
Column
width60%
Attachments
uploadtrue
Column
Children Display

Tasks

 

no progress

(tick)

done

(error)

impeded

(warning)

lack mandate/funds/time

(question)

volunteer needed

A target release is also provided for each milestone.

Milestone 1

2.4-M2

 

 

Jody Garnett

Initial Implementation for oracle-epsg

 

Jody Garnett

Testing and review

Milestone 2

2.5-M1

 

 

Jody Garnett

test and release

 

Jody Garnett

update documentation

Milestone 3

2.5.0

 

 

 

verify user documentation

 

 

include in release

API Changes

Before this change GeoTools relies on a javadoc comment - to wit: use of the the hard coded JNDI look up String "epsg/authority".

This change involves the introduction of a new Hint to control the lookup string used.

Code Block
class Hints {

    /**
     * The {@link org.opengis.referencing.crs.CRSAuthorityFactory} instance to use.
     * 
     * @see org.geotools.referencing.FactoryFinder#getCRSAuthorityFactory
     */
    public static final Key CRS_DATASOURCE = new Key(
            "org.opengis.referencing.cra.datasource");
...
}

BEFORE

This functionality was based on a documented behaviour - previously the JDBC EPSG Authority implementations would be connected based on:

  • which one was included in the classpath
  • lookup of "epsg/authority" in JNDI
Code Block
public CoordinateReferenceSystem acquireCRS(){
    return CRS.decode( "EPSG:4326", hints );
}

For the above to work only a single epsg authority plugin is allowed to be on the class path, for example "epsg-postgres".

AFTER

We expect the following to work regardless of which epsg authority plugins are included on the classpath.

Code Block
titleExample.java
/**
 * Please note hints will need to be used every time.
 */
public CoordinateReferenceSystem acquireCRS(){
    Hints hints = new Hints();
    hints.add( HINTS.CRS_DATASOURCE, "epsg/authority" );
    return CRS.decode( "EPSG:4326", hints );
}

It appears that we should control the "default" (ie when Hints is null) by use of a System property.

Documentation Changes

Website:

User Guide:

  • Update examples to reflect changes to demo module

Issue Tracker:

  • create a jira to track this proposal
  • update jira when proposal is accepted
  • close created jira when release is made