An Open-Source, Object-Oriented General Cartographic Transformation Program (GCTP) - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

An Open-Source, Object-Oriented General Cartographic Transformation Program (GCTP)

Description:

An Open-Source, Object-Oriented General Cartographic Transformation Program (GCTP) Michael S. Williams, Michael P. Finn*, and Robert A. Buehler** – PowerPoint PPT presentation

Number of Views:152
Avg rating:3.0/5.0
Slides: 19
Provided by: dfd7
Learn more at: https://www.usgs.gov
Category:

less

Transcript and Presenter's Notes

Title: An Open-Source, Object-Oriented General Cartographic Transformation Program (GCTP)


1
An Open-Source, Object-Oriented General
Cartographic Transformation Program (GCTP)
  • Michael S. Williams, Michael P. Finn, and Robert
    A. Buehler
  • United States Geological Survey
  • National Geospatial Technical Operations Center

Presenting author Now with University of
Missouri Rolla, Department of Computer Science
2
Outline
  • Motivation
  • Goals
  • Background
  • Design
  • Class Structure
  • Interface
  • Adding New Projections
  • Conclusions
  • References

3
Motivation
  • Object-Oriented software development popularity
    growing
  • Many existing libraries written in procedural
    languages (C, for example)
  • Many current solutions involve using these
    procedural libraries within object-oriented
    frameworks (i.e. wrapping them)
  • Preferable to have a natively object-oriented
    library to use

4
Goals (Dos and Donts)
  • Dont completely reinvent the wheel
  • Dont just make a wrapper
  • Do use existing algorithms
  • Do make it simple to use
  • Do make it easy to extend

5
Background
  • General Coordinate Transformation Package (GCTP)
  • Originally written in Fortran
  • Later converted to C
  • Still very widely used

6
Background
  • Original GCTP interface very cumbersome.

7
Background
  • Original interface uses 19 parameters!
  • Calling the gctp function results in much
    redundant code execution.
  • How can we improve this?

8
Design
9
Design
  • Simple Design
  • Each supported projection contained in a single
    class.
  • Each object inherits from the base class
    Projection.
  • Projection class provides a common interface.

10
Design
  • Whats old and whats new
  • Old
  • Still supports the use of the 15 element
    projection parameter array.
  • Core projection algorithms exactly the same.
  • New
  • Supports the use of get / set functions to view
    and modify projection parameters.
  • No more 19 parameter function calls!!

11
Design
Parameter Array
Variable Declarations
Output Units
Datum
Object Instantiation
Forward Transformation
Inverse Transformation
12
Design
Setting Parameters
13
Adding New Projections
  • Basic Steps
  • 1.) Derive a new class from Projection
  • 2.) Implement the protected _init(), _forward(),
    and _inverse() functions.
  • 3.) If the new projection uses specific entries
    in the parameter array, implement the
    _loadFromParams() function.

14
Adding New Projections (example)
Constructors
Core Projection Function Declarations
15
Adding New Projections (example)
Transformation results must be stored in
m_x_coord and m_y_coord, which are inherited from
the Projection base class.
16
Adding New Projections (example)
First, a call must be made to the base class
parameter loading function
Here, the UTM specific parameters are pulled from
the parameter array.
Here, the UTM projection class member m_zone is
assigned a value based on the lat/lon values
pulled from the parameter array.
17
Conclusions
  • We have developed an object-oriented version of
    an existing, widely used projection library.
  • We have made this library much easier to use than
    the previous version. We have also made it easy
    to extend.
  • Currently, the library is still in beta testing.
    Further testing needs to be done to check
    projection accuracy.
  • For further information (download available soon
    for the latest version), please visit the
    following website
  • http//carto-research.er.usgs.gov/

18
An Open-Source, Object-Oriented GCTP
http//carto-research.er.usgs.gov/
  • Michael S. Williams, Michael P. Finn, and Robert
    A. Buehler
  • United States Geological Survey
  • National Geospatial Technical Operations Center
Write a Comment
User Comments (0)
About PowerShow.com