jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • GeoTools
  • GEOT-428

Create a EPSGFactory subclass for factory generated by EPSG's SQL scripts

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Task Task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.1.M3
  • Fix Version/s: 2.1.M4
  • Component/s: referencing
  • Labels:
    None

Description

EPSG primary database is in MS-Access format. The EPSG organisation (http://www.epsg.org) also provides some scripts in standard SQL for generating EPSG database on other platforms (PostgreSQL, MySQL, etc.). Unfortunatly, there is two differences:

1) SQL statements for Access required some special syntax
like the bracket for table name, as in [Coordinate Operation]
(the standard SQL syntax would be to use quotes instead of
brackets: "Coordinate Operation").

2) The table names are not the same. They are all lower-cases
in SQL scripts, with all blank removed. Furthermore, an
"epsg_" prefix were added. The example above gives something
like "epsg-coordinateoperation".

Fortunatly, it seems to be possible to modify the SQL statements in an automatic way (no need to rewrite them all). In the MS-Access EPSGFactory implementation, we made sure that all table names and only table names are between brackets. Concequently, SQL translations could be performed automatically in an automatic maner (EPSGFactory already provides a hook for that, the 'adaptSQL' method to be overriden):

public class FactoryForSQL extends EPSGFactory {
protected String adaptSQL(String sql) { // Search for brackets. // Inside brackets, remove spaces. Append the "epsg_" // prefix and finally removes the brackets. Returns the // result. }
}

And test. Hopefully, it should work.

Issue Links

depends upon

Task - A task that needs to be done. GEOT-176 Port the EPSG Authority Factory to the new GeoAPI interfaces

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.
is depended upon by

Wish - General wishlist item GEOT-46 Provides EPSG data in a java embedded database

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • History
  • Activity
Hide
Permalink
Martin Desruisseaux added a comment - 15/Feb/05 4:38 AM
Just realized that this code already exists in the legact org.geotools.cs framework. Since the only work needed is refactoring, I will do it.
Show
Martin Desruisseaux added a comment - 15/Feb/05 4:38 AM Just realized that this code already exists in the legact org.geotools.cs framework. Since the only work needed is refactoring, I will do it.
Hide
Permalink
Martin Desruisseaux added a comment - 16/Feb/05 8:33 PM
Code ported from the legacy org.geotools.cs.CoordinateSystemEPSGModifiedFactory. The new class name is FactoryForSQL in the org.geotools.referencing.factory.epsg package. The new code has not yet been tested however.
Show
Martin Desruisseaux added a comment - 16/Feb/05 8:33 PM Code ported from the legacy org.geotools.cs.CoordinateSystemEPSGModifiedFactory. The new class name is FactoryForSQL in the org.geotools.referencing.factory.epsg package. The new code has not yet been tested however.
Hide
Permalink
Martin Desruisseaux added a comment - 15/Jun/05 9:43 PM
Tested with epsg-hsql plugin.
Show
Martin Desruisseaux added a comment - 15/Jun/05 9:43 PM Tested with epsg-hsql plugin.

People

  • Assignee:
    Martin Desruisseaux
    Reporter:
    Martin Desruisseaux
Vote (0)
Watch (0)

Dates

  • Created:
    14/Feb/05 8:57 PM
    Updated:
    15/Jun/05 9:43 PM
    Resolved:
    16/Feb/05 8:33 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.