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


C# ProjectionInfo.Matches方法代码示例

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


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

示例1: GetTransform

        // gets transform between raster's native projection and the map projection
        private void GetTransform(ProjectionInfo mapProjection)
        {
            if (mapProjection == null || _projectionWkt == "")
            {
                _transform = null;
                return;
            }

            // get our two projections
            ProjectionInfo srcCoord = new ProjectionInfo();
            srcCoord.ReadEsriString(_projectionWkt);
            ProjectionInfo tgtCoord = mapProjection;

            // raster and map are in same projection, no need to transform
            if (srcCoord.Matches(tgtCoord))
            {
                _transform = null;
                return;
            }

            // create transform
            _transform = new CoordinateTransformation {Source = srcCoord, Target = tgtCoord};
        }
开发者ID:goranpavlovic,项目名称:Gis,代码行数:24,代码来源:GdalRasterLayer.cs

示例2: Reproject

        /// <summary>
        /// Reprojects all of the in-ram vertices of vectors, or else this
        /// simply updates the "Bounds" of image and raster objects
        /// This will also update the projection to be the specified projection.
        /// </summary>
        /// <param name="targetProjection">
        /// The projection information to reproject the coordinates to.
        /// </param>
        public override void Reproject(ProjectionInfo targetProjection)
        {
            base.Reproject(targetProjection);

            if (targetProjection != null)
            {
                //Set the target projection if necessary
                _targetProjection = targetProjection.Matches(_projectionInfo)
                    ? null
                    : targetProjection;
            }
            else
            {
                _targetProjection = null;
            }

            // Adjusting the projection
            Projection = _targetProjection ?? _projectionInfo;

            //Is this necessary?
            //Invalidate(Extent);
        }
开发者ID:haoas,项目名称:DotSpatial.Plugins,代码行数:30,代码来源:BruTileLayer.cs


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