4
votes
Accepted
Saving Mapzen Global Terrain in QGIS with extent layer (-90 to 90 Lat and -180 to 180 Lon)
No. Mapzen Global Terrain tiles will be designed for use in Web Mercator projection, which only goes to ±85.05.. degrees of latitude. From Wikipedia:
Because the Mercator projects the poles at ...
3
votes
Accepted
How to treat NAs using a custom function in the lapp function of {terra} in R
As @Spacedman says, a vectorized solution should work this function should give you the expected result.
t <- lapp(c(r,s),
fun = function(a,b){
a[is.na(a)] <- 55
...
2
votes
gdal_calc - How to calculate where raster A is not equal to raster B?
From GDAL version >= 3.3, you can use --hideNoDatata option to ignore the NaNs in the calculation (it takes the NoData value as if it was a real value).
2
votes
How to treat NAs using a custom function in the lapp function of {terra} in R
This from the docs:
Before you use the function, test it to make sure that it is
vectorized. That is, it should work for vectors longer than one,
not only for single numbers.
Let's test:
> fun(...
2
votes
Implement plot purchases on fictional map
Here's a workflow using QGIS and some data from the Leaflet examples.
Before you start, read the Leaflet tutorial about L.CRS.Simple. I mean it. Stop what you're doing, and read it.
Lauch QGIS.
Read ...
1
vote
Extracting mean of multiple SpatRasters using Terra?
The terra equivalent of raster::calc is terra::app so, to return the mean for a multi-band raster you would use:
rmean <- app(x, mean)
or to return the mean for an entire raster:
global(x, mean).
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
raster × 8997qgis × 2467
arcgis-desktop × 1632
r × 1570
gdal × 820
python × 733
coordinate-system × 437
arcmap × 411
postgis × 380
arcpy × 371
clip × 361
geotiff-tiff × 352
dem × 347
raster-calculator × 324
vector × 313
polygon × 287
grass × 275
shapefile × 254
arcgis-10.0 × 218
pyqgis × 202
spatial-analyst × 178
arcgis-10.1 × 176
rasterio × 171
geoserver × 164
arcgis-10.2 × 157