当前位置: 首页>>代码示例>>C#>>正文


C# SqlGeometry.STIntersection方法代码示例

本文整理汇总了C#中SqlGeometry.STIntersection方法的典型用法代码示例。如果您正苦于以下问题:C# SqlGeometry.STIntersection方法的具体用法?C# SqlGeometry.STIntersection怎么用?C# SqlGeometry.STIntersection使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SqlGeometry的用法示例。


在下文中一共展示了SqlGeometry.STIntersection方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CutZoomedPixelPolygonByZeroTile

        /// <summary>
        /// Cuts already pixeled geometry by the frame of a tile
        /// </summary>
        /// <param name="poly"></param>
        /// <param name="X"></param>
        /// <param name="Y"></param>
        /// <returns></returns>
        private List<SqlGeometry> CutZoomedPixelPolygonByZeroTile(SqlGeometry poly)
        {
            List<SqlGeometry> result = new List<SqlGeometry>();
            SqlGeometry stroke = null;
            SqlGeometry contour;
            SqlGeometry tileLineString;
            SqlGeometry tobecut;
            SqlGeometry tile = _conv.GetTilePixelBound(0, 0, 1);
            var tiled = poly.STIntersection(tile);
            result.Add(tiled);
            switch (GetOpenGisGeometryType(tiled))
            {

                case OpenGisGeometryType.Polygon:
                    // Получаем контур полигона и внутренние кольца в виде MULTILINESTRING
                    contour = PolygonToMultiLineString(tiled);
                    // удаляем линии среза геометрии по границе тайла
                    tileLineString = tile.ToLineString();
                    tobecut = contour.STIntersection(tileLineString);
                    stroke = contour.STDifference(tobecut);
                    break;
                case OpenGisGeometryType.MultiPolygon:
                    // Получаем контур полигона и внутренние кольца в виде MULTILINESTRING
                    contour = MultiPolygonToMultiLineString(tiled);
                    // удаляем линии среза геометрии по границе тайла
                    tileLineString = tile.ToLineString();
                    tobecut = contour.STIntersection(tileLineString);
                    stroke = contour.STDifference(tobecut);
                    break;
            }
            result.Add(stroke);
            return result;
        }
开发者ID:MoonDav,项目名称:TileRendering,代码行数:40,代码来源:ShapeToTileRendering.cs

示例2: CutZoomedPixelMultiLineStringByTile

 private SqlGeometry CutZoomedPixelMultiLineStringByTile(SqlGeometry poly, int X, int Y)
 {
     SqlGeometry result;
     SqlGeometry tile = _conv.GetTilePixelBound(X, Y, 1);
     result = poly.STIntersection(tile);
     return result;
 }
开发者ID:MoonDav,项目名称:TileRendering,代码行数:7,代码来源:ShapeToTileRendering.cs

示例3: CutZoomedPixelPolygonByTile

 /// <summary>
 /// Вовращает полигон и контур для указанного тайла для полигона без внутренних колец
 /// </summary>
 /// <param name="poly"></param>
 /// <param name="X"></param>
 /// <param name="Y"></param>
 /// <returns></returns>
 private List<SqlGeometry> CutZoomedPixelPolygonByTile(SqlGeometry poly, int X, int Y)
 {
     List<SqlGeometry> result = new List<SqlGeometry>();
     SqlGeometry tile = _conv.GetTilePixelBound(X, Y, 1);
     var tiled = poly.STIntersection(tile);
     // Получаем контур полигона и внутренние кольца в виде MULTILINESTRING
     var contour = PolygonToMultiLineString(tiled);
     result.Add(tiled);
     // удаляем линии среза геометрии по границе тайла
     var tileLineString = tile.ToLineString();
     var tobecut = contour.STIntersection(tileLineString);
     var stroke = contour.STDifference(tobecut);
     result.Add(stroke);
     return result;
 }
开发者ID:MoonDav,项目名称:TileRendering,代码行数:22,代码来源:ShapeToTileRendering.cs


注:本文中的SqlGeometry.STIntersection方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。