New answers tagged geotiff-tiff
1
vote
Accepted
Extract shapes and shape data from GeoTIFF using Rasterio and store as GeoJSON
shapes returns an iterable of tuples with geometry and value, you can use geopandas to parse the geometry into a valid geojson.
import geopandas as gpd
import rasterio
from rasterio import features
...
0
votes
Finding latitude and longitude for pixel values
You could do something like the following which:
only reads the data into memory once and as required as it uses dataset.sample() instead of dataset.read() and generators instead of list ...
1
vote
TIFF file to Google My Maps
The choose a file to import option, suggests CSV, XLSX, KML, or GPX are the only options for imports.
KML supports rasters, but the help tells us that:
KML files may not import all their data. The ...
1
vote
Accepted
Make black pixels transparent in GeoTIFF using Python
Use gdal.Warp to make a new file with black as nodata using WarpOptions with kwargs. Here is an example using Python and gdal on Windows. The WarpOptions may be slightly different that the command ...
1
vote
Problem generating GeoTIFF from JPEG using GQIS Georeferencer tool
Alright, so I've finally successfully generated a nice looking GeoTIFF file. I discovered a slightly different tutorial outlining more-or-less the same QGIS process but with a little more detail ...
0
votes
Using Rasterio or GDAL to stack multiple bands without using subprocess commands
With gdal and numpy the following is possible assuming the images are the same size (rows and columns) and have the same CRS (e.g. 10m bands from a Sentinel 2 scene).
import gdal
import numpy as np
...
0
votes
Should I use TIFF or PNG Maps
Both PNG and TIF are lossless compression formats so you are not loosing information with either format. See here for a comparison. I see that there is no associated world file for the PNG (the inage ...
1
vote
In gdaldem: NODATA value in GeoTIFF found in earlier version but not recognized in GDAL 3.4.2
As said in a comment, if you have the GDAL Python utilities available it would be best to set the nodata with
gdal_edit -a_nodata -32767 Mt_Fuji.tif
And if you do not have the Python utilities you ...
0
votes
Convert TIF file to CSV/ASCII format using QGIS v. 3.24.1-Tisler
In the Processing Toolbox, GDAL >> gdal2xyz.
1
vote
Convert TIF file to CSV/ASCII format using QGIS v. 3.24.1-Tisler
If you export the raster file to XYZ format in QGIS, it is in fact the CSV (ASCII Gridded - see: https://gdal.org/drivers/raster/xyz.html) - each line contains X, Y and the Z value separated by space (...
0
votes
How to convert a coordinates to indice array (vice versa) in a NetworkX graph?
Maybe this is what you are looking for
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import scipy
from scipy import spatial, stats
import networkx as nx
We generate the ...
0
votes
Accepted
QgsRasterFileWriter in QGIS gives blank output
Because you are saving your raster in a different CRS, you need to use the QgsRasterProjector class.
Try this modified version of your script below.
def clip_raster(raster, column_count, row_count, ...
Top 50 recent answers are included
Related Tags
geotiff-tiff × 1949gdal × 533
qgis × 369
raster × 354
python × 279
arcgis-desktop × 156
geoserver × 133
coordinate-system × 129
gdal-translate × 98
r × 89
georeferencing × 79
gdalwarp × 77
rasterio × 74
convert × 71
dem × 60
export × 60
arcmap × 59
geotools × 53
shapefile × 45
arcpy × 42
google-earth-engine × 40
netcdf × 39
wms × 36
java × 36
tiles × 35