Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_metadata.json : add GDAL command to generate RGB display #74

Open
davidoesch opened this issue Apr 4, 2024 · 2 comments
Open

_metadata.json : add GDAL command to generate RGB display #74

davidoesch opened this issue Apr 4, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@davidoesch
Copy link
Collaborator

davidoesch commented Apr 4, 2024

Is your feature request related to a problem? Please describe.
There is a need to add a field with a GDAL command to each _metadata.json file as for the gdal enhancement function, so BGDI can use this info to generate VRT see https://jira.swisstopo.ch/browse/BGDIDIC-2772

Describe the solution you'd like
A field should be added to each _metadata.json file for the _10m band containing the GDAL command: gdal_translate /vsicurl/https://data.geo.admin.ch/ch.swisstopo.swisseo_s2-sr_v100/2024-03-19t102639/ch.swisstopo.swisseo_s2-sr_v100_mosaic_2024-03-19t102639_bands-10m.tif gdal_translate_byte.vrt -a_nodata 9999 -scale -exponent 0.5 -of VRT. having -a_nodata 9999 and https://data.geo.admin.ch/ch.swisstopo.swisseo_s2-sr_v100/2024-03-19t102639/ch.swisstopo.swisseo_s2-sr_v100_mosaic_2024-03-19t102639_bands-10m.tif changed according to the file

Describe alternatives you've considered
Currently FSDI is generating the VRT files for each file and stores it internally

Additional context
Once this implemented, KOGIS will use the provided command and as fallback their json

@davidoesch davidoesch added the enhancement New feature or request label Apr 4, 2024
@davidoesch
Copy link
Collaborator Author

maybe even try generate the VRT conent and store it in the json: more complex band math could be applied and the real TRUE COLOR result achieved:

Start with
<VRTDataset rasterXSize="29120" rasterYSize="22643"> <SRS dataAxisToSRSAxisMapping="1,2">PROJCS["CH1903+ / LV95",GEOGCS["CH1903+",DATUM["CH1903+",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6150"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4150"]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["latitude_of_center",46.9524055555556],PARAMETER["longitude_of_center",7.43958333333333],PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",2600000],PARAMETER["false_northing",1200000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","2056"]]</SRS> <GeoTransform> 2.4744300000000000e+06, 1.0000000000000000e+01, 0.0000000000000000e+00, 1.3032400000000000e+06, 0.0000000000000000e+00, -1.0000000000000000e+01</GeoTransform> <Metadata> <MDI key="AREA_OR_POINT">Area</MDI> </Metadata> <Metadata domain="IMAGE_STRUCTURE"> <MDI key="COMPRESSION">DEFLATE</MDI> <MDI key="INTERLEAVE">PIXEL</MDI> </Metadata> <VRTRasterBand dataType="UInt16" band="1" blockXSize="512" blockYSize="512"> <NoDataValue>9999</NoDataValue> <ColorInterp>Gray</ColorInterp> <ComplexSource> <SourceFilename relativeToVRT="0">/vsicurl/https://data.geo.admin.ch/ch.swisstopo.swisseo_s2-sr_v100/2024-03-19t102639/ch.swisstopo.swisseo_s2-sr_v100_mosaic_2024-03-19t102639_bands-10m.tif</SourceFilename> <SourceBand>1</SourceBand> <SourceProperties RasterXSize="29120" RasterYSize="22643" DataType="UInt16" BlockXSize="512" BlockYSize="512" /> <SrcRect xOff="0" yOff="0" xSize="29120" ySize="22643" /> <DstRect xOff="0" yOff="0" xSize="29120" ySize="22643" /> <NODATA>9999</NODATA> <Exponent>0.5</Exponent> <SrcMin>0</SrcMin> <SrcMax>12964</SrcMax> <DstMin>0</DstMin> <DstMax>255</DstMax> </ComplexSource> </VRTRasterBand> <VRTRasterBand dataType="UInt16" band="2" blockXSize="512" blockYSize="512"> <NoDataValue>9999</NoDataValue> <ComplexSource> <SourceFilename relativeToVRT="0">/vsicurl/https://data.geo.admin.ch/ch.swisstopo.swisseo_s2-sr_v100/2024-03-19t102639/ch.swisstopo.swisseo_s2-sr_v100_mosaic_2024-03-19t102639_bands-10m.tif</SourceFilename> <SourceBand>2</SourceBand> <SourceProperties RasterXSize="29120" RasterYSize="22643" DataType="UInt16" BlockXSize="512" BlockYSize="512" /> <SrcRect xOff="0" yOff="0" xSize="29120" ySize="22643" /> <DstRect xOff="0" yOff="0" xSize="29120" ySize="22643" /> <NODATA>9999</NODATA> <Exponent>0.5</Exponent> <SrcMin>0</SrcMin> <SrcMax>13200</SrcMax> <DstMin>0</DstMin> <DstMax>255</DstMax> </ComplexSource> </VRTRasterBand> <VRTRasterBand dataType="UInt16" band="3" blockXSize="512" blockYSize="512"> <NoDataValue>9999</NoDataValue> <ComplexSource> <SourceFilename relativeToVRT="0">/vsicurl/https://data.geo.admin.ch/ch.swisstopo.swisseo_s2-sr_v100/2024-03-19t102639/ch.swisstopo.swisseo_s2-sr_v100_mosaic_2024-03-19t102639_bands-10m.tif</SourceFilename> <SourceBand>3</SourceBand> <SourceProperties RasterXSize="29120" RasterYSize="22643" DataType="UInt16" BlockXSize="512" BlockYSize="512" /> <SrcRect xOff="0" yOff="0" xSize="29120" ySize="22643" /> <DstRect xOff="0" yOff="0" xSize="29120" ySize="22643" /> <NODATA>9999</NODATA> <Exponent>0.5</Exponent> <SrcMin>0</SrcMin> <SrcMax>13556</SrcMax> <DstMin>0</DstMin> <DstMax>255</DstMax> </ComplexSource> </VRTRasterBand> <VRTRasterBand dataType="UInt16" band="4" blockXSize="512" blockYSize="512"> <NoDataValue>9999</NoDataValue> <ComplexSource> <SourceFilename relativeToVRT="0">/vsicurl/https://data.geo.admin.ch/ch.swisstopo.swisseo_s2-sr_v100/2024-03-19t102639/ch.swisstopo.swisseo_s2-sr_v100_mosaic_2024-03-19t102639_bands-10m.tif</SourceFilename> <SourceBand>4</SourceBand> <SourceProperties RasterXSize="29120" RasterYSize="22643" DataType="UInt16" BlockXSize="512" BlockYSize="512" /> <SrcRect xOff="0" yOff="0" xSize="29120" ySize="22643" /> <DstRect xOff="0" yOff="0" xSize="29120" ySize="22643" /> <NODATA>9999</NODATA> <Exponent>0.5</Exponent> <SrcMin>0</SrcMin> <SrcMax>12625</SrcMax> <DstMin>0</DstMin> <DstMax>255</DstMax> </ComplexSource> </VRTRasterBand> </VRTDataset>

@davidoesch
Copy link
Collaborator Author

Feedback from planet/sinergsie "EO Browser is powered by a proprietary technology Sentinel Hub. " -> no info how they operate their system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant