Lists information about a raster/vector dataset.
Parameters:
Name | Type | Description |
---|---|---|
dataset |
TypeDefs.Dataset
|
Dataset |
Returns:
- Type:
-
Promise.<TypeDefs.DatasetInfo>
"Promise" returns an object containing file information.
Examples
const dataset = (await Gdal.open("...")).datasets[0];
const datasetInfo = await Gdal.getInfo(dataset);
console.log(datasetInfo);
// Raster output
{
"type": "raster",
"bandCount": 1,
"width": 514,
"height": 515,
"projectionWkt": "PROJCS[\"unnamed\",GEOGCS[\"NAD27\",DATUM[\"North_American_Datum_1927\",SPHEROID[\"Clarke 1866\",6378206.4,294.978698213898,AUTHORITY[\"EPSG\",\"7008\"]],AUTHORITY[\"EPSG\",\"6267\"]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4267\"]],PROJECTION[\"Cylindrical_Equal_Area\"],PARAMETER[\"standard_parallel_1\",33.75],PARAMETER[\"central_meridian\",-117.333333333333],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]",
"coordinateTransform": {
"0": -28493.166784412522,
"1": 60.02213698319374,
"2": 0,
"3": 4255884.5438021915,
"4": 0,
"5": -60.02213698319374
},
"corners": [
[
-28493.166784412522,
4255884.5438021915
],
[
2358.211624949061,
4255884.5438021915
],
[
2358.211624949061,
4224973.143255847
],
[
-28493.166784412522,
4224973.143255847
]
],
"driverName": "GeoTIFF",
"dsName": "/input/cea.tif"
}
// Vector output
{
"type": "vector",
"layerCount": 1,
"featureCount": 2,
"layers": [
{
"name": "polygon",
"featureCount": 2
}
],
"dsName": "/input/polygon.geojson",
"driverName": "GeoJSON"
}