Skip to content

Instantly share code, notes, and snippets.

@rouault
Created May 25, 2015 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rouault/2babfb4e25b41db11688 to your computer and use it in GitHub Desktop.
Save rouault/2babfb4e25b41db11688 to your computer and use it in GitHub Desktop.
gdalinfo speaks json
$ gdalinfo -json byte.tif
{
"description":"byte.tif",
"driverShortName":"GTiff",
"driverLongName":"GeoTIFF",
"files":[
"byte.tif",
"byte.tif.ovr",
"byte.tif.aux.xml"
],
"size":[
20,
20
],
"coordinateSystem":{
"wkt":"PROJCS[\"NAD27 \/ UTM zone 11N\",\n GEOGCS[\"NAD27\",\n DATUM[\"North_American_Datum_1927\",\n SPHEROID[\"Clarke 1866\",6378206.4,294.9786982138982,\n AUTHORITY[\"EPSG\",\"7008\"]],\n AUTHORITY[\"EPSG\",\"6267\"]],\n PRIMEM[\"Greenwich\",0,\n AUTHORITY[\"EPSG\",\"8901\"]],\n UNIT[\"degree\",0.0174532925199433,\n AUTHORITY[\"EPSG\",\"9122\"]],\n AUTHORITY[\"EPSG\",\"4267\"]],\n PROJECTION[\"Transverse_Mercator\"],\n PARAMETER[\"latitude_of_origin\",0],\n PARAMETER[\"central_meridian\",-117],\n PARAMETER[\"scale_factor\",0.9996],\n PARAMETER[\"false_easting\",500000],\n PARAMETER[\"false_northing\",0],\n UNIT[\"metre\",1,\n AUTHORITY[\"EPSG\",\"9001\"]],\n AXIS[\"Easting\",EAST],\n AXIS[\"Northing\",NORTH],\n AUTHORITY[\"EPSG\",\"26711\"]]"
},
"geoTransform":[
440720.0,
60.0,
0.0,
3751320.0,
0.0,
-60.0
],
"metadata":{
"":{
"AREA_OR_POINT":"Area"
},
"IMAGE_STRUCTURE":{
"INTERLEAVE":"BAND"
}
},
"cornerCoordinates":{
"upperLeft":[
440720.0,
3751320.0
],
"lowerLeft":[
440720.0,
3750120.0
],
"upperRight":[
441920.0,
3751320.0
],
"lowerRight":[
441920.0,
3750120.0
],
"center":[
441320.0,
3750720.0
]
},
"wgs84Extent":{
"type":"Polygon",
"coordinates":[
[
[
-117.642054,
33.9023677
],
[
-117.6419729,
33.8915454
],
[
-117.6290752,
33.9024346
],
[
-117.6289957,
33.8916123
],
[
-117.642054,
33.9023677
]
]
]
},
"bands":[
{
"band":1,
"block":[
20,
20
],
"type":"Byte",
"colorInterpretation":"Gray",
"overviews":[
{
"size":[
10,
10
]
}
],
"metadata":{
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment