Densify and generalize

Densify and generalize a line

Loading

Code

<UserControl x:Class="ArcGISRuntime.WPF.Samples.DensifyAndGeneralize.DensifyAndGeneralize"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
    <Grid>
        <esri: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 Text="Adjust the sliders to see the resulting generalized or densified polyline."
                           Grid.Row="0" Margin="0,0,0,15"
                           TextWrapping="Wrap" FontWeight="Bold" />
                <TextBlock Text="Max. Deviation (Generalize)"
                           Grid.Row="1"
                           FontWeight="SemiBold" />
                <Slider x:Name="DeviationSlider"
                        Grid.Row="2" Margin="0,5,0,0"
                        Value="10" Minimum="1" Maximum="250" />
                <TextBlock Text="Max. Segment length (Densify)"
                           Grid.Row="3"
                           FontWeight="SemiBold" />
                <Slider x:Name="SegmentLengthSlider"
                        Grid.Row="4" Margin="0,5,0,5"
                        Value="100" Minimum="100" Maximum="500" />
                <TextBlock x:Name="ResultLabel"
                           Grid.Row="5"
                           Text="Adjust a slider to start"
                           TextWrapping="Wrap" FontWeight="SemiBold" Foreground="Blue" />
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code