本文整理汇总了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();
}
示例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));
}
示例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;
}
示例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));
}