517 questions
0
votes
2
answers
802
views
Is there an issue with raster::writeRaster writing raster stacks in R4.2?
I am using some older code to write a raster stack with bylayer = T and I havent bothered to migrate it to terra yet so I am still using raster. This used to work fine:
raster::writeRaster(stack(...
1
vote
1
answer
3k
views
get elevation from lat/long of geotiff data in gdal
I have a mosaic tif file (gdalinfo below) I made (with some additional info on the tiles here) and have looked extensively for a function that simply returns the elevation (the z value of this mosaic) ...
-1
votes
1
answer
1k
views
try to use GDAL to mege geotiff
I have several consecutive geotiffs that I want to merge .I use GDAL to try out but the final geotiff has no color, only black and white. I want to ask if there is a python plug-in that can directly ...
1
vote
0
answers
967
views
Raster io error while writing the GeotTiff
I have clipped the raster and updated the new raster's meta data. I am facing the following issue while writing clipped image into an output file
Code
with rasterio.open('example.tif', 'w', **out_meta)...
2
votes
0
answers
3k
views
416 Requested Range Not Satisfiable when range is wider than content
I get an Error 416 Range Not Satisfiable response when I make an http request with a byte-range of 0-65536. The byte length of the file requested is only 3356.
Reading the spec on byte-range, it ...
0
votes
1
answer
67
views
Python: how to make temporal projection from a netecdf file?
I have created an xarray.Dataset called myData that contains data for the years 1990, 2000 and 2015. The dataset looks like the following:
import xarray as xr
myData= xr.open_dataset('myData.nc')
I ...
0
votes
1
answer
585
views
How to calculate the mean of only one channel for a 3d numpy array?
I have a numpy array of shape (66,67,4). When I do np.mean(imarray) it calculates the array mean but takes all channels into consideration. I want to calculate the mean of only channel 1 and channel 3,...
0
votes
0
answers
1k
views
Writing geotiff is grayscale instead of color python-gdal
I am trying to upscale an geotiff, using deep learning network. I read in a color geo-tiff using gdal and process each band separately and write that band back into the new geo-tiff driver. The code ...
0
votes
1
answer
608
views
QGIS 3.22.5, 3.22.10, and 3.26.2 keep crashing when using GEOTIFFS
I'm uploading NAIP GEOTIFFS that I got from the USDA website. They are TIFFS with the coordinate system imbedded. They are loading correctly but the QGIS crashes when I try to get into the properties ...
-1
votes
1
answer
570
views
Why all the data is Nan when I load NDVI image by rasterio or gdal [duplicate]
I calculated NDVI value and saved single band images following this page; https://developers.planet.com/docs/planetschool/calculate-an-ndvi-in-python/. After that I wanted to load those images on ...
0
votes
1
answer
463
views
Save raster to geotiff including layer band names that show in ArcGIS
I have the following working function that saves a raster stack to geotiff using rasterio:
def saveRasterToDisc(out_image, raster_crs, out_transform, output_raster_path):
# save raster to disk
...
0
votes
0
answers
474
views
How to add geotiff to layers list?
I have successfully added a tiff image to my leaflet map using leaflet-geotiff.
As shown in this example: https://codepen.io/VictorVelarde/pen/ZKJWMb/
var tiff = "https://ihcantabria.github.io/...
0
votes
0
answers
609
views
How to show .tiff file on openlayer map on specific coordinates in angular or js?
I have a tiff file and I want to show that tiff file on the Openlayer map on its respective coordinates. I tried many ways on youtube but could not find a proper way to show the tiff file on ...
0
votes
0
answers
622
views
How to convert array to tiff file?
i am getting responses in NumPy array of a ndvi tiff file. I want to download this tiff file, what is the procedure or python code need help?
0
votes
1
answer
546
views
Script for Google Earth Engine
I need to convert Geotiff image file to PNG from Google Earth Engine, is this possible?
I created the following code, it generates a geotiff to export to Google Drive for later download and use the ...
1
vote
0
answers
137
views
How to keep geospatial data when converting GTiff to PDF?
I'm working with some custom maps that I've made. They are saved locally as a GTiff and, when drag-dropping them on Google Earth, align beautifully on the map. I now want to convert them to Geospatial ...
2
votes
0
answers
2k
views
Making two rasters align with GDAL
I'm trying to align one raster to another using GDAL Warp in QGIS. Once I have this perfected, I will use the Python GDAL wrapper in a script. I've seen other threads about alignment issue which ...
0
votes
0
answers
426
views
Geotiff image plotting in Python
I am new geotif image ploting in python. I have two Geotiff images of the same region. However, after plotting these two images they are not matching. The below is the meta information for both the ...
1
vote
0
answers
113
views
R Raster: Why do the cropped GeoTIFF rasters have different values than the original rasters (the values are rounded)?
I have an interesting problem with the crop function. When I crop a stack of my rasters, the resulting files have different values from the original files - values are rounded. Interestingly, when I ...
1
vote
0
answers
387
views
How can I configure zoom extent in Mapbox when generating raster tilesets from GeoTIFF?
GOAL
I'm using Mapbox to generate raster tilesets from raw GeoTIFFs. The GeoTIFFs have a resolution such that a single pixel represents roughly a 5km x 5km square on the map. The generated raster ...
0
votes
1
answer
1k
views
something is missing when writing data into new tif file with gdal
There are problems in my writing data into .tif file with gdal module in python.
I want to extract data (numpy array) from a tif file and modify some of its values before saving it into a new one, ...
1
vote
1
answer
1k
views
Latitude and Longitude to pixel-value in GDAL
I'm trying to read a GeoTIFF with one band which stores a value between 0 and 3 ( 255 is no maks ). My Goal is to write a little program which takes in a latitude/longitude and returns the fitting ...
0
votes
1
answer
884
views
Downloading Future Worlclim data at 0.5 resolution
I need to download future bioclim variables at 0.5 minute (30 second) resolution from Worldclim. I can use the code getData function to download it at a lower resolution, but not the higher resolution ...
0
votes
1
answer
338
views
How to change numpy array to geotiff array without saving on computer?
I am using gdal.translate() to make the image but its saving the formed image on local machine, I don't want to save it anywhere in my local machine and use it on run time only without saving it.
1
vote
0
answers
2k
views
How to merging multiple TIF files with Rioxarray python without killing kernel
I am working with high res NOAA aerial imagery data from Hurrican Ida, RGB. Data is available here under download - any of the date times will download a large amount of tifs https://storms.ngs.noaa....
2
votes
0
answers
693
views
How to clip GeoTiff according to shapefile using javascript?
Situation: I am plotting data provided in a GeoTIFF file on a map using Reactjs and geoTiff.js. An example of the GeoTiff files I am using is at the following link: https://drive.google.com/file/d/...
1
vote
2
answers
2k
views
How to read a .tif file using React.js or other Javascsript libraries?
I want to read .tif files in my web program. I prefer to do it using react.js or something that will work with react. However, any javascript-based solution is good. The files I want to read contain ...
0
votes
2
answers
632
views
Is there a way to convert multiple tiff files to numpy array at once?
I'm doing a convolutional neural network classification and all my training tiles (1000 of them) are in geotiff format. I need to get all of them to a numpy array, but I only found code that will do ...
0
votes
1
answer
446
views
COG on Google Cloud Storage - error using OpenLayers without NodeJS
I'm playing with OpenLayers to display COG files uploaded on GCS.
Using the NodeJS, an index.html and a main.js files, then building with Parcel (or others), everything works fine.
When I tried to ...
1
vote
0
answers
354
views
How to load and use modules in embedded JavaScript (EJS) code
My current scripts/codes flow is index.js->routes.js->main.ejs I need to load a GeoTiff-related module and use its plotting functions in my main.ejs. However I find that ejs does not support ...
0
votes
0
answers
507
views
PyQt5: TIFFReadDirectory: Warning, Unknown field with tag XXXXX (0xYYYY) encountered
I have the exact same problem as described under Python: TIFFReadDirectory warning: unknown field with tag: I get tons of annoying warnings from simply loading an image. The only difference is that I'...
0
votes
1
answer
486
views
Python: how to merge two different netCdf filles with different spatial resolution?
Is it possible to merge two netCDF files with different spatial resolution?
I have two datasets.
The first one is the ESA Land Cover dataset with a spatial resoltion of 300m as netCDF.
The first one ...
1
vote
0
answers
1k
views
convert .tif to geojson without gdal
Hi, I am working on an api with geotiff and geojson files. Do you have a way to use geotiff.py to convert an image file (.tif) to geojson without using GDAL?
Thanks in advance for your help.
I tried ...
0
votes
0
answers
331
views
Extracting multiple .tiff files using a Shapefile
I have a folder named Mar22_073685 with 1372 tiff image . I need to crop these tiff files using a shapefile in another folder named 'Export_Output_2_Project.shp'. I am cropping these tiff files with ...
0
votes
1
answer
119
views
Generate jpeg-YCbCr tiles in geotiff file with jfif format instead pure jpeg format
Currently, my app creates GeoTiff tiled files using following options:
PROFILE=GeoTIFF
TILED=YES
BLOCKXSIZE=xxx
BLOCKYSIZE=xxx
COMPRESS=JPEG
PHOTOMETRIC=YCBCR
JPEG_QUALITY=xx
However, some apps that ...
1
vote
0
answers
533
views
Creating a Raster Stack that will save tif filenames as band names in GDAL
I created a raster stack but i can't set the band names as I desired. I use this code for stacking with Python:
outvrt = ('result/raster_stack_vrt.tif')
outtif = ('result/raster_stack.tif')
tifs = ...
1
vote
0
answers
557
views
Gdal_translate is changing values range
I'm using the following command of gdal_translate to convert GTiff files to JP2 format:
gdal_translate image.tif image.jp2 -of JP2OpenJPEG -co QUALITY=25 -ot Int16
However, the output JP2 image has a ...
1
vote
1
answer
2k
views
How to create COG files from raw data in Python?
I would like to know if there are any python libraries or tools to help convert raw data into a cloud optimized GeoTIFF. I have a lot of dat files with latitude, longitude, and a few other bits of ...
0
votes
1
answer
692
views
Error dispatching tile request to GeoServer
I am attempting to use the GeoWebCache web interface to seed some image tiles.
The tiling fails with the following error: INFO [org.geoserver.gwc] - Error dispatching tile request to GeoServer
For ...
0
votes
1
answer
757
views
Get Corner Coordinates TIFF file
I'm using a javascript app to get the borders coordinates of a TIFF file. I'm having trouble getting these coordinates. I'm using this example, but the corner coordinates are returning incorrectly.
...
1
vote
1
answer
776
views
Write RasterStack and preserve metadata in R
I would like to write a RasterStack object and preserve names and metadata of the individual layers. How to preserve names is explained here. Is there a way to preserve metadata of individual layers ...
1
vote
0
answers
151
views
Creating a Google Maps-like view?
I have a server feeding tiled geographic images from a GIS database, to my Android client app. I want users to be able to pan/zoom into the map like they'd do in Google Maps.
But there's an issue ...
0
votes
0
answers
331
views
Create georeferenced image from array of data
I need some guidance on a problem that I'm recently struggling with.
I have a data structure that looks something like this:
latitude
longitude
color
-25.45896328
-54.50323974
#88CE86
-25.45896328
-54....
0
votes
0
answers
367
views
Open Street Map map export
How to export country map, not only lines, polygons and points, but with roads, streets, etc. Tried to download this one http://download.geofabrik.de/europe/ukraine.html, but it consists only of ...
1
vote
1
answer
1k
views
Rendering hosted GeoTIFF file using OpenLayers WebGL not visualized properly
In a web map application, I am trying to render a GeoTIFF file as an overlay layer on a OSM layer using OpenLayers 6. The layer is rendered on the exact location and it seems fine. Here is the ...
0
votes
1
answer
1k
views
Creating georeference geotiff image
I have tried to create a geotiff image after extracting texture feature of a grayscale geotiff image using the below codes.
#Creating texture images
Texture_Contrast = Image.fromarray(Contrast)
#...
0
votes
1
answer
574
views
Set overview level with gdal_translate for a COG
I have a 5kx5k COG image I'm able to read with gdal_translate for python and output it as a numpy RGB array.
However, I'd like to be able to directly select the overview level in the image. If I want ...
5
votes
1
answer
9k
views
Use xarray to save DataArray as geoTiff, without using ram memory
I need to modify a very large geoTif file (over 200GB), however when I save it my code crashes as it loads the file in memory. The code looks like this.
import xarray as xr
# open the file
ds = xr....
1
vote
1
answer
1k
views
Drop dimension for exporting dataarray to geotiff not working
I want to export a single date and variable fwi of a xarray dataset ds to a tif file. However, my dataarray has too many dimensions and I cannot figure out how to effectively remove the dimension ...
1
vote
1
answer
339
views
Display aerial photographs interactively in R
I have taken aerial photographs with a drone and stitched those together into a .geotiff file, using third party software. I would like to add this file as a layer to an interactive leaflet map, e.g. ...