Skip to main content

Questions tagged [numpy]

NumPy is a Python module, adding support for large, multi-dimensional arrays and matrices, along with a large library of high-level mathematical functions to operate on these arrays.

0 votes
0 answers
30 views

What value for nodata I should set in gdal_translate to get correct file in PCRaster?

I prepare files for PCRaster Python in GDAL. My command is: gdal_translate -of PCRaster -ot Int32 -b 1 -mo VS_NOMINAL file.tif file.map So I don't set up nodata explicitly. It results in a file that ...
Nikolay Yasinskiy's user avatar
2 votes
1 answer
378 views

"ArrayMemoryError: Unable to allocate 142 GiB for an array and data type float64" error when plotting map using geocube with Python

I am currently doing a project to predict forest fires using machine learning and to evaluate the model. I am using the following code: df_SA = gpd.read_file("QNFF.shp") # my point shapefile ...
Phạm Việt Anh's user avatar
0 votes
1 answer
353 views

Custom average merge multiple GeoTIFFs using Rioxarray, Rasterio and Numpy

I'm trying to merge multiple GeoTIFFs using rioxarray merge_arrays with a custom method that averages overlapping values. I've pieced together the following code which produces a GeoTIFF but it looks ...
Kevin's user avatar
  • 121
2 votes
1 answer
319 views

Calculating NDVI from Landsat data

I have multiple folders containing landsat data from different years . I have been just testing Landsat 5 before doing them all but I feel as though something is wrong with the code. def ...
Ekkehardt Rosasee's user avatar
1 vote
1 answer
303 views

Plotting ImageOverlay on Folium maps fails

I'm making a project. I need to open a local GeoTIFF file and load it into the Folium map with PyQt5. For now, instead of GeoTIFF, I took a numpy array. If it is 500,500,3 shape, everything is fine. ...
CruelBrutalMan's user avatar
1 vote
1 answer
221 views

Cumulative count cut min/max values in Python different from min/max values in QGIS

I am trying to replicate using Python, what QGIS does to visualize the rasters in the map. QGIS automatically chooses as contrast enhancement the method Stretch to MinMax. Looking at the Min/Max ...
rrwork___'s user avatar
  • 121
1 vote
0 answers
124 views

All-NaN slice encountered when apply xr_phenology function?

I want calculate vegetation phenology from ndvi netcdf dataset, I follow yours tutorials (DEA Australia and DEA Africa) to apply xr_phenology function , defined here. To avoid killed kernel of my ...
tazrart's user avatar
  • 169
0 votes
0 answers
52 views

Error while installing any libraries in ArcGIS Pro Python notebook

I'm trying to install libraries, but the same error is shown for all library installation.
mangotree's user avatar
0 votes
0 answers
174 views

QGIS enmap-box plugin error

I just now downloaded a plugin named "EnMAP Box". I am a user of QGIS v.3.28.12. It shows me the following error: An error has occured while executing Python code: RuntimeError: module ...
Natalie's user avatar
3 votes
2 answers
247 views

Modify cells in a raster, that intersect or are inside a polygon without modify the other cells

I have a raster of a DEM (Digital Elevation Model with values in meters above sea level) in .tiff format, and I need to subtract the value of 10 from the elevation values of cells located within a ...
El Memo de Mileto's user avatar
1 vote
0 answers
170 views

Calculating directionalDistanceTransform in Python

I would like to re-create Google Earth Engine's directionalDistanceTransform function in Python, mainly for learning and understanding purposes. There seems to be no equivalent function in Python, ...
TheBackwardsman's user avatar
0 votes
2 answers
211 views

Enlarge numpy array to fill/pad bounds in rasterio whilst keeping existing data intact

I'm looking to do what this question and answer is doing using gdal_translate / gdal_warp, but in Rasterio. Does anyone know of a way? I can't find anything in the rasterio.warp.reproject module that ...
Stev_k's user avatar
  • 6,789
1 vote
1 answer
316 views

Find coordinates corresponding to max and min values using Python

I'm using GDAL and numpy so far in my Python program. I am able to get the max and min values of a band within a .grib2 file with: def getDataStats(grib2Filepath, bandNr): local_minimum = None ...
interwebjill's user avatar
0 votes
1 answer
158 views

Dissolve lines that intersect after attending some dataframe (atributte table) conditions

I need to dissolve all Linestrings from a geodataframe that intersects each other after attending some tabular conditions: 1)have the same ID and 2) have the same opening year. I am working with ...
Marlon's user avatar
  • 21
0 votes
2 answers
368 views

NumPy error when importing ArcPy in virtual environment with ArcGIS Desktop 10.8.2

In many projects I use a Python virtual environment with ArcPy. I always use the same method to for setup: Create a virtual environment In the site-packages directory, add a file named Desktop10.X....
isshp's user avatar
  • 418

15 30 50 per page
1
2 3 4 5
32