Layer.GetDataBounds Method
Thread safety: This method is not thread-safe and it should only be called from the GUI thread. Show
GetDataBounds(Crs crs)
Calculates the bounds of all dataset coverages in the layer.Syntax
public Rectangle GetDataBounds (
Crs crs
)
Parameters
crs
Type: Crs
The coordinate reference system that the result is defined in.
The coordinate reference system that the result is defined in.
Return Value
Type: Rectangle
The bounds of all dataset coverages in the layer.
The bounds of all dataset coverages in the layer.
Remarks
Datasets returning empty or infinite data coverages are excluded.
Example
// Get data coverage of all DataSets in the Layer in Wgs84LongLat
public static Rectangle GetDataCoverageInWgs84LongLat(Layer layer)
{
// Get the data coverage in Wgs84LongLat of all DataSets in the Layer
return layer.GetDataBounds(Crs.Wgs84LongLat);
}
Platforms
Windows, Linux, Android