New answers tagged

0

To set the colour interpretation for each raster band, you should use the GDAL colour interpretation values: gdal.GCI_RedBand = 3 gdal.GCI_GreenBand = 4 gdal.GCI_BlueBand = 5 For example, assuming your spectral bands are ordered as RGB: from osgeo import gdal im = gdal.Open('ImageName.tif', 1) # open image in read-write mode for i in range(3): band = ...


0

So the solution was pretty straight forward. Basically, I just selected the desired band (lulc) from the raster stack by using the .select('band') . The whole code is here: var img_2019 = ee.Image("projects/resource-watch-gee/cit_049_urban_land_use_India/India_2019_v2") .select('lulc') var CAT_BAND='lulc'; var viz_params = { bands: [...


0

It seems that you are supplying the image i.e. img_2019 to the region parameter. In this, you should provide the extent polygon or the bounding coordinates of the area for which you want the data. The documentation can be found here.


0

For me (QGIS 3.20.3), the following worked: Raster → Conversion → Rasterize (Vector to Raster) Afterwards: Select your .shp as "Input layer" Optionally, select "Field to use for a burn-in value" For "Output raster size units" I chose "Pixels" "Width" / "Height" define the dimensions of your raster &...


3

Actually, it's related to a positive number, the y pixel dimension should be negative (pixel coords are top->bottom, but map coords are bottom->top), but it isn't. This is why a negative dimension is being reported - i.e. rasterstats thinks the shape is (-2160, 4320) instead of (2160, 4320). The affine transform isn't being read correctly by the ...


4

Normally, QGIS will automatically find .tfw and draw the raster on its correct coordinates. If not, you need to search for the tool assign projection. Then set the raster to your desired coordinate system. good luck.


0

You can georef your map on global mapper and export that as gmmp file open this file in globalmapper android app, real time location and importing maps is free in this app, good luck


2

Sounds like you need a unsigned 16bit PNG with the values rescaled from actual min/max of the data to 1-65535 using the GDAL software (available for Win, Linux, MacOS): johnflower.org/tutorial/heightmap-conversion-gdal gis.stackexchange.com/a/242808 E.g. gdalinfo -stats CE2_GRAS_DEM_50m_A001_87N000W_A.tif Driver: GTiff/GeoTIFF <snip/> Band 1 Block=...


2

I agree with @user2856 that you're unable to directly filter the pixels based on the values in your scale bar, however, if you are ok with a (hacky) workaround, here is a potential solution using R package 'raster' and an unsupervised classification routine to create a mask layer. You'll likely want to play around with the parameters of the kmeans() function ...


0

This self-answer resolves my question, with hekp from @KevinReid. Everything was correct but it was missing a few parts. Code includes an export to both link and drive options var selection = L8.filterBounds(ROI) .filterDate("2002-01-01", "2002-12-01") .filterMetadata("CLOUD_COVER", "...


-1


4

The TIFF metadata can indeed be spread in many places. Especially if you create overviews with gdaladdo the overviews and corresponding metadata are always written close to the end of the TIFF file. If you want to develop your own system I would still recommend to have a look at some of the existing open source solutions. Many of those are listed in https://...


1

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 answer to your question could be No, what is read is always a rectangular area. But theoretically it could save time to use a tiled TIFF and read only the tiles ...


Top 50 recent answers are included