This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
map_suite_services_edition_spatial_functions_samples [2015/09/18 03:23] admin [Split Polygon Based On Grid] |
map_suite_services_edition_spatial_functions_samples [2017/03/17 03:07] (current) tgwikiupdate |
||
---|---|---|---|
Line 8: | Line 8: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_Clipping_CS_090929.zip|View Source]] | [[Source_Code_ServicesEditionSample_Clipping_CS_090929.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_Clipping_CS_090929.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_Clipping_CS_090929.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 28: | Line 28: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_ClippingOnPointLayer_CS_091005.zip|View Source]] | [[Source_Code_ServicesEditionSample_ClippingOnPointLayer_CS_091005.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_ClippingOnPointLayer_CS_091005.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_ClippingOnPointLayer_CS_091005.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 48: | Line 48: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_ConvexHull_CS_100125.zip|View Source]] | [[Source_Code_ServicesEditionSample_ConvexHull_CS_100125.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_ConvexHull_CS_100125.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_ConvexHull_CS_100125.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 68: | Line 68: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_CorrectingNodes_CS_090923.zip|View Source]] | [[Source_Code_ServicesEditionSample_CorrectingNodes_CS_090923.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_CorrectingNodes_CS_090923.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_CorrectingNodes_CS_090923.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 88: | Line 88: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_CreatePolygonProgramatically_CS_100407.zip|View Source]] | [[Source_Code_ServicesEditionSample_CreatePolygonProgramatically_CS_100407.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_CreatePolygonProgramatically_CS_100407.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_CreatePolygonProgramatically_CS_100407.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 108: | Line 108: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_DissolveOnShapefile_CS_090803.zip|View Source]] | [[Source_Code_ServicesEditionSample_DissolveOnShapefile_CS_090803.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_DissolveOnShapefile_CS_090803.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_DissolveOnShapefile_CS_090803.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 128: | Line 128: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_DissolveWithStatistics_CS_090928.zip|View Source]] | [[Source_Code_ServicesEditionSample_DissolveWithStatistics_CS_090928.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_DissolveWithStatistics_CS_090928.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_DissolveWithStatistics_CS_090928.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 148: | Line 148: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_DrawAPieShape_CS_100204.zip|View Source]] | [[Source_Code_ServicesEditionSample_DrawAPieShape_CS_100204.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_DrawAPieShape_CS_100204.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_DrawAPieShape_CS_100204.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 168: | Line 168: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_DynamicSegmentation_CS_090807.zip|View Source]] | [[Source_Code_ServicesEditionSample_DynamicSegmentation_CS_090807.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_DynamicSegmentation_CS_090807.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_DynamicSegmentation_CS_090807.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 188: | Line 188: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_GetFeatureClickedOnWithProjection_120213.zip|View Source]] | [[Source_Code_ServicesEditionSample_GetFeatureClickedOnWithProjection_120213.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_GetFeatureClickedOnWithProjection_120213.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_GetFeatureClickedOnWithProjection_120213.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 208: | Line 208: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_IdentifyPointWithIcon_CS_091219.zip|View Source]] | [[Source_Code_ServicesEditionSample_IdentifyPointWithIcon_CS_091219.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_IdentifyPointWithIcon_CS_091219.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_IdentifyPointWithIcon_CS_091219.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 228: | Line 228: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_InnerRingContainment_CS_100423.zip|View Source]] | [[Source_Code_ServicesEditionSample_InnerRingContainment_CS_100423.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_InnerRingContainment_CS_100423.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_InnerRingContainment_CS_100423.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 248: | Line 248: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_IntersectingMultiPolygon_CS_100112.zip|View Source]] | [[Source_Code_ServicesEditionSample_IntersectingMultiPolygon_CS_100112.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_IntersectingMultiPolygon_CS_100112.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_IntersectingMultiPolygon_CS_100112.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 268: | Line 268: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_IntersectingTwoLayers_CS_091006.zip|View Source]] | [[Source_Code_ServicesEditionSample_IntersectingTwoLayers_CS_091006.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_IntersectingTwoLayers_CS_091006.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_IntersectingTwoLayers_CS_091006.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 288: | Line 288: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_MergeLineLayers_CS_091201.zip|View Source]] | [[Source_Code_ServicesEditionSample_MergeLineLayers_CS_091201.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_MergeLineLayers_CS_091201.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_MergeLineLayers_CS_091201.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 308: | Line 308: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_MergePointLayers_CS_091201.zip|View Source]] | [[Source_Code_ServicesEditionSample_MergePointLayers_CS_091201.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_MergePointLayers_CS_091201.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_MergePointLayers_CS_091201.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 328: | Line 328: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_MergingLayers_CS_091008.zip|View Source]] | [[Source_Code_ServicesEditionSample_MergingLayers_CS_091008.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_MergingLayers_CS_091008.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_MergingLayers_CS_091008.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 335: | Line 335: | ||
[[Map Suite Samples Alternate Languages | Need it in another language?]] | [[Map Suite Samples Alternate Languages | Need it in another language?]] | ||
</div> | </div> | ||
- | If you have many files of the same type and representing the same type of features, Map Suite offers an API for building a multi index and treating all the various files as one layer. You can see this Discussion Forum post for more info on that: http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/5921/afv/topic/Default.aspx \\ While this is very convenient, you may still want to combine all your files into one for maintenance purpose. This project shows the geoprocessing technique of accomplishing that task with merging. The logic for writing the merging algorithm is simpler than other geoprocessing tasks since no geometric functions are involved.\\ \\ Keep in mind that this project shows how to merge polygon based shapefiles into one. In the future, we will post a more generic project for layer of various format and type. | + | If you have many files of the same type and representing the same type of features, Map Suite offers an API for building a multi index and treating all the various files as one layer. You can see this Discussion Forum post for more info at [[http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/5921/afv/topic/Default.aspx|here]] \\ While this is very convenient, you may still want to combine all your files into one for maintenance purpose. This project shows the geoprocessing technique of accomplishing that task with merging. The logic for writing the merging algorithm is simpler than other geoprocessing tasks since no geometric functions are involved.\\ \\ Keep in mind that this project shows how to merge polygon based shapefiles into one. In the future, we will post a more generic project for layer of various format and type. |
</div> | </div> | ||
</div> | </div> | ||
Line 348: | Line 348: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_MultiRingBuffering_CS_090921.zip|View Source]] | [[Source_Code_ServicesEditionSample_MultiRingBuffering_CS_090921.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_MultiRingBuffering_CS_090921.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_MultiRingBuffering_CS_090921.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 368: | Line 368: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_NegativeBuffering_CS_091120.zip|View Source]] | [[Source_Code_ServicesEditionSample_NegativeBuffering_CS_091120.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_NegativeBuffering_CS_091120.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_NegativeBuffering_CS_091120.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 388: | Line 388: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_OffsetPointAtRightAngle_CS_100323.zip|View Source]] | [[Source_Code_ServicesEditionSample_OffsetPointAtRightAngle_CS_100323.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_OffsetPointAtRightAngle_CS_100323.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_OffsetPointAtRightAngle_CS_100323.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 408: | Line 408: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_RegisterShape_CS_100128.zip|View Source]] | [[Source_Code_ServicesEditionSample_RegisterShape_CS_100128.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_RegisterShape_CS_100128.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_RegisterShape_CS_100128.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 428: | Line 428: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_RemoveLineShape_CS_100425.zip|View Source]] | [[Source_Code_ServicesEditionSample_RemoveLineShape_CS_100425.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_RemoveLineShape_CS_100425.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_RemoveLineShape_CS_100425.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 448: | Line 448: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_SpatialJoin_CS_090918.zip|View Source]] | [[Source_Code_ServicesEditionSample_SpatialJoin_CS_090918.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_SpatialJoin_CS_090918.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_SpatialJoin_CS_090918.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 468: | Line 468: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_SplitPolygon_CS_091121.zip|View Source]] | [[Source_Code_ServicesEditionSample_SplitPolygon_CS_091121.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_SplitPolygon_CS_091121.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_SplitPolygon_CS_091121.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 488: | Line 488: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_SplitPolygonsBasedOnGrid_CS_120321.zip|View Source]] | [[Source_Code_ServicesEditionSample_SplitPolygonsBasedOnGrid_CS_120321.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_SplitPolygonsBasedOnGrid_CS_120321.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_SplitPolygonsBasedOnGrid_CS_120321.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 496: | Line 496: | ||
</div> | </div> | ||
This utility was designed to grid high point-count polygons to aid in faster rendering. It is one of the utilities used in the [[Map_Suite_Performance_Guide#Grid_Detailed_Polygons|Performance Guide]] section of the wiki and is also featured in a [[http://download.thinkgeo.com/Videos/Wiki/IncreasingPolygonPerformance.wmv|performance learning video]]. \\ \\ **From the [[Map_Suite_Performance_Guide#Grid_Detailed_Polygons|Performance Guide]]:** \\ \\ One way to dramatically increase performance is to grid your polygons, thus getting them into an optimized state for rendering. What we want to do is get the average tile render time to be as low as possible. Typically, the features that take the longest time to draw are high point-count polygon layers. Imagine you are rendering a low-level tile that is essentially blank. Most places are empty space at the lowest level, containing perhaps only a small road segment or something similar. To render this, you typically use the country / region polygon to render the earth tone that is the background of your map. There may also be large polygons as well which, while not in view, will be loaded as the tile being rendered is within their spatial bounding box. In order for that simple tile to draw, it needs to read the large region polygon, which may have hundreds of thousands of points, and draw it. While most or all of the points are clipped at run-time, it still takes time to load the bytes from disk, transform to well-known binary, clip them, etc. In many examples, a simple tile can take 500 milliseconds to draw even though it is essentially blank. This makes every area on the map very heavy and inefficient. \\ \\ To solve this issue, we suggest that you grid and split your polygon Shapefiles specifically for improved drawing speed. In this process we take your original high point-count polygon and split it with a grid, with a size depending on the target scale, so that much of the old polygon's area is made of very simple squares with each being composed of just the square's edges. When your simple tile goes to draw, it finds the simple square, draws that and the whole process avoids loading and drawing the tens of thousands of points. We regularly see rendering times for the layer decrease from 500ms to less than 5ms. | This utility was designed to grid high point-count polygons to aid in faster rendering. It is one of the utilities used in the [[Map_Suite_Performance_Guide#Grid_Detailed_Polygons|Performance Guide]] section of the wiki and is also featured in a [[http://download.thinkgeo.com/Videos/Wiki/IncreasingPolygonPerformance.wmv|performance learning video]]. \\ \\ **From the [[Map_Suite_Performance_Guide#Grid_Detailed_Polygons|Performance Guide]]:** \\ \\ One way to dramatically increase performance is to grid your polygons, thus getting them into an optimized state for rendering. What we want to do is get the average tile render time to be as low as possible. Typically, the features that take the longest time to draw are high point-count polygon layers. Imagine you are rendering a low-level tile that is essentially blank. Most places are empty space at the lowest level, containing perhaps only a small road segment or something similar. To render this, you typically use the country / region polygon to render the earth tone that is the background of your map. There may also be large polygons as well which, while not in view, will be loaded as the tile being rendered is within their spatial bounding box. In order for that simple tile to draw, it needs to read the large region polygon, which may have hundreds of thousands of points, and draw it. While most or all of the points are clipped at run-time, it still takes time to load the bytes from disk, transform to well-known binary, clip them, etc. In many examples, a simple tile can take 500 milliseconds to draw even though it is essentially blank. This makes every area on the map very heavy and inefficient. \\ \\ To solve this issue, we suggest that you grid and split your polygon Shapefiles specifically for improved drawing speed. In this process we take your original high point-count polygon and split it with a grid, with a size depending on the target scale, so that much of the old polygon's area is made of very simple squares with each being composed of just the square's edges. When your simple tile goes to draw, it finds the simple square, draws that and the whole process avoids loading and drawing the tens of thousands of points. We regularly see rendering times for the layer decrease from 500ms to less than 5ms. | ||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | ---- | ||
+ | <div sampleitem> | ||
+ | |||
+ | ==== Split Polygon Dynamically into Grids based on the Area ==== | ||
+ | <div screenshot> | ||
+ | {{servicesedition:codesamples:dynamicgrid.png?300x180}} | ||
+ | </div> | ||
+ | <div content> | ||
+ | <div download_viewsource_buttons> | ||
+ | [[Source_Code_ServicesEditionSample_SplitPolygonintoGridBasedOnArea_CS_120321.zip|View Source]] | ||
+ | {{servicesedition:ServicesEditionSample_SplitPolygonintoGridBasedOnArea_CS_120321.zip|C# Download}} | ||
+ | </div> | ||
+ | <div sample_otherlinks> | ||
+ | [[Map Suite Samples Applies To|Applies To: Desktop \ Web \ Silverlight \ Services \ Wpf ]] | ||
+ | \\ | ||
+ | [[Map Suite Samples Alternate Languages | Need it in another language?]] | ||
+ | </div>This utility was designed to create a “Dynamic Grid” based on the area of the shape, for example, grids in Russia should be bigger than the grids in France. Compared with the fixed size grid in sample [[http://wiki.thinkgeo.com/wiki/map_suite_services_edition_all_samples#split_polygon_based_on_grid|http://wiki.thinkgeo.com/wiki/map_suite_services_edition_all_samples#split_polygon_based_on_grid]] , it’s more efficient and has better drawing performance. | ||
+ | |||
+ | \\ \\ **From the [[Map_Suite_Performance_Guide#Grid_Detailed_Polygons|Performance Guide]]:** \\ \\ One way to dramatically increase performance is to grid your polygons, thus getting them into an optimized state for rendering. What we want to do is get the average tile render time to be as low as possible. Typically, the features that take the longest time to draw are high point-count polygon layers. Imagine you are rendering a low-level tile that is essentially blank. Most places are empty space at the lowest level, containing perhaps only a small road segment or something similar. To render this, you typically use the country / region polygon to render the earth tone that is the background of your map. There may also be large polygons as well which, while not in view, will be loaded as the tile being rendered is within their spatial bounding box. In order for that simple tile to draw, it needs to read the large region polygon, which may have hundreds of thousands of points, and draw it. While most or all of the points are clipped at run-time, it still takes time to load the bytes from disk, transform to well-known binary, clip them, etc. In many examples, a simple tile can take 500 milliseconds to draw even though it is essentially blank. This makes every area on the map very heavy and inefficient. \\ \\ To solve this issue, we suggest that you grid and split your polygon Shapefiles specifically for improved drawing speed. In this process we take your original high point-count polygon and split it with a grid, with a size depending on the target scale, so that much of the old polygon's area is made of very simple squares with each being composed of just the square's edges. When your simple tile goes to draw, it finds the simple square, draws that and the whole process avoids loading and drawing the tens of thousands of points. We regularly see rendering times for the layer decrease from 500ms to less than 5ms. | ||
</div> | </div> | ||
</div> | </div> | ||
Line 508: | Line 530: | ||
<div download_viewsource_buttons> | <div download_viewsource_buttons> | ||
[[Source_Code_ServicesEditionSample_SweepAngle_CS_100503.zip|View Source]] | [[Source_Code_ServicesEditionSample_SweepAngle_CS_100503.zip|View Source]] | ||
- | {{:File:ServicesEditionSample_SweepAngle_CS_100503.zip|C# Download}} | + | {{filehistory:ServicesEditionSample_SweepAngle_CS_100503.zip|C# Download}} |
</div> | </div> | ||
<div sample_otherlinks> | <div sample_otherlinks> | ||
Line 516: | Line 538: | ||
</div> | </div> | ||
For your GIS needs, you might have the need to construct a shape as a pie with a sweep angle for doing spatial analysis similar to radar. In this project, we show how to build a polygon based on a sweep angle and have it dynamically widens the angle while checking the containment of a collection of points. The key function in this project is CreatePie that has all the geometry necessary for creating such a shape. | For your GIS needs, you might have the need to construct a shape as a pie with a sweep angle for doing spatial analysis similar to radar. In this project, we show how to build a polygon based on a sweep angle and have it dynamically widens the angle while checking the containment of a collection of points. The key function in this project is CreatePie that has all the geometry necessary for creating such a shape. | ||
- | </div> | ||
</div> | </div> | ||
---- | ---- | ||
+ | <div sampleitem> | ||
+ | ==== Splitting Polygons with a Line ==== | ||
+ | <div screenshot> | ||
+ | {{servicesedition:codesamples:split.jpg?300x180}} | ||
+ | </div> | ||
+ | <div content> | ||
+ | <div download_viewsource_buttons> | ||
+ | {{filehistory:splitpolygon.zip|C# Download}} | ||
+ | </div> | ||
+ | <div sample_otherlinks> | ||
+ | [[Map Suite Samples Applies To|Applies To: Desktop\ Web\ Silverlight \ Services\ Wpf]] | ||
+ | \\ | ||
+ | [[Map Suite Samples Alternate Languages | Need it in another language?]] | ||
+ | </div> | ||
+ | This projects demonstrates how you can split a polygon with a line. This can be useful for users in land management allowing them to split fields and parcels or any other type of polygon. | ||
+ | </div> | ||
+ | </div> |