[gdal-dev] Time in GDAL

Dmitry Baryshnikov bishop.dev at gmail.com
Mon Oct 16 03:35:05 PDT 2017


Hi,

For some imagery metadata the Acquisition date and time is the center of 
scene (end timestamp minus start). Also for one-shot camera there is 
only the one moment there the imagery was captured.

I believe that this 3 parameters (SATELLITEID, CLOUDCOVER, 
ACQUISITIONDATETIME) are common for any satellite/aerial imagery.

The many other parameters from imagery metadata also exported to 
GDALDataset metadata domain "", but they are not common to any 
satellite/aerial imagery and may vary from Provider/Satellite/Camera etc.

For example for DigitalGlobe satellite imagery the full metadata looks like:

$ gdalinfo -mdd all 14SEP05095603-P2AS-053903708010_01_P001.TIL
Driver: TIL/EarthWatch .TIL
Files: 14SEP05095603-P2AS-053903708010_01_P001.TIL
        ./14SEP05095603-P2AS-053903708010_01_P001.TIF
        14SEP05095603-P2AS-053903708010_01_P001.IMD
        14SEP05095603-P2AS-053903708010_01_P001.RPB
        14SEP05095603-P2AS-053903708010_01_P001.XML
Size is 5656, 6538
Coordinate System is:
PROJCS["WGS 84 / UTM zone 33N",
     GEOGCS["WGS 84",
         DATUM["WGS_1984",
             SPHEROID["WGS 84",6378137,298.257223563,
                 AUTHORITY["EPSG","7030"]],
             AUTHORITY["EPSG","6326"]],
         PRIMEM["Greenwich",0],
         UNIT["degree",0.0174532925199433],
         AUTHORITY["EPSG","4326"]],
     PROJECTION["Transverse_Mercator"],
     PARAMETER["latitude_of_origin",0],
     PARAMETER["central_meridian",15],
     PARAMETER["scale_factor",0.9996],
     PARAMETER["false_easting",500000],
     PARAMETER["false_northing",0],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]],
     AUTHORITY["EPSG","32633"]]
Origin = (297822.399916459980886,4640476.799998810514808)
Pixel Size = (0.400000000000000,-0.400000000000000)
Metadata:
   METADATATYPE=DG
Metadata (IMD):
   bandId="P"
   BAND_P.absCalFactor=5.273360e-02
   BAND_P.effectiveBandwidth=2.846000e-01
   BAND_P.LLHAE=91.66
   BAND_P.LLLat=41.86684502
   BAND_P.LLLon=12.56391718
   BAND_P.LRHAE=91.66
   BAND_P.LRLat=41.86741975
   BAND_P.LRLon=12.59114917
   BAND_P.TDILevel=48
   BAND_P.ULHAE=91.66
   BAND_P.ULLat=41.89037482
   BAND_P.ULLon=12.56302285
   BAND_P.URHAE=91.66
   BAND_P.URLat=41.89095002
   BAND_P.URLon=12.59026482
   bitsPerPixel=16
   compressionType="None"
   generationTime=2014-09-30T18:42:14.000000Z
   imageDescriptor="ORStandard2A"
   IMAGE_1.attitudeKnowledgeSrc="R"
   IMAGE_1.avgLineRate=20000.04
   IMAGE_1.CatId="1040010001338D00"
   IMAGE_1.cloudCover=0.027
   IMAGE_1.colUncertainty=10.60
   IMAGE_1.exposureDuration=0.00005000
   IMAGE_1.firstLineTime=2014-09-05T09:56:03.000901Z
   IMAGE_1.maxCollectedColGSD=0.322
   IMAGE_1.maxCollectedRowGSD=0.328
   IMAGE_1.maxCrossTrackViewAngle=-3.0
   IMAGE_1.maxInTrackViewAngle=-13.4
   IMAGE_1.maxOffNadirViewAngle=13.7
   IMAGE_1.maxSatAz=203.5
   IMAGE_1.maxSatEl=74.9
   IMAGE_1.maxSunAz=150.3
   IMAGE_1.maxSunEl=51.6
   IMAGE_1.meanCollectedColGSD=0.322
   IMAGE_1.meanCollectedGSD=0.325
   IMAGE_1.meanCollectedRowGSD=0.328
   IMAGE_1.meanCrossTrackViewAngle=-3.1
   IMAGE_1.meanInTrackViewAngle=-13.4
   IMAGE_1.meanOffNadirViewAngle=13.7
   IMAGE_1.meanSatAz=203.4
   IMAGE_1.meanSatEl=74.7
   IMAGE_1.meanSunAz=150.3
   IMAGE_1.meanSunEl=51.6
   IMAGE_1.minCollectedColGSD=0.321
   IMAGE_1.minCollectedRowGSD=0.328
   IMAGE_1.minCrossTrackViewAngle=-3.1
   IMAGE_1.minInTrackViewAngle=-13.4
   IMAGE_1.minOffNadirViewAngle=13.7
   IMAGE_1.minSatAz=203.3
   IMAGE_1.minSatEl=74.6
   IMAGE_1.minSunAz=150.3
   IMAGE_1.minSunEl=51.6
   IMAGE_1.mode="FullSwath"
   IMAGE_1.PNIIRS=5.3
   IMAGE_1.positionKnowledgeSrc="R"
   IMAGE_1.resamplingKernel="MTF"
   IMAGE_1.revNumber=337
   IMAGE_1.rowUncertainty=22.29
   IMAGE_1.satId="WV03"
   IMAGE_1.scanDirection="Forward"
   MAP_PROJECTED_PRODUCT.colSpacing=0.40
   MAP_PROJECTED_PRODUCT.datumName="WE"
   MAP_PROJECTED_PRODUCT.datumOffset=(0.000,0.000,0.000)
   MAP_PROJECTED_PRODUCT.DEMCorrection="Base Elevation"
MAP_PROJECTED_PRODUCT.earliestAcqTime=2014-09-05T09:56:03.952766Z
   MAP_PROJECTED_PRODUCT.inverseFlattening=298.257223563
   MAP_PROJECTED_PRODUCT.latestAcqTime=2014-09-05T09:56:03.952766Z
   MAP_PROJECTED_PRODUCT.LLH=91.66
   MAP_PROJECTED_PRODUCT.LLX=297822.59991669
   MAP_PROJECTED_PRODUCT.LLY=4637861.79999881
   MAP_PROJECTED_PRODUCT.LRH=91.66
   MAP_PROJECTED_PRODUCT.LRX=300084.59992299
   MAP_PROJECTED_PRODUCT.LRY=4637861.79999884
   MAP_PROJECTED_PRODUCT.mapHemi="N"
   MAP_PROJECTED_PRODUCT.mapProjCode=1
   MAP_PROJECTED_PRODUCT.mapProjName="UTM"
MAP_PROJECTED_PRODUCT.mapProjParam=(0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000,0.000000000)
   MAP_PROJECTED_PRODUCT.mapZone=33
   MAP_PROJECTED_PRODUCT.numGCP=0
   MAP_PROJECTED_PRODUCT.orientationAngle=0.0
   MAP_PROJECTED_PRODUCT.originX=297822.59991646
   MAP_PROJECTED_PRODUCT.originY=4640476.59999881
   MAP_PROJECTED_PRODUCT.productGSD=0.40
   MAP_PROJECTED_PRODUCT.productUnits="M"
   MAP_PROJECTED_PRODUCT.rowSpacing=0.40
   MAP_PROJECTED_PRODUCT.semiMajorAxis=6378137.0000
   MAP_PROJECTED_PRODUCT.terrainHae=91.66
   MAP_PROJECTED_PRODUCT.ULH=91.66
   MAP_PROJECTED_PRODUCT.ULX=297822.59991646
   MAP_PROJECTED_PRODUCT.ULY=4640476.59999881
   MAP_PROJECTED_PRODUCT.URH=91.66
   MAP_PROJECTED_PRODUCT.URX=300084.59992277
   MAP_PROJECTED_PRODUCT.URY=4640476.59999884
   numberOfLooks=1
   numColumns=5656
   numRows=6538
   outputFormat="GeoTIFF"
   panSharpenAlgorithm="None"
   productCatalogId="203001012C130A00"
   productLevel="LV2A"
   productOrderId="053903708010_01_P001"
   productType="Standard"
   radiometricEnhancement="Off"
   radiometricLevel="Corrected"
   version="24.06"
Metadata (IMAGERY):
   ACQUISITIONDATETIME=2014-09-05 09:56:03
   CLOUDCOVER=2
   SATELLITEID=WV03
Metadata (DERIVED_SUBDATASETS):
DERIVED_SUBDATASET_1_NAME=DERIVED_SUBDATASET:LOGAMPLITUDE:14SEP05095603-P2AS-053903708010_01_P001.TIL
   DERIVED_SUBDATASET_1_DESC=log10 of amplitude of input bands from 
14SEP05095603-P2AS-053903708010_01_P001.TIL
RPC Metadata:
   HEIGHT_OFF=95
   HEIGHT_SCALE=501
   LAT_OFF=41.8789
   LAT_SCALE=0.0138
   LINE_DEN_COEFF=+1.000000E+00 -2.488971E-05 +2.587276E-03 
+1.089231E-04 -1.260952E-07 +5.670124E-08 +1.065337E-06 -7.328102E-08 
+6.742895E-06 +1.572611E-08 +1.099616E-08 +0.000000E+00 +0.000000E+00 
+0.000000E+00 +0.000000E+00 +0.000000E+00 -3.140924E-08 +0.000000E+00 
-1.932470E-07 +0.000000E+00
   LINE_NUM_COEFF=+5.233697E-03 +2.519639E-02 -1.112942E+00 
-8.988157E-02 +9.422697E-05 +1.726955E-06 -3.247570E-04 -7.769219E-05 
-2.880579E-03 -6.983318E-07 +6.440451E-08 +0.000000E+00 +3.142982E-07 
+0.000000E+00 -1.242131E-07 -7.506260E-06 +1.529383E-07 -4.171267E-08 
-2.631868E-07 +1.602011E-08
   LINE_OFF=3248
   LINE_SCALE=3442
   LONG_OFF=12.5771
   LONG_SCALE=0.0148
   SAMP_DEN_COEFF=+1.000000E+00 -8.111978E-04 +1.028897E-04 
-4.701564E-04 +3.086810E-08 +0.000000E+00 +1.309072E-07 +6.430917E-07 
+0.000000E+00 -2.286865E-07 +0.000000E+00 +0.000000E+00 +0.000000E+00 
+0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 
+0.000000E+00 +0.000000E+00
   SAMP_NUM_COEFF=+1.609664E-03 +1.018366E+00 +3.588746E-02 
+4.792172E-02 -1.438654E-04 +3.970072E-04 -3.016523E-04 -8.267065E-04 
+8.545967E-06 -9.494914E-06 +3.217866E-07 +6.581541E-07 -6.303898E-08 
+6.950543E-08 +2.344002E-07 +0.000000E+00 -1.676066E-07 -7.014485E-07 
-4.732161E-07 -1.090619E-08
   SAMP_OFF=2826
   SAMP_SCALE=3015
Corner Coordinates:
Upper Left  (  297822.400, 4640476.800) ( 12d33'46.87"E, 41d53'25.36"N)
Lower Left  (  297822.400, 4637861.600) ( 12d33'50.09"E, 41d52' 0.64"N)
Upper Right (  300084.800, 4640476.800) ( 12d35'24.96"E, 41d53'27.43"N)
Lower Right (  300084.800, 4637861.600) ( 12d35'28.15"E, 41d52' 2.70"N)
Center      (  298953.600, 4639169.200) ( 12d34'37.52"E, 41d52'44.03"N)
Band 1 Block=128x128 Type=UInt16, ColorInterp=Undefined

In this example you can see only one time presents - 
IMAGE_1.firstLineTime=2014-09-05T09:56:03.000901Z which was mirrored to 
IMAGERY/ACQUISITIONDATETIME

If you work with the only one satellite you can grab needed metadata 
from default domain.

Best regards,
     Dmitry

16.10.17 2:53, Luke пишет:
> Just a comment from an end user: perhaps ACQUISITIONDATETIME could store
> start and end times using ISO 8601 intervals (forward slash separator) -
> start date time/end date time
>
>
> Luke
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev



More information about the gdal-dev mailing list