problem labeling contours

27 views
Skip to first unread message

Garth Fletcher

unread,
Nov 12, 2023, 1:51:37 PM11/12/23
to WhiteboxTools
Running WBT  with QGIS 3.32.3 under Mac OS X 10.15 (Catalina)

with a DEM (TIF from LIDAR, 0.5 meter pixels)  processed using
    WBT > Image Processing Tools - Filters > GaussianFilter (∂3)
    WBT > Hydrological Analysis > FillDepressionsWangAndLiu
    WBT > Geomorphometric Analysis >  ContoursFromRaster (1')

The 1 foot contours are perfect!  

However,  contour lines need to be labeled with their elevation such that the top of the label is towards higher ground.  On a contour line around a peak the numbers along this line should all be oriented with the tops of the numbers on the peak side, ie, upside down N of the peak, right side up  S of the peak,  rotated CW 90º W of the peak and CCW 90º E of the peak.

In QGIS I have been using the following settings in the Layer Properties
  single label
  if ( "HEIGHT" % 10=0, "HEIGHT", NULL)  {to label 10' intervals}
  Placement > repeating labels > 75 mm
  Placement > √ Geometry Generator >  reverse($geometry)
  Rendering >  Show upside-down labels > √ always

This has resulted in correct labeling on contours generated by 
  Raster > Extraction > Contour

However, the contours generated by WBT, while generally correct, have reversed labels in some areas.  I think this may be related to the direction of the generated contour lines ?

In the attached screen shot the lines generated by both are identical.  The red labels are from WBT's contours, the black labels from Raster > Extraction > Contour.  Note the 10', 20' and 30' contour labels.

Is there either some way to "correct" the WBT contour file or change the QGIS Layer Properties settings to fix this problem?

Thanks!
Contour_Label_Differences.png

Garth Fletcher

unread,
Nov 13, 2023, 1:09:32 PM11/13/23
to WhiteboxTools
By the way, the "WBT > Hydrological Analysis > FillDepressionsWangAndLiu" should not have been included in the processing list - that was only done separately for flow channel determinations.  The Gaussian filtered file was fed directly to ContoursFromRaster.

I would attach that .sdat file but it is 72 MB.  If it would help, let me know where to send it...
Reply all
Reply to author
Forward
0 new messages