Motivation:

Be consistent about parsing.

Contact:

Jody Garnett

Tracker:

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

Tagline:

lexify this (bad object pun)

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

Description

We have both some text parsing (CQL and WKT) and XML parsing (filter, gml) incoming. This proposal outlines how we can be consistent in terms of package structure.

How can we be consistent:

  1. Make a "default" useful parser available as a utility class
  2. Hide details in a parser package (that casual users do not need to import)
  3. Be consistent with package names (not sure how to handle version differences)

Of the format org.geotools.SUBJECT.PARSER.SPECIFICATION:

  • SUBJECT - is the output being produced (ie style, geometry, referencing, feature, filter, etc...)
  • PARSER - is the kind of "input" being considered (ie text or xml )
  • SPECIFICATION - (optional) if you need to get more specific on the kind of "input" you can quote the specification here.

Please note this is for the gory details only; your users should not have to import anything from these packages. You may be stuck making some of the content public (especially for XML callbacks) - but none of your example/user code should be forced into an import.

Module breakdown of xml binding plugins is not in scope - we would need a seperate proposal.

Status

Voting in process - closes April 2nd.

Discussed on the email list and in a weekly IRC meeting ( 2007/03/19/IRC Meeting - 19 March 2007).

Votes are currently being collected:

It would be nice to have this approved this week so the work can be in the release
this month.

{dynamictasklist:Impediments}{dynamictasklist}

Resources

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-M1

 

 

(tick)

Move cql to library

 

(tick)

Added org.geotools.geometry.WKTParser

 

 

 

 

(tick)

test and release

 

(tick)

update documentation

Milestone 2

2.5-M1

 

 

 

 

 

 

 

 

 

 

 

 

test and release

 

 

update documentation

Milestone 3

2.5.0

 

 

 

verify user documentation

 

 

include in release

API Changes

BEFORE

This change introduces new API:

public void exampleMethod( ... ){
     Point point = primitiveFactory.createPoint( 32.0, 32.0 );
}

AFTER

import org.geotools.geometry.iso.Spatial;

// holds the WKT parser but is not needed by client code
// import org.geotools.geometry.text.wkt 

/**
 * Note geometryFactory includes CRS information already
 */
public void exampleMethod( ... ){
    Spatial spatial = new Spatial( geometryFactory, primitiveFactory, positionFactory );
    Point = (Point) Spatial.parseWKT( "POINT 32 32" );
}

Documentation Changes

Website:

Developers Guide:

User Guide:

User Manual:

Issue Tracker: