Skip to main content
9 votes
Accepted

How to save an xarray.DataArray directly as a Cloud Optimized GeoTIFF?

rds.rio.to_raster(raster_path="cogeo.tif", driver="COG") https://gdal.org/drivers/raster/cog.html
snowman2's user avatar
  • 7,527
8 votes
Accepted

What is the reason for using GeoServer to provide access to Cloud-Optimized GeoTIFFs

GeoServer serves the images as established standards like WMS and WCS. These can be read by many clients like QGIS, OpenLayers or Leaflet. COGs on the other hand cannot be read by that many clients. ...
Jakob Miksch's user avatar
5 votes
Accepted

Viewing the extents of individual tiles in Cloud Optimized GeoTIFF

If you just want to find out the internal tiling structure i.e the blocks, you can use GDAL or rasterio commandline tools: gdalinfo /vsicurl/https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-...
user2856's user avatar
  • 69.6k
5 votes

Replacing GeoServer with COG and MVT from a bucket

Yes, but it'll be some work, and you need the level of control having your own application brings. If you wanted to make it work with a webpage, you'd need a stateless serving layer between S3 and the ...
Paul Norman's user avatar
  • 1,606
4 votes
Accepted

How do I add COGs from AWS S3 protocol to QGIS map canvas programmatically

You can add S3 using the following bucket_name = 'your_bucket_name' bucket_path_to_tif = 'subdir/myfile.tif' rlayer = QgsRasterLayer(f'/vsis3/{bucket_name}/{bucket_path_to_tif}', "My layer name&...
ThomasG77's user avatar
  • 31.2k
4 votes
Accepted

Fastest Possible Use of GDAL to Merge, Reproject & Convert

On further testing: discovered that gdal.Warp supports reprojecting, mosaicing & converting images with different projections in one go. Simplifying the code to one line sped up the process by ...
minus34's user avatar
  • 767
3 votes
Accepted

Render multiple COG files using OpenLayers

COGs within a GeoTIFF source must be able to use the same tile grid, but as in https://openlayers.org/en/latest/examples/multiple-cogs.html a layer can also have multiple GeoTIFF sources, so this ...
Mike's user avatar
  • 12.9k
3 votes
Accepted

Adding custom (text) entries to GeoTIFF header

TIFF has tags for that purpose and you can edit them for example with gdal_edit https://gdal.org/programs/gdal_edit.html -mo META-TAG=VALUE Passes a metadata key and value to set on the output ...
user30184's user avatar
  • 69.1k
2 votes
Accepted

Loading Cloud Optimized GeoTIFF in ArcGIS Pro

If you have GDAL commandline tools, you can use gdal_translate (can also use gdal.Translate in python which is available in the base arcgispro-py3 env) to create a VRT pointing at the remote COG and ...
user2856's user avatar
  • 69.6k
2 votes
Accepted

How to load Esri 10m land cover data in QGIS

I've added as an ArcGIS Feature Service the following URL https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/LULC_2020_Download_Scenes/FeatureServer Then, I know to consume remote URL, ...
ThomasG77's user avatar
  • 31.2k
2 votes

"S3 Support for GeoTiff" vs "COG (Cloud Optimized GeoTIFF) Support" Geoserver Community Extensions

As Ian said, both still exist. The general S3 one has seen no development in the last few years, while the COG one is being improved regularly. However, the old one still has a few advantages for ...
Andrea Aime's user avatar
  • 17.7k
2 votes
Accepted

"S3 Support for GeoTiff" vs "COG (Cloud Optimized GeoTIFF) Support" Geoserver Community Extensions

No, both extensions continue to exist. COG is probably faster (and cheaper) that the general S3 but may require you to reprocess your tiffs to make them COGs. Just to note that as they are community ...
Ian Turton's user avatar
  • 83.2k
2 votes

What is the reason for using GeoServer to provide access to Cloud-Optimized GeoTIFFs

Jakob has already answered the Geoserver specific part of your question. The more general response, that for example also applies to Mapserver or for that matter something like TiTiler running on API-...
Mark Korver's user avatar
2 votes

Loading Cloud Optimized GeoTIFF in ArcGIS Pro

COG is not supported across ArcGIS Platforms, kindly follow this idea Support Cloud Optimized GeoTIFF (COG) across the ArcGIS platform More information regarding Cloud Optimized GeoTiffs can be found ...
Yogesh Chavan's user avatar
2 votes
Accepted

Using rasterio to read NDVI data from GIMMS's COG products

Update Dec 2024: the NASA COG now works correctly. Original answer: No you're not doing anything wrong. Here's an example showing a working COG and the non-working COG: import rasterio filepath = &...
user2856's user avatar
  • 69.6k
1 vote

Using COG images uploaded to Amazon S3 ( private bucket) with credentials in OpenLayers?

GeoTIFF source ol.source.GeoTIFF has option sourceOptions where you can specify additional options for geotiff.js on which OL GeoTIFF is based/dependent. GeoTIFF source options (see https://openlayers....
TomazicM's user avatar
  • 27k
1 vote

Converting Orthomosaic TIF Image to COG (Cloud-Optimized Geo-TIFF)

A first test might be to confirm whether rio is working correctly. You could do the conversion with GDAL as I see there is a COG raster driver for GDAL. I think this command would work but I have not ...
GBG's user avatar
  • 10.5k
1 vote

Viewing the extents of individual tiles in Cloud Optimized GeoTIFF

This is a single tile. so all you need to do is use gdal to get extent: import gdal from gdalconst import GA_ReadOnly data = gdal.Open( 'https://sentinel-cogs.s3.us-west-2.amazonaws.com/sentinel-s2-...
B-C B.'s user avatar
  • 765
1 vote
Accepted

Slow initial loading of layers in Geoserver from huge COGs stored in a AWS S3

This parameter: it.geosolutions.cog.default.header.length is in bytes. I had set it in Kbytes (256). As a result, I had mistakenly decreased the length, so the Geoserver had to do more iterations to ...
Ebola's user avatar
  • 83
1 vote

Using COG from private S3 bucket in geoserver

The answer was simple: set permissions on the bucket. { "Version": "2012-10-17", "Statement": [ { "Sid": "AddPerm", "Effect&...
sobmortin's user avatar
1 vote
Accepted

Error when opening TIFF from GCS using geemap : Unsupported BitsPerSample and SampleFormat values: (64, 1)

You have a 64bit datatype and it seems like geemap doesn't support that bit depth. Since you only have a binary 0, 1 raster you can use a byte (uint8) data type: img = img.astype('uint8') with ...
user2856's user avatar
  • 69.6k
1 vote
Accepted

How to read in polygonal section of a GeoTIFF

TIFF files are organized into stripes (one or more pixel rows) or into tiles. Stripe or tile is the smallest unit that can be read from the TIFF file. Both stripes and tiles are rectangular so the ...
user30184's user avatar
  • 69.1k
1 vote
Accepted

GeoTIFF COG Mosaic, Custom Projection, OpenLayers

Not the ideal VRT solution, but the workaround to load multiple urls.: // URL to COG tile const urls = [ 'https://tile-service-raster.s3.us-east-1.amazonaws.com/cogs/as-raster-tile/HM_COG.tif', '...
Ian R.'s user avatar
  • 21
1 vote

Calculate height profile from cogeoTiff using rasterio

I would try to create a virtual VRT dataset with a reduced resolution and use that as a src. Here is an example with gdal_translate but you can certainly create VRT also with rasterio. gdal_translate -...
user30184's user avatar
  • 69.1k
1 vote
Accepted

gdal_translate TIFF to PNG with added alpha

By the driver documentation https://gdal.org/drivers/raster/png.html grayscale with alpha is not supported even the PNG format does support it http://libpng.org/pub/png/spec/1.2/PNG-DataRep.html I ...
user30184's user avatar
  • 69.1k
1 vote

Generate jpeg-YCbCr tiles in GeoTIFF file with JFIF format instead pure JPEG format

Gdal library code forces not writing JFIF-APP0 marks on any JPEG tiled image. In gdal/frmts/gtiff/libtiff/tif_jpeg.c (line 1972), changing sp->cinfo.c.write_JFIF_header = FALSE by sp->cinfo.c....
Tio Pepe's user avatar
  • 131
1 vote
Accepted

COG tiff reports valid from gdal but does not load in QGIS

If you do not supply authentication creds in the Raster>Add dialogue, and then supply a cogtiff link (on AWS S3 in this case) which is not publicly accessible, the Options will not show and the ...
jamierob's user avatar
  • 1,603
1 vote
Accepted

Using VRT to mimick N bands Geotiff from a k-bands Geotiff, N >> k?

I do not know "program A" but certainly you can create more bands with VRT. File "test.tif" is a 3-band image. gdal_translate -of VRT -b 1 -b 1 -b 1 -b 1 -b 1 test.tif 5band.vrt ...
user30184's user avatar
  • 69.1k
1 vote

How to load Esri 10m land cover data in QGIS

These files are available at GeoTIFFs. I created a list over here And someone else created a STAC Catalog here. Basically there's a bunch of files at URLs like: https://ai4edataeuwest.blob.core....
Alex Leith's user avatar
  • 13.5k
1 vote

Loading Cloud Optimized GeoTIFF in ArcGIS Pro

To clarify things a bit: strictly speaking Cloud Optimized Geotiff is a file format, and ArcMap and Pro can both read and use COG files without any special instructions or configuration when they're ...
matt wilkie's user avatar
  • 28.3k

Only top scored, non community-wiki answers of a minimum length are eligible