You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to save several images as rasters via drive. Whenever I try, it doesn't give me any errors but returns rasters with only NaN values. The ideal images I want to save are mostly empty with just a few areas with values (clipped to smaller polygons) that are disjoint, but I also tried saving them while clipping to a larger geometry (geeBbox below) and had the same problem.
The issue doesn't seem to be on the earth engine side because I can do Map$addLayer(image) for the version of the images right before I run ee_as_rast(image) and the images look great before conversion.
I'm going to put the simpler code here that just pulls NAIP imagery since that is easier to reproduce, but I have the same problem with some processed Sentinel-2 imagery.
What I Did
#create our focal region (for output geometry, is from a shapefile)Region<- st_read("../01Data/ChicagoS23/FocalRegion/FocalRegion.shp")
bbox<- st_bbox(Region)
bbox_Poly<- st_as_sfc(bbox)
geeBbox<-ee$Geometry$Rectangle(bbox)
NAIP<-ee$ImageCollection("USDA/NAIP/DOQQ")$
filterBounds(geeBbox)$
filterDate("2019-01-01", "2023-12-31")
#to use to filter the imagesrandomPts_center<-ee$FeatureCollection$randomPoints(region=geeBbox, points=100, seed=0, maxError=1)
randomPoints<-randomPts_center$map(function(f) {f$buffer(60, 10)})
#get NAIP ImageryN19<-ee$ImageCollection(NAIP)$filterDate("2019-08-01", "2019-08-10")$mosaic()$clip(randomPoints)
N21<-ee$ImageCollection(NAIP)$filterDate("2021-09-01", "2021-09-15")$mosaic()$clip(randomPoints)
#switch them to terra rastersrastN19<- ee_as_rast(N19, region=geeBbox, via="drive")
rastN21<- ee_as_rast(N21, region=geeBbox, via="drive")
##write the rasters
writeRaster(rastN19, "../01Data/QualityCheck/NAIP_2019.tiff")
writeRaster(rastN21, "../01Data/QualityCheck/NAIP_2021.tiff")
The text was updated successfully, but these errors were encountered:
At submit an issue, please attached the following information of your
rgee
session:Attach your Python (reticulate) configuration:
Description
I'm trying to save several images as rasters via drive. Whenever I try, it doesn't give me any errors but returns rasters with only NaN values. The ideal images I want to save are mostly empty with just a few areas with values (clipped to smaller polygons) that are disjoint, but I also tried saving them while clipping to a larger geometry (geeBbox below) and had the same problem.
The issue doesn't seem to be on the earth engine side because I can do Map$addLayer(image) for the version of the images right before I run ee_as_rast(image) and the images look great before conversion.
I'm going to put the simpler code here that just pulls NAIP imagery since that is easier to reproduce, but I have the same problem with some processed Sentinel-2 imagery.
What I Did
The text was updated successfully, but these errors were encountered: