ArcGIS Runtime SDK for .NET Samples

Densify and generalize

Densify and generalize a line

Loading

Code

<UserControl
    x:Class="ArcGISRuntime.UWP.Samples.DensifyAndGeneralize.DensifyAndGeneralize"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls">
    <Grid>
        <esriUI:MapView x:Name="MyMapView" />
        <Border
            Background="White" BorderBrush="Black" BorderThickness="1"
            HorizontalAlignment="Right" VerticalAlignment="Top"
            Margin="30" Padding="20" Width="375">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0"
                           Text="Adjust the sliders to see the resulting generalized or densified polyline."
                           TextWrapping="Wrap"
                           Foreground="Red" />
                <TextBlock Grid.Row="1"
                           Text="Max. Deviation (Generalize)" FontWeight="Bold" />
                <Slider x:Name="DeviationSlider"
                        Value="10" Minimum="1" Maximum="250"
                        Grid.Row="2" Margin="5" />
                <TextBlock Grid.Row="3"
                           Text="Max. Segment length (Densify)" FontWeight="Bold" />
                <Slider x:Name="SegmentLengthSlider"
                        Grid.Row="4" Margin="5"
                        Value="100" Minimum="100" Maximum="500" />
                <TextBlock x:Name="ResultLabel" Grid.Row="5"
                           Text="Adjust a slider to start"
                           TextWrapping="Wrap"
                           Foreground="Red" />
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code