Starting on 1.1.0 version it is possible to instruct Mirone about projections using the GMT J syntax or the Proj4 style projection string. This is accomplished by the instructions inside the SRSproj_def.txt file that resides on the data subdirectory. As an example lets analyze the default contents of that file.

  1. #Menu SubMenu    GMT -J ProjectionString plus eventual -C<fe/fn> -T<datum>
  2. None              0         0
  3. UTMs    UTM26   -Ju26
  4. UTMs    UTM29   -Ju29
  5. Mercator    0   -Jm
  6. # Next we have a Proj4 ProjectionString
  7. "Portuguese system" "Gauss-Militar (DLx)"        +proj=tmerc +lat_0=39.66666666666666 +lon_0=-8.131906111111111 +k=1.0 +x_0=200000 +y_0=300000 +ellps=intl
  8. "Portuguese system" "Gauss (WGS84)"        +proj=tmerc +lat_0=39.668258333333333 +lon_0=-8.133108611111111 +k=1.0 +x_0=0 +y_0=0 +ellps=wgs84

Lines starting with the # character are interpreted as comment lines. The other lines have three fields. For example, line 2 has: None 0 0 The meaning is the following: None is the name of the submenu that appears under the Projections main menu. The two zeros are used in this case just to indicate non used values (None means any projection at all). On third line we have UTMs UTM26 -Ju26 Now UTMs is the name of the first submenu and UTM26 is the name of the sub-submenu. This translates to say UTM projection Zone 26. The last field, -Ju26, is the GMT switch used to inform the code that a Universal Transverse Mercator projection, on Zone 26, is selected. If you want to add other projections, use this logic and consult the GMT psbasemap manual to learn all details of the J syntax.

Lines 7 and 8 define the projection using the Proj4 style projection string and show another aspect of the menu labeling. If one wants to use names with spaces, we need to wrap it under a pair of “”.

Well, the above applies when we have loaded a file that we know the projection but that has no intrinsic mechanism (metadata) to inform the code what is its projection type. This is normally the case of the GMT grids. However, through the GDAL library Mirone can read many different formats that are able to store projection info, for example GeoTiff files. When that is the case, it takes precedence over any eventually selected projection on the Projections menu.

And what is the use of knowing what the projection is? Well, when you import external data or instruct to plot coastlines the data is automatically projected into the currently active projection.

Another situation that must be accounted for is when the user wants to load already projected data into a projected image. Since by default external data is assumed to be in geographic coordinates we must be able to instruct the program to not project this imported data. This is accomplished by right-clicking on the image coordinates annotations (the frame) and hit the “Load files in geogs”. This will toggle the message to “Load in projected coords”.

Note: this menu is disabled when the loaded file was guessed to have geographical coordinates.

Copyright © <2010>, <Joaquim Luis>

Created with the Freeware Edition of HelpNDoc: Single source CHM, PDF, DOC and HTML Help creation