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


C# Feature.GetWellKnownText方法代码示例

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


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

示例1: convertWkbToFeature_Click

        private void convertWkbToFeature_Click(object sender, RoutedEventArgs e)
        {
            byte[] wellKnownBinary = Convert.FromBase64String(wkbTextBox.Text);
            Feature feature = new Feature(wellKnownBinary);

            wktResultTextBox.Text = feature.GetWellKnownText();
        }
开发者ID:MapSuiteSamples,项目名称:MapSuiteSamples,代码行数:7,代码来源:ConvertAFeatureToAndFromWkb.xaml.cs

示例2: CheckOverlayWithinBounds

        void CheckOverlayWithinBounds(Feature feature)
        {
            var errors = new List<string>();
            _geoArray = GeoArray.FromWellKnownText(feature.GetWellKnownText());
            OnPropertyChanged("GeoArray");
#if false
            if (_writeKML)
            {
                var kml = new KMLRoot();
                var folder = new Folder("Overlay Segment Test");
                var segments = _geoArray.Segments.ToArray();
                for (var segment = 0; segment < segments.Length; segment++)
                {
                    segments[segment].Placemark.name = string.Format("Segment {0}", segment);
                    folder.Add(segments[segment].Placemark);
                }
                kml.Document.Add(folder);
                var savePath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments), "Overlay Segment Tests", "OverlaySegmentTest.kml");
                kml.Save(savePath);
                _writeKML = false;
            }
#endif
            if (_geoArray.HasCrossingSegments && !AreCrossingSegmentsAllowed) errors.Add("Perimeter segments may not cross");
            if (_locationBoundsRectangle != null && !_locationBoundsRectangle.Contains(feature.GetShape())) errors.Add("Perimeter must be within location bounds");
            var areaStyle = errors.Count > 0 ? _errorAreaStyle : _normalAreaStyle;
            _wpfMap.EditOverlay.EditShapesLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = areaStyle;
            _wpfMap.EditOverlay.EditShapesLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
            Errors = errors.Count == 0 ? string.Empty : string.Join("\n", errors);
            HasErrors = errors.Count > 0;
            if (HasErrors) Debug.WriteLine(string.Format("Errors: {0}", Errors));
        }
开发者ID:AuditoryBiophysicsLab,项目名称:ESME-Workbench,代码行数:31,代码来源:EditablePolygonOverlayViewModel.cs

示例3: UpdateSpatialFenceByFeature

 public override int UpdateSpatialFenceByFeature(Feature feature)
 {
     int updatedSpatialFenceCount = ExecuteNonQuery(String.Format(CultureInfo.InvariantCulture, "UPDATE SpatialFence SET FenceGeometry = '{0}' WHERE (FeatureID = '{1}')", feature.GetWellKnownText(), feature.Id));
     return updatedSpatialFenceCount;
 }
开发者ID:MapSuiteSamples,项目名称:MapSuiteSamples,代码行数:5,代码来源:TrackingAccessProvider.cs

示例4: InsertSpatialFence

 public override void InsertSpatialFence(Feature feature)
 {
     ExecuteNonQuery(String.Format(CultureInfo.InvariantCulture, "Insert into SpatialFence(FenceGeometry,FeatureID) values('{0}','{1}')", feature.GetWellKnownText(), feature.Id));
 }
开发者ID:MapSuiteSamples,项目名称:MapSuiteSamples,代码行数:4,代码来源:TrackingAccessProvider.cs


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