Coordinate Conversion routine

March 7, 2003

Table Of Contents

Overview
Running coordConversion
Restrictions


Overview

The coordinate conversion routine is intended as an aid to system administrators for setting up the correct domain coordinates in serverConfig or localConfig.  Basically the coordConversion program accepts either latitude/longitude, AWIPS world coordinates, or grid coordinates, and converts the input to the other two coordinate systems. The ifpServer must be running in order to run coordConversion.


Running coordConversion


Start the program from the "bin" directory.  Refer to directory structure information for GFESuite

The command line is shown below:

coordConversion -h serverhost -p serverport

Command Line Switch
Mandatory/Optional
Description
-h serverhost
Mandatory (see Note)
Specifies the host running the ifpServer.
-p serverport
Mandatory (see Note)
Specifies the port for the ifpServer.
Note: The -h and -p switches are predefined to match your GFESuite installation, such that they will point to the ifpServer specified on installation.  Thus the -h and -p switches are not necessary for normal running of this program.  However, if you wish to connect to a different server, then you will need to specify the -h and -p switches.  If environment variables ${CDSHOST} or ${CDSPORT} are defined, then the default server and port will be determined from the environment variables, unless overridden with the user specified -h and -p switches.

An example of starting the program is:

coordConversion -h localhost -p 98000000

The program will prompt you for the projection you wish to use.  The default is shown.  If you elect to do a conversion on a different projection, a list of projections is provided.

Database Projection currently: Grid211
Do you want to use this projection? 0=no, 1=yes
0
Choose Projection:
0 - exit
1 - Grid216
2 - Grid212
3 - Grid214AK
4 - Grid203
5 - Grid226
....

After selection of the projection, the program offers three choices:

Enter type of transfer.  Choose one of the options
0 - exit
1 - LatLon to AWIPS and Grid Coordinate
2 - AWIPS Coordinate to Grid Coordinate and LatLon
3 - Grid Coordinate to LatLon and AWIPS Coordinate
 

Example of LatLon to AWIPS and Grid Coordinate

LatLon to AWIPS and GridCoord,  [enter 999 to exit]
Latitude? 40.5
Longitude? -105.21
Awips coordinate is: x=41.9675 y=33.1418
Grid coordinate is: x=63 y=98 InGrid=1

LatLon to AWIPS and GridCoord,  [enter 999 to exit]
Latitude? 40.75
Longitude? -105.44
Awips coordinate is: x=41.7468 y=33.5155
Grid coordinate is: x=60 y=104 InGrid=1

LatLon to AWIPS and GridCoord,  [enter 999 to exit]
Latitude?
 

Example of AWIPS Coordinate to Grid Coordinate and Lat/Lon

AWIPS to lat/lon and grid cell [enter 999 to exit]
AWIPS x coordinate? 30
AWIPS y coordinate? 40
Lat: 44.2482 Lon: -117.175
Grid coordinate is: x=-128 y=208 InGrid=0

AWIPS to lat/lon and grid cell [enter 999 to exit]
AWIPS x coordinate? 31
AWIPS y coordinate? 41
Lat: 45.0347 Lon: -116.378
Grid coordinate is: x=-112 y=224 InGrid=0

AWIPS to lat/lon and grid cell [enter 999 to exit]
AWIPS x coordinate?
 

Example of Grid Coordinate to AWIPS Coordinate and Lat/Lon

Grid Cell to AWIPS and lat/lon  [Enter 999 to exit]
Grid x coordinate? 0
Grid y coordinate? 0
Awips coordinate is: x=38 y=27
Lat: 35.9079 Lon: -108.304

Grid Cell to AWIPS and lat/lon  [Enter 999 to exit]
Grid x coordinate? 50
Grid y coordinate? 50
Awips coordinate is: x=41.125 y=30.125
Lat: 38.328 Lon: -105.765

Grid Cell to AWIPS and lat/lon  [Enter 999 to exit]
Grid x coordinate?
 


Restrictions


coordConversion requires an active ifpServer in order to work