USGS

Isis 3.0 Application Source Code Reference

Home

mapgrid.cpp File Reference

Go to the source code of this file.

Functions

void StartNewLine (std::ofstream &os)
 This will prepare a new line start in GML.
void AddPointToLine (std::ofstream &os, const double x, const double y)
 This will add a point to a line started with StartNewLine.
void EndLine (std::ofstream &os)
 This will end a line in GML.
void CheckContinuous (double latlon, double latlon_start, double X, double Y, double lastX, double lastY, double maxChange, std::ofstream &os)
void IsisMain ()

Function Documentation

void StartNewLine ( std::ofstream &  os  ) 

This will prepare a new line start in GML.

This should be called every time a new line is started and generates unique IDs for each line.

Parameters:
os output file stream

Definition at line 198 of file mapgrid.cpp.

void AddPointToLine ( std::ofstream &  os,
const double  x,
const double  y 
)

This will add a point to a line started with StartNewLine.

StartNewLine must be called before using this method, and EndLine after all of the points in the line have been added.

Parameters:
os output file stream
x x coordinate
y y coordinate

Definition at line 218 of file mapgrid.cpp.

void EndLine ( std::ofstream &  os  ) 

This will end a line in GML.

This should be called after each line has the necessary points added using AddPointToLine.

Parameters:
os output file stream

Definition at line 228 of file mapgrid.cpp.

void CheckContinuous ( double  latlon,
double  latlon_start,
double  X,
double  Y,
double  lastX,
double  lastY,
double  maxChange,
std::ofstream &  os 
)
void IsisMain (  ) 

Initialize document. GML is XML-based, so we need the necessary XML headers. These are necessary for the GML file to be recognized.

Draw the interior longitude lines by looping through the longitude range and drawing across each latitude line using the longitude increment. The first and last line will be skipped for now.

Draw the exterior longitude boundary lines. This happens by drawing just the first and last longitude lines.

Draw the interior latitude lines by looping through the latitude range and drawing across each longitude line using the latitude increment. The first and last line will be skipped for now.

Draw the exterior latitude boundary lines. This happens by drawing just the first and last longitude lines.

Draw the bounding box using a series of lines.

Definition at line 20 of file mapgrid.cpp.