Select to view content in your preferred language

Remove or hide EncFeature from an electronic navigation chart

213
1
08-14-2024 05:06 AM
Labels (2)
JesDL
by
New Contributor

I am correctly reading nautical charts in my program using the example documented here:

https://developers.arcgis.com/qt/layers/display-electronic-navigational-charts/

I would like to hide all elements that appear on the nautical chart, and I have achieved this for almost all elements by filtering as follows:

  EncDisplaySettings *encDisplaySettings =
      EncEnvironmentSettings::displaySettings();

  EncMarinerSettings *encMarinerSettings =
      encDisplaySettings->marinerSettings();

  encMarinerSettings->setDataQuality(false);
  encMarinerSettings->setLabelContours(false);
  encMarinerSettings->setDisplayNobjnm(false);
  encMarinerSettings->setHonorScamin(false);
  encMarinerSettings->setIsolatedDangers(false);
  encMarinerSettings->setLabelSafetyContours(false);
  encMarinerSettings->setLowAccuracy(false);
  encMarinerSettings->setShallowDepthPattern(false);
  encMarinerSettings->setTwoDepthShades(false);

  EncTextGroupVisibilitySettings *encTextGroupVisibilitySettings =
      encDisplaySettings->textGroupVisibilitySettings();
  encTextGroupVisibilitySettings->setBerthNumber(false);
  encTextGroupVisibilitySettings->setCurrentVelocity(false);
  encTextGroupVisibilitySettings->setGeographicNames(false);
  encTextGroupVisibilitySettings->setHeightOfIsletOrLandFeature(false);
  encTextGroupVisibilitySettings->setImportantText(false);
  encTextGroupVisibilitySettings->setLightDescription(false);
  encTextGroupVisibilitySettings->setMagneticVariationAndSweptDepth(false);
  encTextGroupVisibilitySettings->setNamesForPositionReporting(false);
  encTextGroupVisibilitySettings->setNatureOfSeabed(false);
  encTextGroupVisibilitySettings->setNoteOnChartData(false);

  EncViewingGroupSettings *encViewingGroupSettings =
      encDisplaySettings->viewingGroupSettings();
  encViewingGroupSettings->setAllIsolatedDangers(false);
  encViewingGroupSettings->setArchipelagicSeaLanes(false);
  encViewingGroupSettings->setBoundariesAndLimits(false);
  encViewingGroupSettings->setBuoysBeaconsAidsToNavigation(false);
  encViewingGroupSettings->setBuoysBeaconsStructures(false);
  encViewingGroupSettings->setChartScaleBoundaries(false);
  encViewingGroupSettings->setDepthContours(false);
  encViewingGroupSettings->setDryingLine(false);
  encViewingGroupSettings->setLights(false);
  encViewingGroupSettings->setMagneticVariation(false);
  encViewingGroupSettings->setOtherMiscellaneous(false);
  encViewingGroupSettings->setProhibitedAndRestrictedAreas(false);
  encViewingGroupSettings->setSeabed(false);
  encViewingGroupSettings->setShipsRoutingSystemsAndFerryRoutes(false);
  encViewingGroupSettings->setSpotSoundings(false);
  encViewingGroupSettings->setStandardMiscellaneous(false);
  encViewingGroupSettings->setSubmarineCablesAndPipelines(false);
  encViewingGroupSettings->setTidal(false);

 

My problem is that there is one element that appears in several places on the nautical chart and I cannot seem to remove it:

iamge.png

Following the documentation example for identifying elements: https://developers.arcgis.com/qt/layers/display-electronic-navigational-charts/#identify-and-select-... I have been able to verify that clicking on it indicates:

Found EncFeature:  "Offshore platform"

I would like to know if there is any filter that I have not included in my code that could hide these EncFeatures, or if there is another way to hide or remove them from the EncLayer.

0 Kudos
1 Reply
bnoble0110
Esri Contributor

Hello @JesDL 

A quick way to hide all symbols would be to set the opacity of the ENC layer to 0.

 

 

encLayer->setOpacity(0);

 

 

 

You can also achieve this using the EncDisplayCategories API. All features are segregated into 3 different display categories: Base, Standard, Other.

 

 

auto* displaySettings = EncEnvironmentSettings::displaySettings();
auto* marinerSettings = displaySettings->marinerSettings();
auto* displayCategories = marinerSettings->displayCategories();

displayCategories->setDisplayBase(false);
displayCategories->setStandardDisplay(false);
displayCategories->setOtherDisplay(false);

 

 

0 Kudos