# synclin5.qry # This is a sample script for drawing the geological line # symbol for a syncline (without arrow stems: for Japan). # Modified to provide scaling for LegendView samples, August 2002; # Modified to declare all variables, October 2005; # Version Dec. 2007 # Requires TNTmips 2007:73 or later. # Modified to adjust scale based on georeference map units and to # put arrow symbols only at the center of each line. numeric red, green, blue, scale; numeric widthMap, width, lineSize, lengthMap, halfSize, dist; class RVC_GEOREFERENCE vGeoref; class SR_COORDREFSYS vectCRS; ###################### Set Parameters ############################## # red, green, blue variables define the color of the line red = 0; green = 0; blue = 0; # This variable defines the denominator of the intended map scale. # It is used as the basis for defining line width and symbol size # and spacing. # Example: for 1:24,000 map scale, Scale = 24000 scale = 24000; # This variable controls the width of the lines. # WidthMap is the desired map width in mm, assuming vector # coordinates are in meters. widthMap = 0.25; # This variable controls the length of the crossing lines # LengthMap is the desired length in mm, assuming vector # coordinates are in meters: lengthMap = 4; # Check if vector has geographic coordinates (units of degrees instead of meters) # and if so adjust scale factor to draw symbols of appropriate size. Vect.GetDefaultGeoref(vGeoref); vectCRS = vGeoref.GetCoordRefSys(); if (vectCRS.IsProjected() <> 1) { if (vectCRS.IsLocal() <> 1) { scale = scale * 0.000009; } } else { # CRS is projected; check coordinate units to adjust scale # get coordinate unit from the first axis of the planar coordinate system coordUnit$ = vectCRS.Coordsys.GetAxis(1).Unit.GetSymbol(); scale = scale * GetUnitConvDist("m", coordUnit$); } # set final dimensions for drawing if (DrawingLegendView == 1) { # set dimensions for LegendView based on sample size width = 0.1 * SampleRect.GetHeight(); lineSize = 0.6 * SampleRect.GetHeight(); } else { # set dimensions for drawing elements in view scale = scale / 1000; # to convert from meters to millimeters width = widthMap * scale; lineSize = lengthMap * scale; } halfSize = lineSize * 0.5; ######################## Process ########################### # Set line color, width, and draw fold line. LineStyleSetColor(red,green,blue); LineStyleSetLineWidth(width); LineStyleDrawLine(); # Draw arrow symbols LineStyleSetPosition(0.5); LineStyleDropAnchor(1); LineStyleMoveTo(45, halfSize); LineStyleLineTo(225, lineSize); LineStyleMoveToAnchor(1); LineStyleMoveTo(135, halfSize); LineStyleLineTo(315, lineSize);