2

I was looking for an way to get the list of all the features, from an ENC layer, while looking through coding samples I came across this.

In this sample code we have MapView.IdentifyLayersAsync and MapView.IdentifyLayerAsync methods, both these methods return Task> and Task respectively and we can then get features from the GeoElements, but both these methods require Point as input parameters, How can we do this without providing the point i.e. get all the features of a ENC layer and is it possible to toggle their visibility in MapView (specially in java 100.7.0)? Thanks in Advance

user167124
  • 349
  • 2
  • 13

2 Answers2

1

It is not possible to get all the features from an ENC layer using IdentifyLayerAsync(). IdentifyLayerAsync() is used to identify visible features with a mouse click. https://developers.arcgis.com/java/latest/api-reference/reference/com/esri/arcgisruntime/mapping/view/GeoView.html#identifyLayersAsync(javafx.geometry.Point2D,double,boolean,int)

What is your use-case? Are you trying to get all ENC features in the current view or all features from the ENC file? Have you looked at GDAL ogr2ogr utility? It can export S57(ENC) to other vector formats.

s63xpert
  • 11
  • 2
  • Sorry for the late reply, my use case is that I am using arcgis to load and display multiple enc files, now I need to display a checklist of all features included in a enc when loaded and then user will toggle the visibility of a feature's symbol from the checklist, what should be my strategy? and thank you – user167124 Feb 12 '20 at 12:01
1

I have been using the same version of the Java runtime SDK v100.7.0 and came across the same issue. After going through their documentation at Display electronic navigational charts - ArcGIS Runtime SDK for Java under "Set ENC environment settings", it's mentioned:

ENC layers are displayed in accordance with the IHO S-52 standard. You can define the display properties of your ENC layers by using the static EncEnvironmentSettings class. These settings apply to all ENC layers in all maps. Settings fall under three categories: mariner settings, text group visibility settings, and viewing group settings. Text group settings control the display of labels for features, mariner settings control the symbolization and presentation of ENC features, and viewing group settings allow for quickly applying settings to logical groups of feature types. Example:

    // Enables display of seabed information for all ENC layers
EncEnvironmentSettings.getDisplaySettings().getTextGroupVisibilitySettings().setIsNatureOfSeabed(true);

So to alter the visibility for each of the feature type, you can call the specific category from EncEnvironmentSettings.getDisplaySettings() and then set the visibility for a specific feature under that category using a boolean value.

This ArcGIS class documentation would help EncEnvironmentSettings.DisplaySettings Class

Fuzail
  • 372
  • 5
  • 12