Skip to main content

Questions tagged [concatenation]

In formal language theory and computer programming, string concatenation is the operation of joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is "snowball". In some but not all formalisations of concatenation theory, also called string theory, string concatenation is a primitive notion.

Filter by
Sorted by
Tagged with
1 vote
1 answer
37 views

Does PostgreSQL function concat_ws works as expected?

You find the documentation of the concat_ws PostgreSQL function here. It says this request concat_ws(',', 'abcde', 2, NULL, 22) results in this reply abcde,2,22. This example does not proves the ...
dancesWithCycles's user avatar
0 votes
0 answers
27 views

How to create a field with a list of neighboring residential lots in QGIS?

I need to create a field with a list containing the 'name' information of the geometries that intersect each of the existing geometries. They are residential lots, and I need to list the adjacent ones....
Victor Diniz's user avatar
1 vote
1 answer
79 views

Writing degrees Celsius in short hand ('c) in QGIS expression

There is a way to add something before the ' to indicate to QGIS that it is a string and not a column. In expression builder I simply want "temperature" || ''C'
Gregory C's user avatar
  • 413
4 votes
2 answers
157 views

Creating a concatenated field with conditions, changing a numeric field to 4 digits

Starting from a table with fields: "ID" (14 digit string) "COND" (numeric) "CDC1" (1 digit string) "CDC2" (1 digit string) The goal is to concatenate with an ...
Ingrid Ingravida's user avatar
2 votes
1 answer
247 views

Concatenating field names if value is true using QGIS expression

I have multiple boolean fields. I want to create a new string field, that is concatenating the field names of my existing fields when their value is true. I want the names separated by a comma. I am ...
e-shirt's user avatar
  • 667
0 votes
0 answers
25 views

How to do a location wise pixel correspondence between two different layers?

I have two separate rasters, an RGB orthophoto and a grayscale DEM of the same location. I need to run an object detection algorithm on the RGB orthophoto and then make the bounding box I receive ...
Aditya 's user avatar
  • 139
3 votes
0 answers
68 views

QGIS: concats wrong values

I need to create an ID-field in the attribute table for a survey. Since there is more than one person I wanted to create the field in the form "[initials]_[sequence_number]". I have created ...
Kala's user avatar
  • 101
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
5 votes
2 answers
188 views

QGIS: Compare two concatenate fields and add similar strings to new column

I am doing research on how planned improvements in urban green will likely affect biodiversity using QGIS. Each form of urban green has a list of so-called references species, species that are ...
Sebastian's user avatar
1 vote
1 answer
26 views

Concatenation of commands in SAGA grid calc

My goal is to mask pixels with chosen value, for example if g1 is equal to x1,x2,x3 the resulting pixel has to be set to 1 otherwise to 0. Through grid calculator I've tried this command: eq(g1, (x1 ...
Marco Prandi's user avatar
2 votes
2 answers
131 views

QGIS: Labelling with parts of an attribute consisting of two or more words

Working in QGIS, I have an attribute consisting of scientific names of species. I would like to label the points on the map with the first 3 left letters of both parts of the binominal scientific name....
Gábor Zvara's user avatar
1 vote
1 answer
86 views

Concatenating Attributes from Differing Features (Grouped By Value) Into Single Label

I have been using QGIS 3.28.0 and want to be able to concatenate the attribute values from differing features into the same label with each concatenated value on a separate line. I would group the ...
BFC123's user avatar
  • 19
1 vote
1 answer
204 views

In "Aggregate" tool, concatenate function and \n delimiter doesn't result in break line

I am encountering problems with the 'Aggregate' tool and the 'concatenate' function with the '\n' delimiter. The process is not resulting in a line break as expected. Please see the screenshot of the ...
Jean's user avatar
  • 21
3 votes
2 answers
182 views

QGIS expression not working in categorized symbology

In layer properties, when I want to work with categorized symbology, I categorize > value > concatenate(code 1, code 2) and after that, I click on "classify". And QGIS doesn't work (...
Obeidollah Ahmadi's user avatar
4 votes
1 answer
159 views

Combining content of multiple text cells into one field based on common id in QGIS [duplicate]

I need to combine the content of multiple cells into one, this is based on a common "ID". I need this "ID" to remain after the text has been merged. I tried the aggregate tool but ...
Lukazio's user avatar
  • 65
0 votes
1 answer
333 views

Convert Table Column to Comma Separated String

ArcGis Pro 3.0.2 Is there a way to use native tools to convert a column in my Table to a long String where values at separated by a comma? e.g. my column 1 2 3 Becomes "1,2,3" I tried using ...
sushi's user avatar
  • 319
1 vote
1 answer
262 views

Include point coordinates in a string with Google Earth Engine using JavaScript

I am making a time-series plot with data extracted from a point, and I would like to include the point coordinates in the title text. e.g. 'Timeseries from point (61.08457, 6.03583)' However, I can't ...
Erin's user avatar
  • 157
0 votes
1 answer
41 views

Concatenate a month identifier to the end of each year in a list

I am attempting to add a month identifier ('03', '04', etc.) to a list of years in Google Earth Engine. var year = ee.List.sequence(1992, 2021, 1).map(function(number){return ee.Number(number)}) ...
JL435's user avatar
  • 13
1 vote
3 answers
63 views

How to prevent '+' operator from concatenating rather than summing [closed]

I am trying to sum two fields and am using the expression below. "Q1 answer" + "Q2 answer" This expression is concatenating the answer to '32' when the answer should be '5' (3 ...
Laura Bennett's user avatar
1 vote
1 answer
197 views

Concatenate attribute data from point, line and polygon layers (QGIS)

I have data from map interviews consisting of three layers (one point layer, one line layer and one polygon layer) within a geopackage. Each layer has the same field structure (as shown below). The ...
David's user avatar
  • 109
3 votes
1 answer
236 views

Counting substring across multiple fields in QGIS

In QGIS 3.18 I have several fields of concatenated elements (comma-separated), all of which have the possible substring Fort as either one discrete comma-separated element, OR a part of a comma-...
pete's user avatar
  • 1,101
1 vote
1 answer
837 views

Expression-based table relation in QGIS, avoiding joins and relates

In QGIS 3.18. I have two tables, one as a part of a .shp and the other a tab-delimited .txt with no geometry: my .shp attribute table contains a list of sites, and my .txt table contains a list of ...
pete's user avatar
  • 1,101
2 votes
0 answers
82 views

Use aggregate to create a label from multiple shapefiles

I'm trying to fill one field of a line feature shapefile Cables (CAVI) with a default value that updates based on the start coordinate end the end one. The resulting field is a combination of the id ...
Phil's user avatar
  • 71
0 votes
0 answers
42 views

Joining SHP with XLS sheet using Excel

I am trying to join SHP by field CONCATENATE with my XLS sheet. SHP attributes looks like this: ID NAME CONCATENATE 122 765 122765 345/1 765 345/1765 987/3 345 987/3345 Because of those slashes ...
Piskota's user avatar
  • 15
6 votes
2 answers
2k views

Concatenate multiple fields where some contain null values (QGIS)

In QGIS 3.18. In a shapefile attribute table, I need to create a field that concatenates several other fields with a comma delimiter. Some of those fields are NULL. Currently my approach has been ...
pete's user avatar
  • 1,101
4 votes
2 answers
478 views

QGIS: concatenate_unique several columns in attributes table

I have a table with points representing villages. Its columns represent the place of the village in different historical periods. Sometimes the names are the same in different columns. Now, I want to ...
Jakub Sypiański's user avatar
3 votes
2 answers
221 views

Combining columns in attribute table

How can I merge columns in attribute table with / as delimeters?
Nnn's user avatar
  • 49
4 votes
1 answer
974 views

Concat fields which are not NULL

I am using the concat function in QGIS 3.16.6 on Mac. I want to join several cell values into one new cell. With the concat function it is ignoring cells with NULL but it doesn't separate the cell ...
TSZ's user avatar
  • 41
2 votes
2 answers
420 views

Click features & aggregate unique attributes only using QGIS

In QGIS 3.16 the "merge feature attributes" function (on the advanced digitizing toolbar) allows merging the attributes of selected features by either 1) selecting which feature to keep the ...
pete's user avatar
  • 1,101
4 votes
1 answer
549 views

'Evaluation error' when using Aggregate tool in QGIS

In QGIS 3.16. I am using the Aggregate function to reduce the number of features in a layer. I am grouping by one field and I want to concatenate the others. My actual data table is fairly large and ...
pete's user avatar
  • 1,101
4 votes
2 answers
791 views

Area of each polygon that intersects another layer and total area of intersections in QGIS

I have two layers: 'A' (orange) and 'B' (purple). Using a Virtual Layer and group_concat I am able to list the polygons in layer 'B' that intersect with those in layer 'A'. I found that solution at ...
David's user avatar
  • 109
4 votes
1 answer
2k views

Merge adjacent polygons & concatenate attribute values (QGIS)

In QGIS 3.16. I have a layer of 1000+ polygons, many of which are adjacent (touching, overlapping, or one completely inside another). If all of the adjacent polygons are merged, I will end up with ...
pete's user avatar
  • 1,101
3 votes
1 answer
592 views

adding x and y into single column in QGIS

I have always use the field calculator to retrieve my x and y coords ($x, $y), but this ends up with 2 separate columns, which I then have to manually concatenate. Is there a way to do this easily ...
Morani's user avatar
  • 148
1 vote
1 answer
469 views

How to iterate through various layers and export each with an additional word to its file name

I'm batch dissolving some layers in QGIS and want to save each dissolved shapefile as <layername>_dissolved.shp. I'm using a for-loop but it just shows raise QgsProcessingException(msg) _core....
BallpenMan's user avatar
  • 1,217
0 votes
0 answers
114 views

QGIS: spatialite incorrect string concatenation when loading layers

I am trying to draw some polygons in spatialite using the DB Manager in QGIS. However select 1 as id, st_geomfromtext('POLYGON((0 0,0 '||random()||','||random()||' '||random()||','||random()||' 0,0 0))...
maxwhere's user avatar
  • 1,158
4 votes
1 answer
926 views

Dropping duplicate strings when using group_concat in Virtual Layer

When using Virtual Layer to group_concat() a string field, the result would contain duplicates string. For example, here's a polygon layer "city_lot" with "land_use" and "...
David H. J.'s user avatar
2 votes
1 answer
355 views

StopIteration: iteration not started

I'm trying to update a given field in this case the last one of the table by concatenating all values in the row excepting null values or '' values. So far when execute the code until line: print (...
daniel mauricio's user avatar
2 votes
1 answer
1k views

Concatenating fields into a new field-QGIS

I'm not sure what I'm missing here. I'm trying to use the field calculator to concatenate multiple fields into one new. All fields are identified as strings. My expression: concatenate( "Building" ...
Heather's user avatar
  • 21
9 votes
1 answer
17k views

Merging a geodataframe and pandas dataframe based on a column

I have a simple geopandas dataframe that includes geometry and a column called 'MUKEY': merged_spatial_df.head() I want to merge it to a tabular (.csv) pandas dataframe (which also has a column ...
gwydion93's user avatar
  • 1,913
4 votes
1 answer
530 views

Get Attributes from 1:n relation in QGIS as Expression to use in Atlas

I need to set up way signs for something like a "hiking-GIS". In the first step I made a network analysis (using QNEAT3) to find the distance from the signs ("Way Signs") to the available destinations ...
MartinMap's user avatar
  • 8,338
4 votes
1 answer
936 views

Layout expression for getting all features of layer within the current map view in QGIS 3?

In a map layout template, I want to insert an expression which gets all feature's names of a certain layer, which are contained in the current layout's view/extent. Is there a way to get an aggregate ...
Kay's user avatar
  • 1,856
2 votes
1 answer
3k views

Add column in QGIS

Is it possible to add a column in the attribute table in QGIS that is a concatenation of two other columns? For example I have a column "Genus" and a column "Species" and I would like to create a ...
QGISer's user avatar
  • 59
4 votes
2 answers
2k views

Concatenate attributes ignoring NULL/missing values with FME

I've got a table with different attributes (named "source:geommetry", "source:name", "source:power"...) I'd like to concatenate to one attribute named "source_all" using FME Desktop. A blank space is ...
Maja Ott's user avatar
  • 435
3 votes
1 answer
433 views

QGIS 2.18 label by expression concatenate field strings

For a building layer I have an attribute table with several fields for the building type where data was entered with a manually created form using checkboxes. Example: Production: 1 = (yes), 0 = (no) ...
Philippo Storino's user avatar
0 votes
1 answer
117 views

Concatenate five fields where some may be NULL

I have a trench containing five types of ducts. I have created fields the trenches: Type1, Type2, Type3, ... The values in each field are the numbers of each type of duct that the trench contains. ...
Sundraw's user avatar
1 vote
1 answer
380 views

Syntax error when using concat function

I created a field to display the whole route of several photos in a point layer in order to be able to visualize them on the map. I try to do so by using this expression: concat('C:\Users\DIDAC\...
dmasana's user avatar
  • 63
3 votes
1 answer
141 views

Creating list of intersected polygons for each line using QGIS

I have a line layer representing transport routes. I would like to add a Virtual Layer listing every city crossed by each line. I would only need the id of each city to be listed (column "...
Arthur's user avatar
  • 893
1 vote
0 answers
108 views

I want to combine or merge rasters

I am combining many rasters using a "barcode" that describes attributes for each cell. Combine works on integer values: I combine multiple layers using "combine" tool, then create the bar code by ...
TobyG's user avatar
  • 21
2 votes
1 answer
2k views

Simple Field Calculation With No Results in ArcGIS Pro?

I have a grid in ArcGIS Pro that I've named the X and Y axis (in separate columns) and am now trying to do a field calculation on the total grid name (I've tried using both single and double quotes. I'...
MaryBeth's user avatar
  • 3,714
3 votes
4 answers
4k views

Concatenating address fields with possible blank or null values in fields using Python parser?

The following Python code is what I have already tried in field calculator of ArcMap 10.5.1: Pre-Logic Script Code: def ConcatAddr(!JOIN_KEY!) val = "" if !Address! <> val ...
Ms05's user avatar
  • 125