4

Resampling applies when the gridding of the input file is different from the gridding in the new space (most of the time, a warped space due to reprojection). It also makes sense when the size of the grid changes. But when the size and shape of the grid remains constant there is no resampling. If you want to smooth your DEM at a constant pixel size, you ...


3

The GeoTIFF format is an OGC standard that encapsulates the coordinate reference system and crs transform (what would be in a "world" file alongside a standard tiff, jpeg, or png image) in tiff tags in the image itself among other relevant information. This means no sidecar files are required and everything the consuming system needs to know about the image ...


3

In R, use the raster package and as.data.frame: Make a quick sample two-layer raster object: > library(raster) > r1 = raster(matrix(1:12,3,4)) > r2 = raster(matrix(sample(12),3,4)) > s = stack(r1,r2) And so: > as.data.frame(s) layer.1 layer.2 1 1 12 2 4 6 3 7 2 4 10 5 5 2 3 6 ...


2

Using gdalinfo -stat -hist filename.tif will show accurate min/max/mean/stdev and an histogram: ... Band 1 Block=3600x1 Type=Int16, ColorInterp=Gray Min=109.000 Max=357.000 Minimum=70.000, Maximum=360.000, Mean=213.611, StdDev=50.093 256 buckets from 108.514 to 357.486: 123 20 19 98 245 1215 6146 11234 10651 6540 6686 8793 11477 11133 11302 10019 ...


1

Or use this: !pip install rasterio import rasterio as rio import numpy as np with rio.open("file path") as img : imgnp= img.read() imgmeta=img.meta


1

You could use GDAL, it's installed by default in colab: import gdal array = gdal.Open('/content/gdrive/My Drive/My Driver/imageToDriveExample.tif').ReadAsArray()


1

Run a little test. Make a 10x10 random raster: > r1 = raster(matrix(rnorm(100),10,10)) Feed to ks.test: > ks.test(r1,"pnorm",alternative="two.sided",exact=NULL) One-sample Kolmogorov-Smirnov test data: r1 D = 0.052428, p-value = 0.9463 alternative hypothesis: two-sided Now normally you'd feed ks.test a numeric vector of ...


1

This works for me. If I select GeoTIFF (Floating Point) and download I get a file called MOD_LSTAD_M_2013-01-01_gs_360x180.FLOAT.TIFF. I can load that into R: > r = raster("./MOD_LSTAD_M_2013-01-01_gs_360x180.FLOAT.TIFF") > range(r[]) [1] -12 99999 The 99999 value is the ocean or other missing data, so lets set that to NA: > r[r[]>...


1

The OS Data Hub (launching on 1st July) will include ZXY and WMTS services as part of the OS Maps API. The OS Maps API is scalable, making it capable of providing an overview of Great Britain all the way down to street level. It does this by combining the new OS Open Zoomstack with the detailed OS MasterMap Topography Layer. The service includes a Premium ...


1

I doubt it, at that scale you are looking for OS MasterMap which are (currently) the "Crown Jewels" of GB spatial data. OS makes most of it's money from licencing that data to (mostly) other government agencies. If you don't want to pay then your best bet is the OS Zoomstack data which you can style and tile exactly how you want.


1

The problem is most likely that GeoServer can't work out the projection of the world image files. If you import them individually it will ask you for the projection before displaying them. In the case of an image mosaic there is no provision for asking you for the projection of each tile (it would take too long). So you have a variety of possible solutions: ...


1

You might be confusing internal and external CRS references. CRS's are very confusing. GeoTiffs can have the CRS baked into the file so there is no associated world file (.twf). In this case when I drag the file into QGIS 3.12 it reads the internal CRS and displays correctly. Here is a gif showing that process. Sometimes the CRS is actually missing in ...


1

From what I can tell, it is because you have two disconnected polygons in a multipolygon for the clip operation. This seems to produce undesired behavior and is not really supported. You can use the convex hull to get the boundary area of the shapes: If you use that to clip, you will maintain the resolution of the original raster in the clipped raster. ...


1

In my case, the x/y variables were of type numpy.float32 (read out of an array) which caused this exact error. Changing the types to regular float worked.


1

I use this script: #!/bin/bash basename=$(echo "$1" | cut -f 1 -d '.') mask=${basename}_mask.tif output=${basename}_edt.tif nodata=$(gdalinfo $1 | grep "NoData" | cut -d "=" -f 2) gdal_calc.py --NoDataValue=$2 --calc="A!=${nodata}" --outfile="$mask" -A $1 gdal_calc.py --NoDataValue=$2 --calc="A*B" -...


Only top voted, non community-wiki answers of a minimum length are eligible