com.partnersoft.geometry.projection
Class Nad2Nad

java.lang.Object
  extended by com.partnersoft.geometry.projection.Nad2Nad
All Implemented Interfaces:
Singleton

public class Nad2Nad
extends java.lang.Object
implements Singleton

Ported, copied, and outright stolen (legally!) from proj. See cleanslate/tools/nad2bin.py for the tool to make the regions file.

Copyright 2004-2009 Partner Software

Version:
$Id: Nad2Nad.java 2025 2009-08-17 02:31:50Z paul $
Author:
Russell Cagle

Method Summary
 Point nad27ToNad83(double longitudeDegrees, double latitudeDegrees)
           Synchronized because the Packrat reader it uses is not thread-safe (I think?).
 Point nad83ToNad27(double longitudeDegrees, double latitudeDegrees)
           Synchronized because the Packrat reader it uses is not thread-safe (I think?).
static Nad2Nad singleton()
           This is synchronized because it can get called from the GPS device thread and the GUI thread, and there is a race condition where both threads see that instance is null and initialize it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

singleton

public static Nad2Nad singleton()

This is synchronized because it can get called from the GPS device thread and the GUI thread, and there is a race condition where both threads see that instance is null and initialize it. The double initialization was causing some strange errors. You wanna see the errors? You wanna know what they are? You can't handle them. They are too much. Too, too much.

Returns:

nad27ToNad83

public Point nad27ToNad83(double longitudeDegrees,
                          double latitudeDegrees)

Synchronized because the Packrat reader it uses is not thread-safe (I think?).

Parameters:
longitudeDegrees -
latitudeDegrees -
Returns:

nad83ToNad27

public Point nad83ToNad27(double longitudeDegrees,
                          double latitudeDegrees)

Synchronized because the Packrat reader it uses is not thread-safe (I think?).

Parameters:
longitudeDegrees -
latitudeDegrees -
Returns: