S57 display

4212
11
01-20-2013 08:40 PM
Labels (1)
ModyBuchbinder
Esri Regular Contributor
Hi all

I am trying to display a S57 file in the new RunTime WPF SDK 10.1.1
The example for HydrographicS57Layer is clear and works fine.
Now I would like to control my display properties (for example NIGHT color scheme).
As far as I understand I need the HydrographicS52DisplayProperties class for this.
I cannot find the way to get HydrographicS52DisplayProperties from HydrographicS57Layer.
The HydrographicS57Layer is written in the HydrographicS52DisplayProperties help (see here:    http://resources.arcgis.com/en/help/runtime-wpf/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Advance... ).

Thanks
Mody
0 Kudos
11 Replies
KerenCohen
Esri Contributor
Try the following:

HydrographicS52DisplayProperties a = HydrographicS52DisplayProperties.Default;
a.ColorScheme = S52ColorScheme.DayWhiteBack ;
hydrographicS57Layer.Cells.Add(cell);
0 Kudos
EugenReiswich
New Contributor

Hi folks,

I've got the same issue with .NET SDK 10.2.4. I'm able to create HydrographicS57Layer with the default color scheme. But I can't figure out how to apply HydrographicS52DisplayProperties. Neither the HydrographicS57Layer nor the MapView or Map have appropriate Properties to set. Any help would be highly appreciated.

Eugen

        private HydrographicS57Layer CreateENCLayer(string pathToENC)

        {

            HydrographicS57Layer hydroLayer = new HydrographicS57Layer()

            {

                Path = pathToENC

            };

            HydrographicS52DisplayProperties displayProperties = HydrographicS52DisplayProperties.Default;

            displayProperties.ColorScheme = S52ColorScheme.DayWhiteBack;

            return hydroLayer;

        }

0 Kudos
AnttiKajanus1
Occasional Contributor III

Eugen, have you checked the DisplayProperties sample on ArcGIS Runtime for .NET Samples?

Edit:

You should be able just to set values to HydrographicS52DisplayProperties.Default instance and those should be reflected to the map. If you see issues with this, could you provide a repro application so I could have a look?

In future, please use ArcGIS Runtime SDK for .NET‌ place for .NET specific questions.

0 Kudos
EugenReiswich
New Contributor

Hi Antti,

I've checked the sample you mentioned. I didn't know that I need to set the DataContext of the MapView to HydrographicS52DisplayProperties. Now it works fine.

Thanks a lot!

For those who are interested:

            HydrographicS52DisplayProperties displayProperties = HydrographicS52DisplayProperties.Default;

            displayProperties.ColorScheme = S52ColorScheme.DayBright;

            displayProperties.DisplayDepthUnits = S52DisplayDepthUnits.Meters;

           <!--MainMapView ist the XAML-Name of my MapView (<esri:MapView x:Name="MainMapView") -->

               MainMapView.DataContext = displayProperties;

0 Kudos
AnttiKajanus1
Occasional Contributor III

You shouldn't need to add it to DataContext. In sample it is used because it is manipulated through DataBinding.

0 Kudos
EugenReiswich
New Contributor

Alright, got it.

I'm also displaying bENC with soundings. I was wondering if I can filter these soundings, because I don't need them. I already tried to change Text- und ViewGroupProperties to see if anything happens. But my ENCs and bENCs still look the same.

Bildschirmfoto 2014-11-12 um 13.39.09.png

0 Kudos
AnttiKajanus1
Occasional Contributor III

I'm not expert on hydrographic terminology but you should be able to define if soundings are shown using

HydrographicS52DisplayProperties.Default.ViewGroupProperties.Soundings = false;

0 Kudos
EugenReiswich
New Contributor

I already tried that one, but unfortunately it didn't work. Any other ideas?

0 Kudos
AnttiKajanus1
Occasional Contributor III

You could load your data to S57DisplayPropertiesSample and see what settings does the trick.

0 Kudos