GeoFeatureCollection Class
A list of features, such as the countries of a map, as the readers return it and the writers take it.
public sealed class GeoFeatureCollection : Collection<GeoFeature>- Inheritance
Collection<GeoFeature>GeoFeatureCollection
Constructors
| Name | Description |
|---|---|
| GeoFeatureCollection() | Initializes a new instance of the GeoFeatureCollection class that is empty. |
| GeoFeatureCollection(IEnumerable<GeoFeature>) | Initializes a new instance of the GeoFeatureCollection class that contains features. |
GeoFeatureCollection overloads
GeoFeatureCollection()
GeoFeatureCollection.csInitializes a new instance of the GeoFeatureCollection class that is empty.
public GeoFeatureCollection()GeoFeatureCollection(IEnumerable<GeoFeature>)
GeoFeatureCollection.csInitializes a new instance of the GeoFeatureCollection class that contains features.
public GeoFeatureCollection(IEnumerable<GeoFeature> features)Parameters
featuresIEnumerable<GeoFeature>- The features.
Properties
| Name | Description |
|---|---|
| CoordinateReferenceSystem | Gets or sets the coordinate reference system of the positions, such as the one of the .prj file of a shapefile, or null when it is not known: the positions are then expected to be longitudes and latitudes of WGS 84. |
| Name | Gets or sets the name of the collection, such as the name of a KML document or of a TopoJSON object, or null. |
CoordinateReferenceSystem
GeoFeatureCollection.csGets or sets the coordinate reference system of the positions, such as the one of the .prj file of a shapefile, or null when it is not known: the positions are then expected to be longitudes and latitudes of WGS 84.
public CoordinateReferenceSystem? CoordinateReferenceSystem { get; set; }Property value
Remarks
The writers do not use it: convert the positions with GeoGeometry.Transform before writing them.
Methods
| Name | Description |
|---|---|
| GetBounds() | Gets the smallest box that contains the geometries of the features. |
| GetBounds(GeoEdgeType) | Gets the smallest box that contains the geometries of the features, whose edges are drawn as an edge type says. |
GetBounds overloads
GetBounds()
GeoFeatureCollection.csGets the smallest box that contains the geometries of the features.
public GeoBounds? GetBounds()Returns
GeoBounds? The box, or null when no feature has a position.
GetBounds(GeoEdgeType)
GeoFeatureCollection.csGets the smallest box that contains the geometries of the features, whose edges are drawn as an edge type says.
public GeoBounds? GetBounds(GeoEdgeType edgeType)Parameters
edgeTypeGeoEdgeType- How the edges are drawn. See
GeoGeometry.GetBounds.
Returns
GeoBounds? The box, or null when no feature has a position. With GeoEdgeType.Geodesic, it can cross the 180th meridian.