SAR-ARD / s1ard

Sentinel-1 ARD Prototype Processor
MIT License
25 stars 6 forks source link

wind normalization - GDAL options #144

Closed maawoo closed 1 year ago

maawoo commented 1 year ago

The recently added annotation layer 'wind-modeled backscatter' (#138) will now be correctly formatted using the COG driver, with LERC compression (2e-5 error threshold) and the same nodata value as other float32 GeoTIFF layers (-9999.0).

maawoo commented 1 year ago

Overviews are not generated in this case (see COG driver high level details) 🙂

Overviews until the maximum dimension of the smallest overview level is lower than 512 pixels.

Here is the gdalinfo output of a file I generated earlier:

Driver: GTiff/GeoTIFF
Files: /Users/marcowo/Documents/pypypy/S1_NRB/out/ARD/28RDT/S1B_IW_ORB__1SDV_20211114T190517_029588_0387F4_28RDT_E44B/annotation/s1b-iw-orb-20211114t190517-029588-0387f4-28rdt-wm.tif
       /Users/marcowo/Documents/pypypy/S1_NRB/out/ARD/28RDT/S1B_IW_ORB__1SDV_20211114T190517_029588_0387F4_28RDT_E44B/annotation/s1b-iw-orb-20211114t190517-029588-0387f4-28rdt-wm.tif.aux.xml
Size is 120, 120
Coordinate System is:
PROJCRS["WGS 84 / UTM zone 28N",
    BASEGEOGCRS["WGS 84",
        DATUM["World Geodetic System 1984",
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4326]],
    CONVERSION["UTM zone 28N",
        METHOD["Transverse Mercator",
            ID["EPSG",9807]],
        PARAMETER["Latitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",-15,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
        PARAMETER["Scale factor at natural origin",0.9996,
            SCALEUNIT["unity",1],
            ID["EPSG",8805]],
        PARAMETER["False easting",500000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8806]],
        PARAMETER["False northing",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8807]]],
    CS[Cartesian,2],
        AXIS["(E)",east,
            ORDER[1],
            LENGTHUNIT["metre",1]],
        AXIS["(N)",north,
            ORDER[2],
            LENGTHUNIT["metre",1]],
    USAGE[
        SCOPE["Navigation and medium accuracy spatial referencing."],
        AREA["Between 18°W and 12°W, northern hemisphere between equator and 84°N, onshore and offshore. Gambia. Greenland. Guinea. Guinea-Bissau. Iceland. Ireland - offshore Porcupine Basin. Mauritania. Morocco. Senegal. Sierra Leone. Western Sahara."],
        BBOX[0,-18,84,-12]],
    ID["EPSG",32628]]
Data axis to CRS axis mapping: 1,2
Origin = (399960.000000000000000,3300000.000000000000000)
Pixel Size = (915.000000000000000,-915.000000000000000)
Metadata:
  AREA_OR_POINT=Area
  NC_GLOBAL#bathySource=GEBCO
  NC_GLOBAL#clmSource=GSHHS
  NC_GLOBAL#firstMeasurementTime=*
  NC_GLOBAL#gmf=CMOD5n
  NC_GLOBAL#iceSource=EUMETSAT OSI SAF
  NC_GLOBAL#idlVersion=7.1
  NC_GLOBAL#IPFversion=003.40
  NC_GLOBAL#lastMeasurementTime=*
  NC_GLOBAL#missionName=S1B
  NC_GLOBAL#missionPhase=Operational
  NC_GLOBAL#oswAlgorithmVersion=s-1 osw V1.0
  NC_GLOBAL#owiAlgorithmVersion=s-1 owi V1.0
  NC_GLOBAL#owiNoiseCorrection=True
  NC_GLOBAL#polarisation=VV
  NC_GLOBAL#polarisationRatio=Identity
  NC_GLOBAL#prf=486.4863102995529
  NC_GLOBAL#processingCenter=WILE
  NC_GLOBAL#processingStartTime=*
  NC_GLOBAL#rvlAlgorithmVersion=S-1 RVL V1.0
  NC_GLOBAL#sourceProduct=*
  NC_GLOBAL#statevectorAcc={0,0,0}
  NC_GLOBAL#statevectorPos=*
  NC_GLOBAL#statevectorUtc=*
  NC_GLOBAL#statevectorVel=*
  NC_GLOBAL#stokesSource=MODEL WAVEWATCH III (R) GLOBMULTI
  NC_GLOBAL#title=Sentinel-1 OCN Product
  NC_GLOBAL#windSource=ECMWF
  owiNrcsCmod#long_name=predicted Normalized Radar Cross Section from CMOD and ECMWF
  owiNrcsCmod#units=m^2/m^2
  owiNrcsCmod#_FillValue=-999
Image Structure Metadata:
  COMPRESSION=LERC_ZSTD
  INTERLEAVE=BAND
  LAYOUT=COG
  LERC_VERSION=2.4
Corner Coordinates:
Upper Left  (  399960.000, 3300000.000) ( 16d 2' 7.51"W, 29d49'35.07"N)
Lower Left  (  399960.000, 3190200.000) ( 16d 1'31.65"W, 28d50' 8.05"N)
Upper Right (  509760.000, 3300000.000) ( 14d53'56.32"W, 29d49'49.54"N)
Lower Right (  509760.000, 3190200.000) ( 14d53'59.82"W, 28d50'21.94"N)
Center      (  454860.000, 3245100.000) ( 15d27'53.82"W, 29d20' 3.03"N)
Band 1 Block=512x512 Type=Float32, ColorInterp=Gray
  Min=0.005 Max=0.018
  Minimum=0.005, Maximum=0.018, Mean=0.011, StdDev=0.002
  NoData Value=-9999
  Unit Type: m^2/m^2
  Metadata:
    long_name=predicted Normalized Radar Cross Section from CMOD and ECMWF
    NETCDF_VARNAME=owiNrcsCmod
    STATISTICS_MAXIMUM=0.017672492191195
    STATISTICS_MEAN=0.011076250564527
    STATISTICS_MINIMUM=0.0052281492389739
    STATISTICS_STDDEV=0.0023034583999676
    STATISTICS_VALID_PERCENT=100
    units=m^2/m^2
    _FillValue=-999
johntruckenbrodt commented 1 year ago

Ah perfect, great that the driver has this built in by default.