User Tools

Site Tools


map_suite_mvc_edition_spatial_functions_samples

This is an old revision of the document!


Map Suite MVC Edition Spatial Functions Samples

Clipping On Line Layer

map_suite_wpf_desktop_edition_sample_clipping_on_line_layer.jpg
View Source | C# Download | Need it in another language? | Wpf

Applies To: MVC \ Desktop \ Web \ Silverlight \ Service \ Wpf

This Wpf project completes the series of projects dedicated to the clipping geoprocessing. We already saw how to perform clipping on a polygon based layer in “Clipping” and on a point layer in “Clipping On Point Layer”. Here we show how to perform the clipping geopressing on a line based layer. As for the same operation on a polygon based layer, the key geometric function is GetIntersection. We will also appreciate the operation of creating a layer from scratch as in addition to the geometric operation itself, geoprocessing also involves creating a result layer from the original layers, the clipping layer and the clipped layer. You will need to get in the Dev Daily Build the latest MapSuiteCore.dll and WpfDesktopEdition.dll as references as the GetIntersection API for line based shapes was added only recentely.


Create Inner Ring

map_suite_web_edition_sample_create_innerring.jpg
View Source | C# Download | Need it in another language? | Desktop

Applies To: MVC \ Desktop \ Web \ Silverlight \ Service \ Wpf

In today’s Desktop project, we learn how to create inner rings to a polygon based on another polygon using the GetDifference function. We also learn how to perform Union on a collection of polygon and how to set up the event TrackEnded. To use this app, you need to track a polygon, double click to end it and it will create an inner ring from the unioned result of the polygons completely within the tracked polygon. You can look at the TrackEnded event handler to see all the different operations taking place for that task.


Distance Query on Projected Layers


View Source | C# Download | Need it in another language? | Desktop

Applies To: MVC \ Desktop \ Web \ Silverlight \ Service \ Wpf

In this sample, we learned how to use the method GetFeaturesWithDistanceOf when the data is projected. We just input the unit which is projected to, do not need to mind what the real unit is for the internal data before projection. It works fine with Map Suite Assemblies 4.5.54.0 or later.


FeatureIdsToExclude

map_suite_web_edition_sample_featureidstoexclude.jpg
View Source | C# Download | Need it in another language? | Desktop

Applies To: MVC \ Desktop \ Web \ Silverlight \ Service \ Wpf

The purpose of this project is to show how to use the FeatureIdsToExclude collection of FeatureLayer. In the project, you will see how you can exclude some features from being part of the GetFeaturesNearestTo function. Using that collection is a handy method for not taking into account some features in doing spatial queries, searching and even drawing without having to change the structure of the layer or create another layer.


Get Feature Clicked On(Web)

map_suite_web_edition_sample_get_feature_clicked_on_web.jpg
View Source | C# Download | Need it in another language? | Web

Applies To: MVC \ Web \ Silverlight

This project is basically the Web version of the previous project “Get Feature Clicked On”. You can see in the Map_Click event of the map the logic for selecting the closest feature clicked on within a buffer in screen coordinate.


Get Feature Clicked On(Web)2

map_suite_web_edition_sample_get_feature_clicked_on_web2.jpg
View Source | C# Download | Need it in another language? | Web

Applies To: MVC \ Web \ Silverlight

This project is a more advanced version of “Get Feature Clicked On (Web)”. We show how to deal with the scenario where you want to get the nearest feature clicked on using multiple layers of different types (point, line and polygon). To have smooth behavior on that function, you need to give priority to point based features, and then line based features over polygon. Please, look at the code to see how this is accomplished.


Intersect Line

map_suite_web_edition_sample_intersect_line.jpg
View Source | C# Download | Need it in another language? | Desktop

Applies To: MVC \ Desktop \ Web \ Silverlight \ Services \ Wpf

In today’s project, we show how to split a line based on an intersecting line. To accomplish this task, basically two steps are needed. First, you need to find the crossing point using the GetCrossing function and then you split the line based on the crossing point using the GetLineOnLine function. If you are in the utilities industry working with electric network, gas pipes etc, you will find this project useful.


Polygon Shapes To Multipolygon Shapes

map_suite_wpf_desktop_edtion_sample_polygon_shapes_to_multipolygon_shapes.jpg
View Source | C# Download | Need it in another language? | Wpf

Applies To: MVC \ Desktop \ Web \ Silverlight \ Services \ Wpf

In this Wpf project, we show how to create a MultipolygonShape from various PolygonShapes. Since a collection of PolygonShapes cannot be directly cast to a MultipolygonShape, we show the technique to build a MultipolygonShape passing an IEnumerable of PolygonShape. This is a Wpf sample and you will need the references for MapSuiteCore.dll and WpfDesktopEdition.dll.


Shortest Line Between Two Features with Split

map_suite_wpf_desktop_edition_sample_shortest_line_splitting_lines.jpg
View Source | C# Download | Need it in another language? | Wpf

Applies To: MVC \ Desktop \ Web \ Silverlight \ Services \ Wpf

This sample will show you how to find the closest line between two features by using the GetShortestLineTo API and how to split a line at a given point using the GetLineOnALine API. These APIs can be very useful when doing spatial analysis and editing of features. This sample also allows you to dynamically alter the test features using the EditOverlay so you can try out different scenarios and see the results quickly. A MapShapes layer is used to display and style the individual results.



Note: This sample requires that you reference DLLs from the Map Suite WPF Desktop Edition daily development build version 7.0.318.0 or later.


Sweep Angle Desktop

map_suite_web_edition_sample_sweep_angle_desktop.jpg
View Source | C# Download | Need it in another language? | Desktop

Applies To: MVC \ Desktop \ Web \ Silverlight \ Services \ Wpf

The purpose of today’s project is to show how to make a desktop project from a Servicess one. Many of the projects published in the Code Community are in the Servicess edition because the only reference for Map Suite required for running them is MapSuiteCore.dll. That dll comes in any of the Map Suite products. We are taking the example of the “Sweep Angle” Servicess project to show how to adapt it to a Desktop project. With the understanding of some basic concepts such as Overlay, you will be able to easily convert a Servicess project to a Desktop one. So, for this project, you will need the references for both MapSuiteCore.dll and DesktopEdition.dll. Next, we will see how to convert a Servicess project to a Web one.


map_suite_mvc_edition_spatial_functions_samples.1441517037.txt.gz · Last modified: 2015/09/06 05:23 by admin