JPROJ4
Public Member Functions | Protected Member Functions
Projections Class Referenceabstract

superclass of all the projections the main proj methods are held here More...

Inheritance diagram for Projections:
Inheritance graph
[legend]

Public Member Functions

String getProjInfo ()
 public method to call the native getProjInfo More...
 
String getEllipseInfo ()
 public method to call the native getEllispdInfo More...
 
void printProjInfo ()
 print to standard output the proj info in a nice format More...
 
LinkedHashMap mapProjInfo ()
 return all the proj info into a Linked Hashmap More...
 
abstract void prepareData (ProjectionData dataTP)
 if there is some operation to perform on the input data, this is the right moment (ex. More...
 
abstract void prepareTransformedData (ProjectionData dataTP)
 this takes care that the reprojected data are in the correct format (ex. More...
 

Protected Member Functions

native String getProjInfo (String proj)
 get all the projection informations needed from the projection code (reproduces pj_get_def() of the proj api) More...
 
native String getEllipsInfo (String proj)
 get the ellipsoid parameters from the projection code More...
 
native void transform (double[] firstCoord, double[] secondCoord, double[] values, String srcCodeString, String destCodeString, long pointcount, int pointoffset)
 native call to the reprojections routines of proj More...
 
void doTheTransform (Projections srcProj, ProjectionData dataTP, long point_count, int point_offset)
 do the transform. More...
 
void degreeToRadiant (double[] la, double[] lo)
 transform latitude and longitude from degree to radiant format More...
 
void radiantToDegree (double[] la, double[] lo)
 transform latitude and longitude from radiant to degree format More...
 

Detailed Description

Member Function Documentation

native String getProjInfo ( String  proj)
protected
Parameters
theproj code or options
Returns
the info String
native String getEllipsInfo ( String  proj)
protected
Parameters
theproj code or options
Returns
the info String

Referenced by Projections.getEllipseInfo().

native void transform ( double[]  firstCoord,
double[]  secondCoord,
double[]  values,
String  srcCodeString,
String  destCodeString,
long  pointcount,
int  pointoffset 
)
protected
Parameters
firstCoordarray of x
secondCoordarray of y
valuesarray of z
srcCodeStringsource projection code or option
destCodeStringdestination projection code or option
pointcount
pointoffset

Referenced by Projections.doTheTransform().

String getProjInfo ( )
Returns
quoting the proj api:"Returns the PROJ.4 command string that would produce this definition expanded as much as possible. For instance, +init= calls and +datum= defintions would be expanded"

Referenced by Projections.mapProjInfo(), and Projections.printProjInfo().

String getEllipseInfo ( )
Returns
the list of ellipsoid parameters

References Projections.getEllipsInfo().

Referenced by Projections.mapProjInfo(), and Projections.printProjInfo().

void printProjInfo ( )
LinkedHashMap mapProjInfo ( )
abstract void prepareData ( ProjectionData  dataTP)
abstract

latlong from degree to radiant) -> i.e. do whatever is needed

Parameters
dataTP
void doTheTransform ( Projections  srcProj,
ProjectionData  dataTP,
long  point_count,
int  point_offset 
)
protected

The srcProjection is passed to the destination proj and the transformation takes place. Then the resulting transformed data are passed to the destProj, so that the destProj in case can take care of final transformation of data (ex. if the destProj is latlong, the values have to be set beck to degrees

Parameters
srcProjobject holding the source projection
dataTPthe data set
point_count
point_offset

References Projections.transform(), ProjectionData.x, ProjectionData.y, and ProjectionData.z.

abstract void prepareTransformedData ( ProjectionData  dataTP)
abstract

latlong has to be transformed back to radiant)

Parameters
dataTPthe data set
void degreeToRadiant ( double[]  la,
double[]  lo 
)
protected
Parameters
la
lo

Referenced by LatLong.prepareData().

void radiantToDegree ( double[]  la,
double[]  lo 
)
protected
Parameters
la
lo

Referenced by LatLong.prepareTransformedData().