![]() |
VR-Forces 4.10 Class Documentation
|
Draw 2D Grid Lines on geocentric databases. More...

Classes | |
| struct | MgrsSegStart |
| Structure / typedefs for segment locators. More... | |
Public Member Functions | |
| DtGeocentricGridLinesDrawer (DtDe &de) | |
| CTOR. More... | |
| virtual | ~DtGeocentricGridLinesDrawer () |
| DTOR. More... | |
| virtual void | drawGridLines () |
| Main entry point - draw the geocentric grid lines. More... | |
| virtual void | setScale (double scale) |
| Set the current observer 2D scale. More... | |
| virtual void | setObserverPosition (const DtVector &position) |
| Set the observer position. More... | |
| virtual void | setChannelDimensions (int startChannelX, int startChannelY, int endChannelX, int endChannelY) |
| Override to set up expansion values. More... | |
Public Member Functions inherited from makVrv::DtGridLinesDrawer | |
| DtGridLinesDrawer (DtDe &de) | |
| Default CTOR. More... | |
| virtual | ~DtGridLinesDrawer () |
| Virtual DTOR. More... | |
| virtual void | setChannel (DtOsgChannel *channel) |
| Set the channel to draw the grid lines on. More... | |
| virtual void | setupOverlay () |
| Get the overlay to use for our channel. More... | |
| virtual void | setupFont () |
| Get the font to use fron the font manager. More... | |
| virtual double | lookupClosestLatLonSpacing (double minimumSpacingRadians) |
| Find the best allowable lat,lon spacing given the minimum requirement. More... | |
| virtual double | lookupClosestCartesianSpacing (double minimumSpacing) |
| Find the best allowable cartesian spacing given the minimum requirement. More... | |
| void | setPixelRatio (float pixelRatio) |
| Sets the pixel density ratio to scale grid lines on high dpi screens. More... | |
Public Member Functions inherited from makVrv::DtGridLinesParameters | |
| DtGridLinesParameters () | |
| CTOR. More... | |
| virtual | ~DtGridLinesParameters () |
| DTOR. More... | |
| DtGridLinesParameters (const DtGridLinesParameters &orig) | |
| Copy constructor. More... | |
| DtGridLinesParameters & | operator= (const DtGridLinesParameters &orig) |
| \ brief Assignment operator More... | |
| virtual void | setGridType (makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType) |
| Set the grid type. More... | |
| virtual void | setUnitType (makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unitType) |
| Set the unit type. More... | |
| virtual void | setUnitType (makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unitType) |
| Set the unit type. More... | |
| virtual void | setMinimalGridlineLabelsEnabled (bool enabled) |
| Set whether or not minimal gridline labels are used. More... | |
| virtual void | setAutoSpacing (bool autoSpacing) |
| Set whether auto spacing is used. More... | |
| virtual void | setMinSpacing (int pixels) |
| Set the minimum pixel spacing for auto spacing. More... | |
| virtual void | setFixedSpacingAmount (double amount) |
| Set the fixed spacing amount. More... | |
| virtual void | setXOffset (double offset) |
| Set the x offset for the origin in current units. More... | |
| virtual void | setYOffset (double offset) |
| Set the y offset amount in current units. More... | |
| virtual void | setDecimalPlaces (unsigned decimalPlaces) |
| Set the number of decimals or, in the case of MGRS, decimalPlaces. More... | |
| virtual void | setMaxGridLines (int maxGridLines) |
| Set the max number of grid lines in each direction. More... | |
| virtual void | setEastWestGridLineColor (float r, float g, float b, float a) |
| Set the color of east-west grid lines. More... | |
| virtual void | setEastWestLabelColor (float r, float g, float b, float a) |
| Set the color of the labels on east-west grid lines. More... | |
| virtual void | setNorthSouthGridLineColor (float r, float g, float b, float a) |
| Set the color of north-south grid lines. More... | |
| virtual void | setNorthSouthLabelColor (float r, float g, float b, float a) |
| Set the color of the labels north-south grid lines. More... | |
| virtual void | setLabelFont (const std::string &fontName) |
| Set the font used for labels. More... | |
| virtual void | setLabelPointSize (int pointSize) |
| Set the point size used for labels. More... | |
| virtual void | setLabelXOffset (int pixels) |
| Set the offset of labels from the bottom of the screen. More... | |
| virtual void | setLabelYOffset (int pixels) |
| Set the offset of labels from the left side of the screen. More... | |
| virtual void | setLabelTextWidth (int width) |
| Set the width of the box used to display text in. More... | |
| virtual void | setLabelTextHeight (int height) |
| Set the height of the box used to display text in. More... | |
| virtual void | setGridLineWidth (float width) |
| Set the width of grid lines. More... | |
Protected Types | |
| typedef std::vector < DtLineSegment * > | GridLine |
| typedef std::vector< GridLine > | GridLineVector |
| typedef std::vector < DtTextProxy * > | LabelArray |
| typedef boost::unordered_set < DtUnicode > | UsedGridLabels |
Protected Member Functions | |
| virtual void | reloadTextFonts () |
| Reloads all text label fonts on runtime font size change. More... | |
| virtual void | reloadLabelFonts (std::vector< DtTextProxy * > &labels) |
| Convenience function to reload text label fonts on one vector of labels. More... | |
| virtual void | setupReferenceEllipsoid () |
| Set up a reference ellipsoid for the current coordinate system that can be reused for all geodetic coordinate objects. More... | |
| virtual void | setupTopoGeocTransforms () |
| Set up transforms between Geocentric and geodetic coordinates. More... | |
| virtual bool | pointVisible (const DtVector &point) const |
| Determine if the geocentric point specified could be visible (ignoring the current observer orientation) More... | |
| virtual void | findPolarSpacing () |
| Determine the spacings to use when one of the poles is visible. More... | |
| virtual void | drawPolarLongitudeLines () |
| Draw the longitude lines when one of the poles is visible. More... | |
| virtual void | drawPolarLatitudeLines () |
| Draw the latitude lines when one of the poles is visible. More... | |
| virtual void | findLatLonWindowDimensions () |
| Find the range of longitude and latitude to draw lines over based on the window dimensions (and scale and observer position) More... | |
| virtual void | findSpacing () |
| Determine the spacings to use when neither pole is visible. More... | |
| virtual void | anchorAndOffsetLines () |
| find the correct starting point for longitude and latitude lines given the current spacing and offsets specified More... | |
| virtual void | drawLongitudeLines () |
| Draw the longitude lines when neither pole is visible. More... | |
| virtual void | drawLatitudeLines () |
| Draw the latitude lines when neither pole is visible. More... | |
| virtual void | createLabel (DtTextProxy *&label, double radians, bool isLongitude) |
| Create a label. For MGRS mapsheets, isLongitude denotes north/south mapsheet line. More... | |
| virtual void | destroyGridLines () |
| Destroy all grid lines. More... | |
| virtual bool | clip3D (const DtVector &pointA, const DtVector &pointB, DtVector &clippedA, DtVector &clippedB) const |
| Returns false if A and B are beyond the clip plane. More... | |
| virtual void | clearUnusedLinesAndLabels (int index, GridLineVector &lines, LabelArray &labels) |
| Deallocates all segments and labels for indices at and above the provided index in the provided GridLineVector. More... | |
| virtual void | clearUnusedSegments (int index, GridLine &line) |
| Deallocates all line segments at and above the provided index. More... | |
| virtual void | destroyLinesAndLabels (GridLineVector &lines, LabelArray &labels) |
| Deallocates all line segments and all labels in the GridLineVector and label arrays provided. More... | |
| virtual void | resizeLinesAndLabels (GridLineVector &lines, LabelArray &labels, int numLines) |
| Set the number of lines to draw in a frame Will resize /cleanup current memory allocations for lines and labels. More... | |
| virtual bool | drawLineSegment (DtLineSegment *&segment, const DtVector &start, const DtVector &end, float *colorArray, bool *pass3D=0) |
| Draw a geocentric line segment, if its visible. More... | |
| virtual GridLine & | getSegmentedLine (GridLineVector &lines, int index, int numSegments) |
| Returns the line from the line vector at the specified index with enough segment pointers allocated. More... | |
| virtual SegmentStarts & | getSegmentedLocator (SegmentLocator &lines, int index, int numSegments) |
| The mirror equivalent of getSegmentedLine() for locators. More... | |
| virtual void | resizeLocators (SegmentLocator &locator, int numLines) |
| The mirror equivalent of resizeLinesAndLabels() for locators (without the labels) More... | |
| virtual void | clearUnusedLocators (int index, SegmentLocator &locator) |
| The mirror equivalent of clearUnusedLines() for locators. More... | |
| virtual bool | drawUtmLineSegment (GridLine &line, SegmentStarts &lineLocator, int segIndex, int zone, char hemisphere, double startEasting, double startNorthing, double endEasting, double endNorthing, bool constrainEasting=false) |
| Draw a single line segment given a UTM zone, hemisphere and start/end northing and easting values In addition to drawing the segment it also fills in the locator for the segment's start. More... | |
| virtual void | findEastingLimits (double lat, double &minEasting, double &maxEasting) |
| find the minimum and maximum easting that falls within any utm zone at the latitude specified More... | |
| virtual void | drawEastWestMapSheetLines () |
| Methods for drawing MGRS northing (east-west) lines. More... | |
| virtual int | drawEastWestMapSheetLineForUtmZone (GridLine &eastWestLine, SegmentStarts &lineLocator, int startSeg, int zone, char hemisphere, double northingLine, int zoneMapSheets, int numSegs, int numPartialSegs, double partialExtra) |
| Because a utm zone will usually contain some number of map sheeting spacing sized segments plus some extra (partial segment) on either side, this method has to account for four different cases. More... | |
| virtual int | drawEastWestZoneInterior (GridLine &eastWestLine, SegmentStarts &lineLocator, int startSeg, int utmZone, char hemisphere, double northingLine, int numSegs, int startEasting, int endEasting) |
| By interior, we mean the segments of the line that are a full mapSheet spacing long. More... | |
| virtual void | drawNorthSouthMapSheetLines () |
| Methods for drawing easting (north-south) lines. More... | |
| virtual int | drawNorthSouthMapSheetLinesForUtmZone (int zone, double maxZoneWidth, int iLine) |
| Draw all the easting lines for one UTM zone. More... | |
| virtual bool | drawNorthSouthMapSheetLine (int utmZone, double eastingLine, int iLine) |
| Draw a single easting (north-south) line. More... | |
| virtual bool | getGzdAndMapSheet (const DtVector &geocLoc, DtUnicode &gzd, DtUnicode &gzdAndMapSheet) |
| Methods for labeling MGRS lines, mapsheets, and grid zone designators. More... | |
| virtual void | labelGridZones () |
| Label the grid zones When using the MGRS grid type, the standard degree labels are not applied to the 6 degree by 8 degree grid created by drawLatitudeLines() and drawLongitudeLines(). More... | |
| virtual bool | labelGridZoneDesignator (double lonValue, double latValue, int labelIndex) |
| label a grid zone box with its designator This method gets the GZD for the supplied lat/lon and creates a label if the GZD is not already on the screen. More... | |
| virtual bool | includeMgrsDesignator (double lonValue, double latValue, osg::Vec3 &screenPos, DtVector &geocResult) |
| Check to see if an MGRS label should be drawn This method checks to make sure that the label would be on the screen and not on the other side of the world from where we are looking. More... | |
| virtual bool | includeMgrsDesignator (double lonValue, double latValue, float screenPosX, float screenPosY, DtVector &geocResult) |
| Check to see if an MGRS label should be drawn Same as above, but takes the screen pos in instead of calculating and returning it. More... | |
| virtual void | createGridLineLabel (DtTextProxy *&label, double lat, double lon, float screenPosX, float screenPosY, bool isEasting) |
| Draw a label for a grid line For north-south lines, this will simply be the numeric 1-5 digit MGRS grid value (or "" if spacing is 100,000m). More... | |
| virtual void | labelMapSheetLines () |
| Label all (unlabeled) map sheets Map sheets may be labeled as part of a grid line label (e.g., ES500). More... | |
| virtual bool | createMapSheetLabel (DtTextProxy *&label, double lat, double lon, float screenPosX, float screenPosY) |
| Draw a label for a map sheet When called, this method will get the gzd and map sheet for the lat/lon specified. More... | |
| virtual DtFont::TextAlignement | offsetGridBoxLabel (double xSrc, double ySrc, double &xOffset, double &yOffset, DtBoundingBox &bbox) const |
| Find the offset and alignment for a grid box label This method sets up an appropriate bound box and offsets screen positions for drawing grid zone labels. More... | |
Private Member Functions | |
| DtGeocentricGridLinesDrawer (const DtGeocentricGridLinesDrawer &orig) | |
| Unimplemented Copy Constructor. More... | |
| DtGeocentricGridLinesDrawer & | operator= (const DtGeocentricGridLinesDrawer &rhs) |
| Unimplemented assignment operator. More... | |
| typedef std::vector< MgrsSegStart > | SegmentStarts |
| The starting location of each mapsheet line segment drawn for one line. More... | |
| typedef std::vector < SegmentStarts > | SegmentLocator |
| A vector of SegmentStarts, one for each line drawn. More... | |
| virtual bool | drawStandardLongitudeLine (GridLine &lonLine, double resolution, int numSegs, float curLon, int &curSeg) |
| These routines are for the MGRS in geocentric implementation. More... | |
| virtual bool | drawNorwayMgrsLongitudeLine (GridLine &lonLine, double resolution, int numSegs, int &curSeg) |
| Draw the longitudinal line for the special case in southern Norway for MGRS This method is used when drawing the 6 degree east line in MGRS. More... | |
| virtual bool | drawSvalbardMgrsLongitudeLines (GridLine &lonLine, double resolution, int numSegs, float curLon, int &curSeg) |
| Draw the longitudinal lines for the special cases around Svalbard (north of 72 degrees latitude) This method is used with MGRS to draw the longitude lines that need to be modified for the Svalbard area (except 6 degrees east, which is already taken care of by drawNorwayMgrsLongitudeLine()). More... | |
| virtual void | drawMapSheetLines () |
| Draw the UTM-based mapsheet lines. This just calls drawEastWestLines() and drawNorthSouthLines() More... | |
| virtual void | findMapSheetSpacing () |
| Determine the spacing between map sheet grid lines. More... | |
| virtual bool | anchorMapSheetLines () |
| Determine the start and end northing and easting lines and UTM zones. More... | |
| virtual void | clearUnusedLines (int index, GridLineVector &lines) |
| Same as clearUnusedLinesAndLabels(), but just for lines. More... | |
| virtual void | clearUnusedLabels (int index, LabelArray &labels) |
| Same as clearUnusedLinesAndLabels(), but just the labels. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from makVrv::DtGridLinesDrawer | |
| static bool | clip (double xMin, double xMax, double yMin, double yMax, double x0src, double y0src, double x1src, double y1src, double &x0clip, double &y0clip, double &x1clip, double &y1clip) |
| 2D clipping routine. Implements Liang / Barsky Clipping More... | |
Draw 2D Grid Lines on geocentric databases.
This class supported two types of grids - basic geodetic (latitude/longitude lines) which can be labels with decimal degrees or degrees/minutes/seconds. And MGRS (added 11/2019).
|
protected |
|
protected |
|
protected |
|
protected |
The starting location of each mapsheet line segment drawn for one line.
|
protected |
A vector of SegmentStarts, one for each line drawn.
|
protected |
| makVrv::DtGeocentricGridLinesDrawer::DtGeocentricGridLinesDrawer | ( | DtDe & | de | ) |
CTOR.
|
virtual |
DTOR.
|
private |
Unimplemented Copy Constructor.
|
virtual |
Main entry point - draw the geocentric grid lines.
|
virtual |
Set the current observer 2D scale.
|
virtual |
Set the observer position.
|
virtual |
Override to set up expansion values.
Reimplemented from makVrv::DtGridLinesDrawer.
|
protectedvirtual |
Reloads all text label fonts on runtime font size change.
Implements makVrv::DtGridLinesDrawer.
|
protectedvirtual |
Convenience function to reload text label fonts on one vector of labels.
|
protectedvirtual |
Set up a reference ellipsoid for the current coordinate system that can be reused for all geodetic coordinate objects.
|
protectedvirtual |
Set up transforms between Geocentric and geodetic coordinates.
|
protectedvirtual |
Determine if the geocentric point specified could be visible (ignoring the current observer orientation)
|
protectedvirtual |
Determine the spacings to use when one of the poles is visible.
|
protectedvirtual |
Draw the longitude lines when one of the poles is visible.
|
protectedvirtual |
Draw the latitude lines when one of the poles is visible.
|
protectedvirtual |
Find the range of longitude and latitude to draw lines over based on the window dimensions (and scale and observer position)
|
protectedvirtual |
Determine the spacings to use when neither pole is visible.
|
protectedvirtual |
find the correct starting point for longitude and latitude lines given the current spacing and offsets specified
|
protectedvirtual |
Draw the longitude lines when neither pole is visible.
|
protectedvirtual |
Draw the latitude lines when neither pole is visible.
|
protectedvirtual |
Create a label. For MGRS mapsheets, isLongitude denotes north/south mapsheet line.
|
protectedvirtual |
Destroy all grid lines.
|
protectedvirtual |
Returns false if A and B are beyond the clip plane.
True if either/both are not, and returns correctly clipped values
|
protectedvirtual |
Deallocates all segments and labels for indices at and above the provided index in the provided GridLineVector.
|
protectedvirtual |
Deallocates all line segments at and above the provided index.
in the provided GridLine
|
protectedvirtual |
Deallocates all line segments and all labels in the GridLineVector and label arrays provided.
|
protectedvirtual |
Set the number of lines to draw in a frame Will resize /cleanup current memory allocations for lines and labels.
|
protectedvirtual |
Draw a geocentric line segment, if its visible.
Will create if necessary. If the caller wants to know if its 3D-clipped, provide pass3D
|
protectedvirtual |
Returns the line from the line vector at the specified index with enough segment pointers allocated.
|
protectedvirtual |
These routines are for the MGRS in geocentric implementation.
We use the existing latitude/logitude-drawing infrastructure (with a few small changes) to draw the Grid Zone lines (which are 6 degrees longitude X 8 degrees latitude, except for northern-most grid zone, which is 12 degrees in latitude). The standard latitude/longitude labels are disabled, and instead a separate pass is made to label all the grid zones with a grid zone designator. The map sheets are then drawn using UTM to determine the lines (and converting the UTM coordinates to geocentric to actually drawn the line segments. A lot of the code is about deciding how many lines (and how many line segments) should be allocate and attempted. The idea here is to attempt to draw all the lines we will need, assuming some with be off-screen and ignored, but not try to draw too many lines for efficiency sakes. So we try to determine 'worst case' lines/segments, and allocate and (attempt to) draw just that. N.B. The UTM-geodetic conversion routines all use False Easting for eastings, and False Northing in the southern hemisphere. Draw longitudinal lines (including for MGRS grid zones) that don't require special cases This method has been extracted from the original drawLongitudeLines() so that we can more easily separate out the special cases in MGRS (around Norway and Svalbard).
|
protectedvirtual |
Draw the longitudinal line for the special case in southern Norway for MGRS This method is used when drawing the 6 degree east line in MGRS.
It moves the line from 6 degrees to 3 degrees between 56 and 64 degrees north. It also stops drawing the line north of 72 degrees (for the modified Svalbard-related grid zones.
|
protectedvirtual |
Draw the longitudinal lines for the special cases around Svalbard (north of 72 degrees latitude) This method is used with MGRS to draw the longitude lines that need to be modified for the Svalbard area (except 6 degrees east, which is already taken care of by drawNorwayMgrsLongitudeLine()).
It stops drawing longitude lines north of 72 degrees for longitudes 18, and 30; and moves 12, 24, and 36 west to 9, 21, and 33 at that latitude.
|
protectedvirtual |
Draw the UTM-based mapsheet lines. This just calls drawEastWestLines() and drawNorthSouthLines()
|
protectedvirtual |
Determine the spacing between map sheet grid lines.
In MGRS, grid lines are multiples of 10, and can go from 1 meter up to 100,000 meters. findMapSheetSpacing() uses the current reslution and grid spacing specified to choose the smallest spacing that won't draw grid lines closer than the specified minimum spacing. An exception is made if the result means there might not be at least one line in either dimension on the screen. In that case we drop to the next smallest spacing.
|
protectedvirtual |
Determine the start and end northing and easting lines and UTM zones.
We start with the min and max latitude and latitude for the current view calculated by findLatLonWindowDimensions(). We convert these to northing and easting (and find the start/end utm zones for the longitudes. Note that UTM Zone anchors are always increasing (to make iteration easier) and therefore may be larger than actually possible. Code that actually needs to convert to geodetic using the UTM zone will check for zones > 60 and subtract.
|
protectedvirtual |
Same as clearUnusedLinesAndLabels(), but just for lines.
|
protectedvirtual |
Same as clearUnusedLinesAndLabels(), but just the labels.
|
protectedvirtual |
The mirror equivalent of getSegmentedLine() for locators.
|
protectedvirtual |
The mirror equivalent of resizeLinesAndLabels() for locators (without the labels)
|
protectedvirtual |
The mirror equivalent of clearUnusedLines() for locators.
|
protectedvirtual |
Draw a single line segment given a UTM zone, hemisphere and start/end northing and easting values In addition to drawing the segment it also fills in the locator for the segment's start.
It uses the underlying drawLineSegment() method, which may clip the segment or determine that the segment isn't on the screen. If constrainEasting is true, than the width of the UTM zone at the specified latitude is calculated using findEastingLimits(), and if the either easting value is outside of the zone, no segment is drawn. returns true if it draws the segment, false otherwise
|
protectedvirtual |
find the minimum and maximum easting that falls within any utm zone at the latitude specified
|
protectedvirtual |
Methods for drawing MGRS northing (east-west) lines.
Draw all the horizontal east-west lines drawEastWestMapSheetLines calculates the maximum number of lines that will be needed using the anchored start and end eastings. It then iterates through those lines, calculating the worst case number of segments needed for that line based its latitude and the map spacing chosen, and allocates those lines / segments. It then iterates through each utm zone, drawing the part of that northing line that appears in that zone, by calling drawEastWestMapSheetLineForUtmZone(). If a line is drawn, it calls createGridLineLabel() to label the line. Finally, it clears any unused lines, segments, and grid line labels.
|
protectedvirtual |
Because a utm zone will usually contain some number of map sheeting spacing sized segments plus some extra (partial segment) on either side, this method has to account for four different cases.
First is if the entirety of the lines to be drawn is in this one utm zone. Then just drawEastWestZoneInterior() can be called. Second is if the zone is the first of multiple zones; third is if it is the last of multiple zones; and fourth if it is a full zone between starting and ending zones. In the 2nd through 4th cases, partial segments need to be drawn on side or the other (or both) of the call to drawEastWestZoneInterior. Returns the number of segments actually drawn.
|
protectedvirtual |
By interior, we mean the segments of the line that are a full mapSheet spacing long.
This simply iterates from startEasting to endEasting at the northing latitude drawing segments (and tagging segment locators). Returns number of segments drawn
|
protectedvirtual |
Methods for drawing easting (north-south) lines.
Draw all the easting (north-south) lines This method calculates the maximum number of easting lines that could be drawn given our map sheet spacing, the number of utm zones spanned, and the width of a zone at our worst case latitude; and then allocates enough lines, labels and segment start locator vectors. It then iterates from myAnchoredStartUtmZone to myAnchoredEndUtmZone, calling drawNorthSouthMapSheetLinesForUtmZone(). Unused lines, labels, and locators are cleared.
|
protectedvirtual |
Draw all the easting lines for one UTM zone.
This method calculates the worst case number of lines that could be in the zone based on myAnchoredStartEasting, myAnchoredEndEasting, the max zone width and the type of zone (see the four cases described in drawEastWestMapSheetLineForUtmZone). It then iterates through the easting lines calling drawNorthSouthMapSheetLine(). Returns the number of lines drawn
|
protectedvirtual |
Draw a single easting (north-south) line.
If the start and end northings are all in the same hemisphere, this method just iterates from myAnchoredStartNorthing to myAnchoredEndNorthing calculating the max number segments needed for each line and calling drawUtmLineSegment(); and then labels the line if drawn. However if the anchors are in different hemispheres then the segments for each hemisphere get drawn separately, first iterating from myAnchoredStartNorthing to the equator and then from the equator to myAnchoredEndNorthing. All unused segments are cleared. Returns true if a line was drawn.
|
protectedvirtual |
Methods for labeling MGRS lines, mapsheets, and grid zone designators.
All the label text is retrieved from the DtMgrsCoordinateDisplay instance, which will be retrieved when we request a display instance based on our gridtype of DtDisplayUnitsSettingsRecord::CoordSysMgrs. There are three primary display methods called - northSouthGridLabel(), eastWestGridLabel(), and gridBoxLabel(). The first two are for the numeric grid line labels; the third retrieves the grid zone designator (gzd) and the mapsheet. They come as a single string, xxA:AA (for example, 04N:BC) This utility grabs the grid box string, grabs the gzd as a separate string (and strips off the trailing 0, if any) and returns that and the original string (through the parameter list). The method returns true if strings are returned, false otherwise
|
protectedvirtual |
Label the grid zones When using the MGRS grid type, the standard degree labels are not applied to the 6 degree by 8 degree grid created by drawLatitudeLines() and drawLongitudeLines().
Instead, we lable the grid zones as boxes with the label in the southwest corner. This method iterates from from start to end anchored lon, and for each longitude from start to end anchored latitude, calling labelGridZoneDesignator() for each lat/lon.
|
protectedvirtual |
label a grid zone box with its designator This method gets the GZD for the supplied lat/lon and creates a label if the GZD is not already on the screen.
Returns true if the label is drawn.
|
protectedvirtual |
Check to see if an MGRS label should be drawn This method checks to make sure that the label would be on the screen and not on the other side of the world from where we are looking.
Returns true if the label should be shown; and returns the point in geocentric and screen coordinates
|
protectedvirtual |
Check to see if an MGRS label should be drawn Same as above, but takes the screen pos in instead of calculating and returning it.
|
protectedvirtual |
Draw a label for a grid line For north-south lines, this will simply be the numeric 1-5 digit MGRS grid value (or "" if spacing is 100,000m).
For east-west lines, it will prepend the grid zone (if not already on the screen) and the map sheet (if not already on the screen). Note that map sheets CAN be duplicated, but not within the same grid zone.
|
protectedvirtual |
Label all (unlabeled) map sheets Map sheets may be labeled as part of a grid line label (e.g., ES500).
This method will label any other map sheets on the screen that aren't already labeled through an existing grid line. It does so by walking through the segment start locators for each segment of each east-west line and calling createMapSheetLabel() (which will check to see if the map sheet is already labeled
|
protectedvirtual |
Draw a label for a map sheet When called, this method will get the gzd and map sheet for the lat/lon specified.
If the GZD for this map sheet is already on the screen but the map sheet is not, just the map sheet will be drawn. If neither are on the screen, both will be drawn. If a label is drawn, the method returns true.
|
protectedvirtual |
Find the offset and alignment for a grid box label This method sets up an appropriate bound box and offsets screen positions for drawing grid zone labels.
|
private |
Unimplemented assignment operator.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |