Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

Generate and populate a grid from points in a geopandas dataframe [duplicate]

Context: I have a geopandas dataframe, with two columns 'geometry': full of shapely.geometry.point.Point. 'h_mean': gathering the height of a surface at those points I want to create a 2D spatial ...
Nihilum's user avatar
  • 143
0 votes
1 answer
664 views

Convert WRF NetCDF to TIFF

I have a NetCDF file, output of a WRF model, which contains a time series of some variables. You can download it here (Warning: 7GB download). Here is the gdalinfo output: Driver: netCDF/Network ...
Andrea's user avatar
  • 69
0 votes
0 answers
261 views

Create raster from numpy array with boundaries

Working on creating a raster with a constant value for all pixels for land with python. A sample raster is read to get the projection, geotransformation for the the new raster. The raster has the US ...
Arun.R's user avatar
  • 1
1 vote
1 answer
491 views

Change values of pixels of a GeoTIFF in Python with conditions

I would like to change the values of pixels based on some conditions. I am using rasterio and python to modify the values. This is what I am doing import nunpy as np import raterio def changeLabel(arr)...
emax's user avatar
  • 269
1 vote
2 answers
258 views

Array transformation: RasterStacks of time-series into Array of matrices

I have 9 RasterStacks with 65 layers containing time-series of satellite imagery. Each stack contains a time-serie of each Sentinel-2 band (B2, B3, B4, B5, B6, B7, B8, B11 and B12). The shape of the ...
sermomon's user avatar
  • 1,086
3 votes
1 answer
3k views

Converting column with LineString geometries to np.array

I have a GeoDataFrame of a street network with the geometry of each row as a LineString. Say something like: type id tags geometry lanes bridge name highway 0 way 34953479 {'...
arkriger's user avatar
  • 337
4 votes
1 answer
284 views

Advanced labeling in QGIS to automatically get data from new fields and create arrays

I'd like to be able to easily get quick data from different projects I work in in order to avoid having to do sql queries all the time. So here's the thing, today I managed to get the following ...
pr_'s user avatar
  • 53
3 votes
1 answer
1k views

Unable to write raster from array using rasterio

I have two raster files, raster1 and raster2. I want to take raster1 and divide it by raster2 and produce an output raster for this calculation. I am using python and the rasterio package. For info on ...
LostinSpatialAnalysis's user avatar
1 vote
2 answers
408 views

How to create a NetCDF file with Albers conical equal area projection in Python

I was wondering how to create a NetCDF file with the following dimensions and variables; <class 'netCDF4._netCDF4.Dataset'> root group (NETCDF4 data model, file format HDF5): Conventions: CF-...
user195787's user avatar
1 vote
0 answers
1k views

Ploting GEE image with imshow and adding an cartopy.io.img_tiles using add_image

I transformed a GEE image in an numpy array and I'm trying to plot a this array using plt.imshow() with a background image of cartopy image tiles (cimgt) with .add_image(). However, the array and ...
Izaeljr's user avatar
  • 13
0 votes
0 answers
365 views

Acquiring data point coordinates from Geotiff and converting to numpy array

I would like to use scipy.interpolate.griddata to interpolate my Sentinel-1 products (see two sample images below) taken from different orbits resulting in having the uniform datapoint coordinates. I ...
Luckasino's user avatar
  • 293
2 votes
2 answers
240 views

Python array based alternative to GRASS r.cost

I am looking for a numpy array based alternative to the GRASS r.cost function. I have a friction surface raster where the value of each cell corresponds to travel time. I would like to find the cells ...
aps_fm's user avatar
  • 21
3 votes
1 answer
139 views

Calculate the sine of a raster in the power of y / Python

I have this code and my aim is to calculate the sine of my raster in the power of 0.8. import os os.chdir('D:/NOA/Soil_Erosion/test_Project/Workspace/Input_Data_LS_Factor') import rasterio ...
Melpomeni_Zoka's user avatar
1 vote
0 answers
37 views

Comparing two same-shape band arrays, one against a set of conditions to then change the other one

first band and second band can be assumed to be the same shape. I want to test the second band against two conditions (that it's not "invalid_data" and the value is one of the numbers in &...
thisisjfso's user avatar
1 vote
0 answers
768 views

Using a shapefile as mask with rasterio mask gives different affine transforms with rasters of the same projection and resolution

I have a list of n file paths to geotiffs of the same resolution and projection but with varying extents. In brief the goal is to use Rasterio's mask module to use a shapefile containing a single ...
jeremyg19's user avatar
  • 317

15 30 50 per page