📄 feature.cs
字号:
/// <summary>
/// Encapsulates a single LineString to represent centerLineOf or edgeOf properties.
/// </summary>
[Serializable]
[XmlType(Namespace="http://www.opengis.net/gml")]
[XmlRoot("lineStringProperty", Namespace="http://www.opengis.net/gml", IsNullable=false)]
public class LineStringPropertyType : GeometryPropertyType
{
/// <summary>
/// Constructs empty LineStringProperty.
/// </summary>
public LineStringPropertyType() { }
/// <summary>
/// Constructs LineStringProperty which encapsulates a LineStringType.
/// </summary>
/// <param name="aLine">LineStringType to be set as Item for this property</param>
public LineStringPropertyType(gml.LineStringType aLine) : base(aLine) {}
[XmlIgnore]
protected override int objcomp{get{return 20;}}
}
/// <summary>
/// Encapsulates a single LineString to represent edgeOf property. Alias for lineStringProperty
/// </summary>
public class edgeOf : LineStringPropertyType { public edgeOf(){ } }
/// <summary>
/// Encapsulates a single LineString to represent centerLineOf property. Alias for lineStringProperty
/// </summary>
public class centerLineOf : LineStringPropertyType { public centerLineOf(){ } }
/// <summary>
/// Encapsulates a single polygon to represent coverage or extentOf properties.
/// </summary>
[Serializable]
[XmlType(Namespace="http://www.opengis.net/gml")]
[XmlRoot("polygonProperty", Namespace="http://www.opengis.net/gml", IsNullable=false)]
public class PolygonPropertyType : GeometryPropertyType
{
/// <summary>
/// Constructs empty PolygonProperty.
/// </summary>
public PolygonPropertyType(){ }
/// <summary>
/// Constructs PolygonProperty which encapsulates a PolygonType.
/// </summary>
/// <param name="aPgon">PolygonType to be set as Item for this property</param>
public PolygonPropertyType(gml.PolygonType aPgon) : base(aPgon) {}
[XmlIgnore]
protected override int objcomp{get{return 30;}}
}
/// <summary>
/// Encapsulates a single polygon to represent extentOf property. Alias for polygonProperty.
/// </summary>
public class extentOf : PolygonPropertyType { public extentOf(){ } }
/// <summary>
/// Encapsulates a single polygon to represent coverage property. Alias for polygonProperty.
/// </summary>
public class coverage : PolygonPropertyType { public coverage(){ } }
#endregion
#region aggregate geometry properties
/// <summary>
/// Encapsulates a MultiGeometry element.
/// </summary>
[Serializable]
[XmlType(Namespace="http://www.opengis.net/gml")]
[XmlRoot("multiGeometryProperty", Namespace="http://www.opengis.net/gml", IsNullable=false)]
public class MultiGeometryPropertyType : GeometryPropertyType
{
//Item already in base class
/// <summary>
/// The MultiGeometry element encapsulated by this property.
/// </summary>
public GeometryCollectionType MultiGeometry;
/// <summary>
/// Constructs new MultiGeometryProperty.
/// </summary>
public MultiGeometryPropertyType() { }
/// <summary>
/// Constructs new MultiGeometryProperty which encapsulates a GeometryCollection.
/// </summary>
/// <param name="coll">GeometryCollection to be set as Item for this property</param>
public MultiGeometryPropertyType(gml.GeometryCollectionType coll) : base(coll) {}
[XmlIgnore]
protected override int objcomp{get{return 40;}}
}
/// <summary>
/// Encapsulates a MultiPoint element to represent the following
/// discontiguous geometric properties: multiLocation, multiPosition, multiCenterOf.
/// </summary>
[Serializable]
[XmlType(Namespace="http://www.opengis.net/gml")]
[XmlRoot("multiPointProperty", Namespace="http://www.opengis.net/gml", IsNullable=false)]
public class MultiPointPropertyType : GeometryPropertyType
{
//Item already in base class
/// <summary>
/// Constructs empty MultiPointProperty
/// </summary>
public MultiPointPropertyType() {}
/// <summary>
/// Constructs new MultiPointProperty which encapsulates a MultiPointType.
/// </summary>
/// <param name="mpoint">MultiPoint to be set as Item for this property</param>
public MultiPointPropertyType(gml.MultiPointType mpoint) : base(mpoint) {}
[XmlIgnore]
protected override int objcomp{get{return 50;}}
}
/// <summary>
/// Encapsulates a MultiPoint element to represent multiLocation. Alias for MultiPointProperty
/// </summary>
public class multiLocation : MultiPointPropertyType { public multiLocation(){ } }
/// <summary>
/// Encapsulates a MultiPoint element to represent multiCenterOf. Alias for MultiPointProperty
/// </summary>
public class multiCenterOf : MultiPointPropertyType { public multiCenterOf(){ } }
/// <summary>
/// Encapsulates a MultiPoint element to represent multiPosition. Alias for MultiPointProperty
/// </summary>
public class multiPosition : MultiPointPropertyType { public multiPosition(){ } }
/// <summary>
/// Encapsulates a MultiLineString element to represent the following
/// discontiguous geometric properties: multiEdgeOf, multiCenterLineOf.
/// </summary>
[Serializable]
[XmlType(Namespace="http://www.opengis.net/gml")]
[XmlRoot("multiLineStringProperty", Namespace="http://www.opengis.net/gml", IsNullable=false)]
public class MultiLineStringPropertyType : GeometryPropertyType
{
/// <summary>
/// Constructs new empty MultiLineStringProperty.
/// </summary>
public MultiLineStringPropertyType(){}
/// <summary>
/// Constructs new MultiLineStringProperty which encapsulates a MultiLineStringType.
/// </summary>
/// <param name="mlstring">MultiLineString to be set as Item for this property</param>
public MultiLineStringPropertyType(gml.MultiLineStringType mlstring) : base(mlstring) {}
[XmlIgnore]
protected override int objcomp{get{return 60;}}
}
/// <summary>
/// Encapsulates a MultiLineString element to represent multiCenterLineOf. Alias for MultiLineStringProperty.
/// </summary>
public class multiCenterLineOf : MultiLineStringPropertyType { public multiCenterLineOf(){ } }
/// <summary>
/// Encapsulates a MultiLineString element to represent multiEdgeOf. Alias for MultiLineStringProperty.
/// </summary>
public class multiEdgeOf : MultiLineStringPropertyType { public multiEdgeOf(){ } }
/// <summary>
/// Encapsulates a MultiPolygon to represent the following discontiguous
/// geometric properties: multiCoverage, multiExtentOf.
/// </summary>
[Serializable]
[XmlType(Namespace="http://www.opengis.net/gml")]
[XmlRoot("multiPolygonProperty", Namespace="http://www.opengis.net/gml", IsNullable=false)]
public class MultiPolygonPropertyType : GeometryPropertyType
{
/// <summary>
/// Constructs new empty MultiPolygonProperty.
/// </summary>
public MultiPolygonPropertyType() { }
/// <summary>
/// Constructs new MultiPolygonProperty which encapsulates a MultiPolygonType.
/// </summary>
/// <param name="mpgon">MultiPolygon to be set as Item for this property</param>
public MultiPolygonPropertyType(gml.MultiPolygonType mpgon) : base(mpgon){}
[XmlIgnore]
protected override int objcomp{get{return 70;}}
}
/// <summary>
/// Encapsulates a MultiPolygon to represent multiExtentOf. Alias for multiPolygonProperty.
/// </summary>
public class multiExtentOf : MultiPolygonPropertyType { public multiExtentOf(){ } }
/// <summary>
/// Encapsulates a MultiPolygon to represent multiCoverage. Alias for multiPolygonProperty.
/// </summary>
public class multiCoverage : MultiPolygonPropertyType { public multiCoverage(){ } }
#endregion
#region bounding box and nulltype
/// <summary>
/// Bounding shapes--a Box or a null element.
/// </summary>
[Serializable]
[XmlType(Namespace="http://www.opengis.net/gml")]
[XmlRoot("boundedBy", Namespace="http://www.opengis.net/gml", IsNullable=false)]
public class BoundingShapeType
{
/// <summary>
/// The bounding shape value.
/// </summary>
[XmlElement("Box", typeof(BoxType))]
[XmlElement("null", typeof(NullType))]
public object Item;
/// <summary>
/// Constructs new BoundingShape with default NullType unknown.
/// </summary>
public BoundingShapeType() { Item=new NullType(); }
/// <summary>
/// Constructs new BoundingShape from a BoxType.
/// </summary>
/// <param name="box"></param>
public BoundingShapeType(gml.BoxType box)
{
Item=box;
}
/// <summary>
/// Constructs new BoundingShape from a specified NullType.
/// </summary>
/// <param name="boxnull"></param>
public BoundingShapeType(gml.NullType boxnull)
{
Item=boxnull;
}
}
/// <summary>
/// If a bounding shape is not provided for a feature collection
/// </summary>
[Serializable]
[XmlType(Namespace="http://www.opengis.net/gml")]
public class NullType
{
/// <summary>
/// String value of the NullType choice
/// </summary>
[XmlChoiceIdentifier("itemType")]
[XmlText]
public string NullChoice;
/// <summary>
/// Enumerated choice of the NullType
/// </summary>
[XmlIgnore]
public NullTypeChoice itemType;
/// <summary>
/// create NullType with initial choice "unknown"
/// </summary>
public NullType()
{
NullChoice ="unknown";
itemType = NullTypeChoice.unknown;
}
/// <summary>
/// create NullType with choice value of :
/// "inapplicable","unknown","unavailable","missing"
/// </summary>
public NullType(string choiceString)
{
NullChoice=choiceString;
switch (choiceString)
{
case "inapplicable" :
itemType=NullTypeChoice.inapplicable;
break;
case "unknown" :
itemType=NullTypeChoice.unknown;
break;
case "unavailable" :
itemType=NullTypeChoice.unavailable;
break;
case "missing" :
itemType=NullTypeChoice.missing;
break;
default:
NullChoice=null;
throw new System.ArgumentOutOfRangeException("choice : ",choiceString," not applicable for gml:NullType.");
//break;
}
}
}
/// <summary>
/// Enumeration for reasons of using this NullType
/// </summary>
[Serializable]
[XmlType(IncludeInSchema = false)]
public enum NullTypeChoice
{
inapplicable,
unknown,
unavailable,
missing,
}
#endregion
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -