ardigeos/README.md
2026-05-28 15:15:21 +02:00

4.8 KiB
Raw Blame History

ardigeos

dünnschliff applikation

🚀 Workflow: Subdatasets → echte Overviews 🔹 Schritt 1: Nur höchste Auflösung extrahieren gdal_translate GTIFF_DIR:1:/scans/thinsect/1/101.tif base.tif -co TILED=YES -co COMPRESS=JPEG -co QUALITY=75

👉 Das ist dein „Masterbild“

🔹 Schritt 2: Overviews aus vorhandenen Levels bauen

Gleiche Faktoren wie Subdatasets:

gdaladdo -r average base.tif 2 4 8 16 32

👉 entspricht:

34576 → 17288 → 8644 → … ✔

💡 Vorteil:

gleiche Struktur wie Original aber jetzt COG-kompatibel

🔹 Schritt 3: echtes COG erzeugen

gdal_translate base.tif cog_final.tif -of COG -co COMPRESS=JPEG -co QUALITY=75 -co COPY_SRC_OVERVIEWS=YES

Ergebnis 1/3 Dateigröße kleinere Datei als Original, da dort zuvor auch tiles enthalten sind (leider keine COG TIFF Pyramiden)

gdalinfo /scans/thinsect/cog_out/1/1.tif

GeoTIFF / COG Metadaten

Allgemeine Informationen

Eigenschaft Wert
Driver GTiff / GeoTIFF
Datei /scans/thinsect/cog_out/1/1.tif
Größe 37264 × 21744 px
Layout COG (Cloud Optimized GeoTIFF)

TIFF Metadaten

Schlüssel Wert
TIFFTAG_IMAGEDESCRIPTION Objective Imaging, AppMag = 4 | MPP = 1.2320 | Q = 75
TIFFTAG_XRESOLUTION 8116
TIFFTAG_YRESOLUTION 8116
TIFFTAG_RESOLUTIONUNIT 3 (pixels/cm)

Image Structure Metadata

Eigenschaft Wert
LAYOUT COG
SOURCE_COLOR_SPACE YCbCr
COMPRESSION YCbCr JPEG
INTERLEAVE PIXEL
OVERVIEW_RESAMPLING AVERAGE
JPEG_QUALITY 75
JPEGTABLESMODE 1

Eckkoordinaten

Position Koordinaten
Upper Left (0.0, 0.0)
Lower Left (0.0, 21744.0)
Upper Right (37264.0, 0.0)
Lower Right (37264.0, 21744.0)
Center (18632.0, 10872.0)

Bänder & Overviews

Band 1

Eigenschaft Wert
Blockgröße 512 × 512
Typ Byte
Color Interpretation Red

Overviews

  • 18632 × 10872
  • 9316 × 5436
  • 4658 × 2718
  • 2329 × 1359
  • 1164 × 679
  • 582 × 339
  • 291 × 169

Band 2

Eigenschaft Wert
Blockgröße 512 × 512
Typ Byte
Color Interpretation Green

Overviews

  • 18632 × 10872
  • 9316 × 5436
  • 4658 × 2718
  • 2329 × 1359
  • 1164 × 679
  • 582 × 339
  • 291 × 169

Band 3

Eigenschaft Wert
Blockgröße 512 × 512
Typ Byte
Color Interpretation Blue

Overviews

  • 18632 × 10872
  • 9316 × 5436
  • 4658 × 2718
  • 2329 × 1359
  • 1164 × 679
  • 582 × 339
  • 291 × 169

für alle Ordner in /scans/thinsect/(1-52)*tif

nohup bash -c ' for dir in 49 50 51 52; do find /scans/thinsect/$dir -name "*.tif" | parallel
--bar
--joblog conversion_${dir}.log
" file={} name=$(basename "$file" .tif)

    gdal_translate \
        \"GTIFF_DIR:1:\$file\" \
        \"/scans/thinsect/cog_out/13/\${name}.tif\" \
        -of COG \
        -co COMPRESS=JPEG \
        -co QUALITY=75 \
        -co RESAMPLING=AVERAGE
    "

done ' > conversion.out 2>&1 &

danach
gdalinfo /scans/tninsection/cog_out/1/1.tif /var/www/html/tif-index.json mit sudo /usr/local/bin/build-cog-map.sh anlegen

NGINX Anpassung und index.html anlegen mit Openlayerplugin

Generierte Anwendung aus QGIS:
https://ardigeos.geosphere.at/anwendung/index.html
Dünnschliffe:
https://ardigeos.geosphere.at/tsv/1 (1-13.xxx)
Maps Gesophere:
https://maps.geosphere.at/de?scale=18055.9548215&x=1781235.399195954&y=6107435.260784891&heading=0&basemap=default&layers=https%3A%2F%2Fgis.geosphere.at%2Fmaps%2Frest%2Fservices%2Fgrenzen%2Fadmin_grenzen_oesterreich%2FMapServer%2Chttps%3A%2F%2Fgis.geosphere.at%2Fmaps%2Frest%2Fservices%2Fsammlungen%2Fduennschliffe%2FMapServer%2F1&visibilities=true%2Ctrue&opacities=1%2C1&relief=true