Skip to main content

Questions tagged [array]

An arrangement of quantities, symbols or objects in rows and columns; a matrix

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

Create an array of band names where the pixel value is 1 in Google Earth Engine

I have an image in GEE with 20 bands, each corresponding to one year. Indeed, I have a time series. Each band can have values 1, 0, or -1. Value 1 means a specific event starts, and value -1 means the ...
Isa's user avatar
  • 193
2 votes
0 answers
61 views

Using PostgreSQL Array Data in GeoServer

I'm working to setup GeoServer on a table, and ran into a new issue where one of my fields is a PostgreSQL Array of type text[] that stores tags. I'd like to be able to use and query that field in ...
Andrew T's user avatar
  • 279
2 votes
1 answer
78 views

QGIS Field Calculator Expression: get field name for value at specific index

I am looking for a way to search the field name ( green circle ) of a value at a specific index. In the example shown above I would like to find the field name "25 x 2,3" for the value of ...
Denis Crîlov's user avatar
3 votes
2 answers
141 views

QGIS Field Calculator Expression to retrieve index of specific value

I have two tables: [see image beloW] HAK where the Column "Volumenstrom_h" has the input value ( x ) needed for the linear interpolation formula displayed which can be seen surrounded by ...
Denis Crîlov's user avatar
0 votes
1 answer
278 views

Extracting confusion matrix values in GEE

I am training a random forest model in Google Earth Engine, and I want to output the confusion matrices so I know which classes are being confused for which. By default, the confusion matrix is ...
Matt's user avatar
  • 151
1 vote
1 answer
44 views

Mask out pixels by array length in GEE

I have an image array resulting from the continuous change detection algorithm. Because arrays represent the characteristics of each break in the image series, the pixels have different array lengths. ...
user157564's user avatar
0 votes
1 answer
63 views

GEE: arraySlice to find first, second, third, etc. entries in image array

I'm working off of a great tutorial on continuous change detection from this book chapter. I use the tutorial data and code to demonstrate the issue I'm encountering. Using a stored array image, we ...
user157564's user avatar
1 vote
1 answer
153 views

Error with array_foreach when using together with aggregate in QGIS expression [closed]

I want to use array_foreach functionality. But it does not seems to work when used in an aggregate function. This intermediate test ( array predefined, instead of array generated by another aggregate),...
ClaudeVer's user avatar
  • 630
0 votes
1 answer
140 views

Compute mean value of a band on each image in an Array

I try to compute the mean value of a band on each image of an imageCollection and store all the values in a Array to compute the RMSE with another dataset that I will also store in an Array (not sure ...
Aurélien Lengrand's user avatar
0 votes
0 answers
25 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
0 answers
45 views

Align the points in polygon

I have two datasets consits of building footprints and point data. Points are within the footprint but they are scattered. Is there any tool to align them perfectly within the polygon as pattern. ...
Bruno B's user avatar
  • 849
1 vote
1 answer
117 views

Convert RasterStack object to Array and Array to RasterStack

I have a RasterStack object. I need to convert it into an array and then convert this array into a new RasterStack. library(raster) Here a RasterStack example: m <- raster(ncol=10, nrow=10) values(...
sermomon's user avatar
  • 994
0 votes
0 answers
42 views

gdal.Warp reading 2d multichannel array incorrectly - loading bands (3) as the y axis

We have a python script that downloads NOAA GOES satellite NetCDFs, and processes the image datasets via Pillow\OpenCV. Then I convert it back to a GDAL dataset in order to translate and warp. With a ...
John Lawler's user avatar
0 votes
1 answer
426 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
4 votes
2 answers
1k views

Unesting JSON array in SQLite [closed]

I'm using DB Manager on QGIS to write a view. I want to "translate" unnest() SQL function, but I don't find the same in SQLite. SQL SELECT unnest(ARRAY['A','B','C']); unnest A B C The ...
GeoGyro's user avatar
  • 1,656
1 vote
1 answer
335 views

Filling in attributes from a different layer in QGIS batch mode

I have a point layer with an X,Y field, containing the coordinates of each point separated by a comma. I'm trying to batch process r.water.outlet based on these X,Y values from a different layer, the ...
One's user avatar
  • 13
1 vote
2 answers
321 views

PostGIS ST_Union using array of geometries

I'm new to PostGIS and I have a set of layers that need to be merged and dissolved. I have no problem doing this for 2 input layers using ST_Union(geometry g1, geometry g2), but for more than 2 layers,...
chrisp66's user avatar
2 votes
1 answer
339 views

Make a polyline shapefile out of a mask, but do not count the boundaries of the array in the polyline

I have 3 DEMs that I mask: non-NaN values = True and NaNs = False. I have an algorithm that plots the boundaries of the masks, but the issue is that it also plots the boundaries of the array of the ...
Nihilum's user avatar
  • 143
2 votes
1 answer
342 views

'Invalid GeoJSON geometry' error while exporting an array as CSV in Google Earth Engine

My variable array1 is a list of objects. I am trying to export this list as a table in Excel to do work on that. However, the error I am getting is this: Line 184: Invalid GeoJSON geometry: {"...
user222026's user avatar
1 vote
0 answers
78 views

Inserting time dimension into 2d array (lon, lat) to create 3d array (time,lat,lon)

I'm trying to create a 3d array with 'time, lat, and lon' dimension. My data is from trmm 3b42 v7. Can someone help me with what should I do. The following are the codes I created. from netCDF4 import ...
CARL JUSTINE NAVARRO's user avatar
0 votes
1 answer
254 views

How to download a image array in Google Earth Engine?

I'm trying to export an image array produced by the ee.Algorithms.TemporalSegmentation.Ccdc algorithm. This is a 1D image array. I'm trying to export it using: Export.image.toDrive({ image:...
sermomon's user avatar
  • 994
1 vote
0 answers
352 views

How to fix Google Earth Engine ee.Image.getDownloadURL inconsistent output array dimensions

ee.Image.getDownloadURL(..., {'dimensions': '100x100', ...}) occasionally returns arrays with shape (101, 100) or (101, 100) or (101, 101) instead of the expected (100,100). I can't explain it since ...
TmtStss's user avatar
  • 23
0 votes
0 answers
73 views

Backward transformation of georeferenced image: from GeoTIFF to TIFF

What's the processing procedure to realize a backward transformation, from a GeoTIFF image to its native array of pixels? Do you have any suggestion?
Claudio's user avatar
  • 26
0 votes
2 answers
219 views

Iterate through multiple arrays from several folders and perform calculations

Iterate through multiple arrays, each having multiple arrays I have three folders, each containing 675 NumPy arrays. I want to iterate over each array in each folder. My first folder is “Barleyarea,” ...
Endalkachew Kebede's user avatar
5 votes
2 answers
132 views

How can cumulative point data be labelled in QGIS?

With the following code I can generate a listing. However, the entire list is displayed and not the data of the attribute of the respective geometry. 'Schäden: '|| array_to_string( array_agg( &...
Alex's user avatar
  • 71
0 votes
1 answer
196 views

Print chart error: "User memory limit exceed"

I tried to plot the SAR backscattering vs the Crop Water Stress Index using the following code: var CWSI= ndvi.add(ndwi).rename('CWSI') print('CWSI',CWSI) Map.addLayer(CWSI.clip(Hoshiarpur),{},"...
Reflex_180's user avatar
4 votes
1 answer
380 views

Translating array into list or map and back in QGIS

Arrays in QGIS look like: [ 'WID00037-LDB', 'WID00027-LDB', 'WID00026-LDB' ] This kind of List or Map generated by QGIS Value-Relation Widget look like this: { "WID00037-LDB", "...
MartinMap's user avatar
  • 8,338
4 votes
1 answer
130 views

Numbering row based on date field in QGIS [duplicate]

In QGIS 3.28 I just want to create a row number (Column "Número") based on the date of the column on the left ("Fecha"), I'm sure it's pretty easy but I'm completely new. @...
Julio Palomino's user avatar
1 vote
0 answers
60 views

Finding lowest and second lowest values within selection, using expressions QGIS 3.24

I need to calculate the closest and second closest point in one layer, measured from points in another layer. I have used Qgis Network Analysis "OD Matrix as table from layers" which gives ...
Helena's user avatar
  • 81
0 votes
0 answers
209 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
394 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
1 answer
75 views

Reading and storing 1st pixels from multiple rasters

I want the code to read 1st pixel from a bunch of rasters (for eg. 1st pixel from 6 different rasters (having same extent and same number of pixels) and convert it into array followed by reading 2nd ...
surdeep's user avatar
  • 51
0 votes
1 answer
467 views

Reading multiple rasters in folder

the rasters in that folder has dates in the naming (for eg. T43RGP_20220330T052639_NDVI) and I want the code to read the rasters one by one in the increasing order of the date. Help me complete this ...
surdeep's user avatar
  • 51
-1 votes
1 answer
224 views

Calculate sum of comma separated decimal values in QGIS [duplicate]

The field has decimal values separated by comma and I want to find the sum of those values. When I run the below code if ( lengths is NULL, NULL, array_sum ( array_foreach (...
linda theres's user avatar
1 vote
2 answers
198 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
  • 994
4 votes
1 answer
359 views

Filter array with a field value

I need to filter filenames (like DJI_0147_3_5.jpg) in an array, and the code below works, but, where you see a 3 in regex, I need instead a field value. In the array output (sourcefile field) we have ...
fausto ugozzoli's user avatar
3 votes
1 answer
2k 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
1 vote
2 answers
610 views

GEE: Export an Array into a Table

I have created an array with the results of a Pearson correlation between image bands. I want to convert that array into a properly structured Table. Currently, I am able to export it, but the output ...
Isa's user avatar
  • 193
7 votes
1 answer
404 views

QGIS - Connection Lines using geometry generator between 2 layers in a relation N-1

I would like to know if there is any way to generate a connecting line between 2 points layers (blocks-points representing a watershed, concpoints-points representing the concentration location of the ...
LeoNazareth's user avatar
1 vote
2 answers
197 views

Raster to Numpy array for aspecified area, search maximum value using ArcPy and numpy

I want to filter the maximum value within a given area using the fastest method possible. I don't want to load the input files (several 100s of full size, classified Sentinel 2 images, integer) ...
GisT's user avatar
  • 91
2 votes
1 answer
313 views

Array (Error) Array: Unrecognized type, may only use numbers or lists, found type Array

I am getting this error when trying to subtract the array with its mean value in Google Earth Engine JavaScript API var from = ee.Array([2,3]) var meann = from.reduce(ee.Reducer.mean(),[0]) var to = ...
Việt Nguyễn Đức's user avatar
2 votes
1 answer
467 views

Converting array to polyline using Arcade with ArcGIS Pro

Arcade/ArcGIS Pro 2.9: I have an array of polyline vertices: [[[670634.3148,4862051.3579,null],[670719.3321,4862051.0072,null],[670721.44381227,4862055.2956567,null], [670724.26721751,4862059.1529319,...
User1974's user avatar
  • 1,172
4 votes
1 answer
235 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
991 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
4 votes
1 answer
713 views

Update array geometry field using array lat & long field in PostGIS

I have two array columns in Postgres named lat and long. Both have 1-5 values in their array field. Like the following Now I need to create geometry from each value based on the array index of lat &...
reedwanKazi's user avatar
9 votes
4 answers
846 views

Sorting alphanumeric array numerically using QGIS Field Calculator

For each street I have a list of house numbers in a column of a CSV file and I need to sort them numerically: House numbers are separated by -. name list sorted_list street A 5/A-5-4-8-3-6-9-7-1-10-...
pigreco's user avatar
  • 4,500
3 votes
2 answers
266 views

Comparing arrays in QGIS

I want to compare two arrays and if they match exactly a specific value should be assigned to a field. For instance, if the values in "sumEHZ" are [A,B] or [B,C] the lower value should be ...
parallax's user avatar
  • 1,482
0 votes
1 answer
833 views

Loading data from array in popup when country is clicked in React Leaflet

I'm newbie and I have interactive web in react using leaflet library and now I need to load "title" data from array to a map. So when I click on some country, popup will show up with this ...
loklba's user avatar
  • 43
4 votes
4 answers
1k views

Replacing strings from multiple array elements delimited by commas in QGIS

In QGIS 3.18, I have a vector layer of 1000+ features with 100+ attributes, many of which are strings of concatenated elements (substrings) delimited by commas. Some of those elements need to be ...
pete's user avatar
  • 1,101
1 vote
2 answers
362 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
2 3 4 5