本文整理汇总了C#中FeatureType类的典型用法代码示例。如果您正苦于以下问题:C# FeatureType类的具体用法?C# FeatureType怎么用?C# FeatureType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FeatureType类属于命名空间,在下文中一共展示了FeatureType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateNew
/// <summary>
/// This create new method implies that this provider has the priority for creating a new file.
/// An instance of the dataset should be created and then returned. By this time, the fileName
/// will already be checked to see if it exists, and deleted if the user wants to overwrite it.
/// </summary>
/// <param name="fileName">The string fileName for the new instance</param>
/// <param name="featureType">Point, Line, Polygon etc. Sometimes this will be specified, sometimes it will be "Unspecified"</param>
/// <param name="inRam">Boolean, true if the dataset should attempt to store data entirely in ram</param>
/// <param name="progressHandler">An IProgressHandler for status messages.</param>
/// <returns>An IRaster</returns>
public virtual IFeatureSet CreateNew(string fileName, FeatureType featureType, bool inRam, IProgressHandler progressHandler)
{
if (featureType == FeatureType.Point)
{
PointShapefile ps = new PointShapefile();
ps.Filename = fileName;
return ps;
}
else if (featureType == FeatureType.Line)
{
LineShapefile ls = new LineShapefile();
ls.Filename = fileName;
return ls;
}
else if (featureType == FeatureType.Polygon)
{
PolygonShapefile ps = new PolygonShapefile();
ps.Filename = fileName;
return ps;
}
else if (featureType == FeatureType.MultiPoint)
{
MultiPointShapefile mps = new MultiPointShapefile();
mps.Filename = fileName;
return mps;
}
return null;
}
示例2: GetFeatureInfo
public EnableFeatureInfoRec GetFeatureInfo(DBManager dbManager, FeatureType type, string subType)
{
using (IDBProvider dbInstance = SP.DB.GetInstance(dbManager))
{
return dbInstance._<EnableFeatureAccessor>().SelectInfoByType(GetFeatureTypeKey(type, subType));
}
}
示例3: GetLinkColor
public string GetLinkColor(FeatureType featureType)
{
DgmlColorConfiguration dgmlColor = new DgmlColorConfiguration();
string color = string.Empty;
switch (featureType)
{
case FeatureType.Feature:
case FeatureType.NeededFeature:
color = dgmlColor.FeatureColor;
break;
case FeatureType.NeededExtensions:
color = dgmlColor.NeededExtensionsColor;
break;
case FeatureType.Module:
color = dgmlColor.ModuleColor;
break;
case FeatureType.BindingInterface:
color = dgmlColor.BindingInterfaceColor;
break;
case FeatureType.BindingImpl:
color = dgmlColor.BindingImplColor;
break;
}
return color;
}
示例4: Feature
public Feature(string name, FeatureType featureType)
{
Name = name;
FType = featureType;
MinRound = Rounds.PREFLOP;
MaxRound = Rounds.RIVER;
}
示例5: GetFeatures
public DataTable GetFeatures(FeatureType featureType, IGeometry spatialConstraint)
{
DataTable table = null;
string layerId = featureType == FeatureType.Selection ? _appState.SelectionLayer : _appState.TargetLayer;
if (layerId.Length > 0)
{
Configuration config = AppContext.GetConfiguration();
Configuration.LayerRow layerRow = config.Layer.FindByLayerID(layerId);
CommonDataFrame dataFrame = AppContext.GetDataFrame(_appState.MapTab);
CommonLayer layer = dataFrame.Layers.FirstOrDefault(lyr => String.Compare(lyr.Name, layerRow.LayerName, true) == 0);
string query = GetQuery(featureType, layerRow, layer);
if (query != null)
{
CommonField keyField = layer.FindField(layerRow.KeyField);
if (spatialConstraint == null)
{
table = layer.GetFeatureTable(String.Format("{0},{1}", layer.GeometryField.Name, keyField.Name), query);
}
else
{
table = layer.GetFeatureTable(String.Format("{0},{1}", layer.GeometryField.Name, keyField.Name), query, spatialConstraint);
}
}
}
return table;
}
示例6: GetExtent
public Envelope GetExtent(FeatureType featureType)
{
Envelope extent = new Envelope();
string layerId = featureType == FeatureType.Selection ? _appState.SelectionLayer : _appState.TargetLayer;
Configuration config = AppContext.GetConfiguration();
Configuration.LayerRow layerRow = config.Layer.FindByLayerID(layerId);
CommonDataFrame dataFrame = AppContext.GetDataFrame(_appState.MapTab);
CommonLayer layer = dataFrame.Layers.FirstOrDefault(lyr => String.Compare(lyr.Name, layerRow.LayerName, true) == 0);
string query = GetQuery(featureType, layerRow, layer);
if (query != null)
{
extent = layer.GetFeatureExtent(query);
}
if (!extent.IsNull && extent.Width == 0 && extent.Height == 0)
{
extent = new Envelope(new Coordinate(extent.MinX - 50, extent.MinY - 50), new Coordinate(extent.MaxX + 50, extent.MaxY + 50));
}
return extent;
}
示例7: EnergyEventStatus
public EnergyEventStatus(DeviceBase device, FeatureType featureType, uint featureId, int frequency, ObservableCollection<DeviceEventSettings> emitEvents)
: base(device, featureType, featureId, frequency, emitEvents)
{
EnergyTotal = 0.0;
EventPower = 0;
LastPowerEmitted = 0;
LastEnergyEmitted = 0.0;
}
示例8: Feature
/// CHECKED
/// <summary>
///
/// </summary>
/// <param name="type"></param>
/// <param name="x"></param>
/// <param name="y"></param>
/// <param name="w"></param>
/// <param name="h"></param>
public Feature(FeatureType type, int x, int y, int w, int h)
{
this.type = type;
this.x = x;
this.y = y;
this.w = w;
this.h = h;
}
示例9: Shapefile
/// <summary>
/// Creates a new instance of a shapefile based on a fileName
/// </summary>
/// <param name="fileName">File name</param>
/// <param name="featureType">Feature type</param>
protected Shapefile(string fileName, FeatureType featureType)
: base(featureType)
{
Attributes = new AttributeTable();
Header = new ShapefileHeader();
Open(fileName, null);
}
示例10: FeatureInfo
public FeatureInfo(Type feature, [AllowNull]Type factory, [AllowNull]IEnumerable<Type> dependencies, FeatureType featureType)
{
this.Id = Guid.NewGuid().ToString();
this.Feature = feature;
this.Factory = factory;
this.Dependencies = dependencies;
this.FeatureType = featureType;
this.dependenciesInfo = new List<FeatureInfo>();
this.BindingTarget = BindingTarget.Self;
}
示例11: FeatureInfo
public FeatureInfo(System.Type feature, [NullGuard.AllowNull]System.Type factory, [NullGuard.AllowNull] System.Collections.Generic.IEnumerable<System.Type> dependencies, FeatureType featureType)
{
this.Id = System.Guid.NewGuid().ToString();
this.Feature = feature;
this.Factory = factory;
this.Dependencies = dependencies;
this.FeatureType = featureType;
this.dependenciesInfo = new System.Collections.Generic.List<FeatureInfo>();
this.BindingTarget = Planning.Bindings.BindingTarget.Self;
}
示例12: Enable
public bool Enable(DBManager dbManager, FeatureType type, string subType, bool isManually, string command, string text)
{
return DoUpdate(dbManager,
new EnableFeatureRec
{
Type = GetFeatureTypeKey(type, subType),
IsEnabled = true,
IsManually = isManually,
AuthorUserID = SP.SessionContext.UserID,
Command = command,
Text = text,
Upd = DateTime.Now,
});
}
示例13: featureTypeSubKey
private string featureTypeSubKey(FeatureType featureType)
{
switch (featureType)
{
case FeatureType.Point:
return "points";
case FeatureType.Polyline:
return "polylines";
case FeatureType.Polygon:
return "polygons";
}
return string.Empty;
}
示例14: GenerateLink
public XElement GenerateLink(string sourceElementId, FeatureInfo targetElement, FeatureType featureType)
{
string color = this.colorSelector.GetLinkColor(featureType);
XAttribute label =
string.IsNullOrEmpty(targetElement.BindingTarget.ToString())
? new XAttribute("Label", featureType)
: new XAttribute("Label", "Binding " + targetElement.BindingTarget);
var link = new XElement(
this.nameSpace + "Link",
new XAttribute("Source", sourceElementId),
new XAttribute("Target", targetElement.Id),
new XAttribute("Stroke", color),
new XAttribute("StrokeDashArray", "3"),
label);
return link;
}
示例15: CreateNew
/// <summary>
/// Not Implemented yet
/// </summary>
/// <param name="fileName"></param>
/// <param name="featureType"></param>
/// <param name="inRam"></param>
/// <param name="container"></param>
/// <param name="progressHandler"></param>
/// <returns></returns>
public IFeatureLayer CreateNew(string fileName, FeatureType featureType, bool inRam, ICollection<ILayer> container, IProgressHandler progressHandler)
{
ShapefileDataProvider dp = new ShapefileDataProvider();
IFeatureSet fs = dp.CreateNew(fileName, featureType, inRam, progressHandler);
if (progressHandler == null) progressHandler = LayerManager.DefaultLayerManager.ProgressHandler;
if (fs.FeatureType == FeatureType.Line)
{
return new MapLineLayer(fs, container);
}
if (fs.FeatureType == FeatureType.Polygon)
{
return new MapPolygonLayer(fs, container);
}
if (fs.FeatureType == FeatureType.Point || fs.FeatureType == FeatureType.MultiPoint)
{
return new MapPointLayer(fs, container);
}
return null;
}