Mensuration Image Service Online

This sample demonstrates the use of the mensuration (measure) operations on an ArcGIS image service. Choose a measure operation and units to be returned in the results. The measure operations provided apply to data in this service; more are available. Area/Perimeter - Returns the area and perimeter of a polygon. Centroid - Returns the centroid of a geometry. Distance/Azimuth - Returns distance and angle of a line segment. Height Base to Top - Returns height using building base and top. Height Base to Top Shadow - Returns height using building base and top of shadow. Height Top to Top Shadow - Returns height using building top and top of shadow. Point - Returns a point location. Note, an ArcGISTiledMapServerLayer is used to display the tiled image service.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.MensurationImageService"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
            <esri:SimpleLineSymbol x:Key="DrawLineSymbol" Color="Black" Width="1" />
            <esri:SimpleFillSymbol x:Key="DrawFillSymbol" Fill="Red" BorderBrush="Black" BorderThickness="1" />
            <esri:SimpleMarkerSymbol x:Key="DrawPointSymbol" Style="Circle" Size="12" Color="Red" />
            <esri:SimpleLineSymbol x:Key="DrawPolylineSymbol" Style="Solid" Color="Red" Width="2" />
            <esri:SimpleFillSymbol x:Key="DrawPolygonSymbol" Fill="#AAFF0000" BorderBrush="Red" BorderThickness="1" />
        </Grid.Resources>
        <esri:Map x:Name="MyMap" UseAcceleratedDisplay="True">
            <esri:Map.Extent>
                <esri:Envelope XMin="-8838052.325801775" YMin="5409956.10324135" XMax="-8836537.917179003" YMax="5410659.562767227" >
                    <esri:Envelope.SpatialReference>
                        <esri:SpatialReference WKID="102100"/>
                    </esri:Envelope.SpatialReference>
                </esri:Envelope>
            </esri:Map.Extent>
            <esri:ArcGISTiledMapServiceLayer ID="TiledImageServiceLayer"  
                  Url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Toronto/ImageServer" />
            <esri:GraphicsLayer ID="DrawGraphicsLayer" />
        </esri:Map>
        <Border BorderBrush="Black" VerticalAlignment="Top" BorderThickness="1" Padding="5" Background="White" Margin="10" HorizontalAlignment="Right">
            <StackPanel Orientation="Vertical" >
                <TextBlock TextAlignment="Center" Text="Choose a measure operation and units" 
                      FontWeight="Bold" Height="16" Margin="5" />
                <StackPanel Orientation="Horizontal">
                    <Button x:Name="AaP" Tag="AaP" Content="Area/Perimeter" Click="ActivateMeasureToolClick" IsEnabled="True" Margin="2" />
                    <Button x:Name="Cen" Tag="Cen" Content="Centroid" Click="ActivateMeasureToolClick" IsEnabled="True" Margin="2" />
                    <Button x:Name="DaA" Tag="DaA" Content="Distance/Azimuth" Click="ActivateMeasureToolClick" IsEnabled="True" Margin="2"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Button x:Name="HFBaT" Tag="HFBaT" 
                        Click="ActivateMeasureToolClick" IsEnabled="True" Margin="2" >
                        <TextBlock>Height Base<LineBreak/>to Top</TextBlock>
                    </Button>
                    <Button x:Name="HFBaTS" Tag="HFBaTS" Click="ActivateMeasureToolClick" IsEnabled="True" Margin="2">
                        <TextBlock>Height Base<LineBreak/> to Top Shadow</TextBlock>
                    </Button>
                    <Button x:Name="HFTaTS" Tag="HFTaTS" Click="ActivateMeasureToolClick" IsEnabled="True" Margin="2">
                        <TextBlock>Height Top
                        <LineBreak/> to Top Shadow
                        </TextBlock>
                    </Button>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Button x:Name="Pnt" Tag="Pnt" Content="Point" Click="ActivateMeasureToolClick" IsEnabled="True" Margin="2" />
                    <Button Tag="Clear" Content="Clear" Click="ClearMeasureToolClick" Margin="2" />
                </StackPanel>
                <StackPanel Background="White"  Margin="10">
                    <TextBlock Text="Linear Unit" Margin="15,2"/>
                    <ComboBox SelectedIndex="9" x:Name="comboLinearUnit" Margin="15,2">
                        <ComboBoxItem>esriUnknownUnits</ComboBoxItem>
                        <ComboBoxItem>esriInches</ComboBoxItem>
                        <ComboBoxItem>esriPoints</ComboBoxItem>
                        <ComboBoxItem>esriFeet</ComboBoxItem>
                        <ComboBoxItem>esriYards</ComboBoxItem>
                        <ComboBoxItem>esriMiles</ComboBoxItem>
                        <ComboBoxItem>esriNauticalMiles</ComboBoxItem>
                        <ComboBoxItem>esriMillimeters</ComboBoxItem>
                        <ComboBoxItem>esriCentimeters</ComboBoxItem>
                        <ComboBoxItem>esriMeters</ComboBoxItem>
                        <ComboBoxItem>esriKilometers</ComboBoxItem>
                        <ComboBoxItem>esriDecimalDegrees</ComboBoxItem>
                        <ComboBoxItem>esriDecimeters</ComboBoxItem>
                    </ComboBox>
                    <TextBlock Text="Angular Unit" Margin="15,2" />
                    <ComboBox SelectedIndex="2" x:Name="comboAngularUnit" Margin="15,2">
                        <ComboBoxItem>Default</ComboBoxItem>
                        <ComboBoxItem>Radians</ComboBoxItem>
                        <ComboBoxItem>DecimalDegrees</ComboBoxItem>
                        <ComboBoxItem>DegreesMinutesSeconds</ComboBoxItem>
                        <ComboBoxItem>Gradians</ComboBoxItem>
                        <ComboBoxItem>Gons</ComboBoxItem>
                    </ComboBox>
                    <TextBlock Text="Area Units" Margin="15,2" />
                    <ComboBox SelectedIndex="9" x:Name="comboAreaUnit" Margin="15,2">
                        <ComboBoxItem>Default</ComboBoxItem>
                        <ComboBoxItem>SquareInches</ComboBoxItem>
                        <ComboBoxItem>SquareFeet</ComboBoxItem>
                        <ComboBoxItem>SquareYards</ComboBoxItem>
                        <ComboBoxItem>Acres</ComboBoxItem>
                        <ComboBoxItem>SquareMiles</ComboBoxItem>
                        <ComboBoxItem>SquareMillimeters</ComboBoxItem>
                        <ComboBoxItem>SquareCentimeters</ComboBoxItem>
                        <ComboBoxItem>SquareDecimeters</ComboBoxItem>
                        <ComboBoxItem>SquareMeters</ComboBoxItem>
                        <ComboBoxItem>Ares</ComboBoxItem>
                        <ComboBoxItem>Hectares</ComboBoxItem>
                        <ComboBoxItem>SquareKilometers</ComboBoxItem>
                    </ComboBox>
                </StackPanel>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014