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
3 answers
49 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 ...
user avatar
1 vote
1 answer
45 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 ...
user avatar
  • 71
2 votes
1 answer
51 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-...
user avatar
  • 1,001
1 vote
1 answer
98 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 ...
user avatar
  • 1,001
2 votes
0 answers
41 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 ...
user avatar
  • 71
0 votes
0 answers
32 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 ...
user avatar
  • 15
6 votes
2 answers
384 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 ...
user avatar
  • 1,001
4 votes
2 answers
127 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 ...
user avatar
3 votes
2 answers
109 views

Combining columns in attribute table

How can I merge columns in attribute table with / as delimeters?
user avatar
  • 49
4 votes
1 answer
233 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 ...
user avatar
  • 41
2 votes
2 answers
151 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 ...
user avatar
  • 1,001
4 votes
1 answer
191 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 ...
user avatar
  • 1,001
3 votes
2 answers
336 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' thanks to @Jesse McMillan's ...
user avatar
  • 71
4 votes
1 answer
368 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 ...
user avatar
  • 1,001
3 votes
1 answer
111 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 ...
user avatar
  • 118
1 vote
1 answer
121 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....
user avatar
  • 1,149
0 votes
0 answers
60 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))...
user avatar
  • 922
4 votes
1 answer
83 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 "...
user avatar
2 votes
1 answer
127 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 (...
user avatar
2 votes
1 answer
148 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" ...
user avatar
  • 21
4 votes
1 answer
6k 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 ...
user avatar
  • 1,659
3 votes
1 answer
306 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 ...
user avatar
  • 7,663
4 votes
1 answer
489 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 ...
user avatar
  • 1,806
2 votes
1 answer
680 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 ...
user avatar
  • 59
4 votes
2 answers
1k 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 ...
user avatar
  • 415
3 votes
1 answer
328 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) ...
user avatar
0 votes
1 answer
99 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. ...
user avatar
1 vote
1 answer
244 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\...
user avatar
  • 63
3 votes
1 answer
113 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 "...
user avatar
  • 823
1 vote
0 answers
83 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 ...
user avatar
  • 21
1 vote
1 answer
1k 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'...
user avatar
  • 3,595
3 votes
4 answers
3k 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 ...
user avatar
  • 123
1 vote
1 answer
92 views

Copying specific folder into subfolders with ArcPy?

I'm working on Arcgis 10.5 and I am trying to achieve this: On my script, I want to make folders and subfolder, and also I want to copy one specific folder into several subfolders at the same time. ...
user avatar
1 vote
3 answers
848 views

Concatenating two columns in ArcGIS 10.2.1: "no records within table"?

I am trying to merge two text columns (consisting of 2 digit and 3 digit numbers respectively) into one in ArcGIS 10.2.1 desktop version, but unable to do so. I have added a new field and kept it as ...
user avatar
  • 11
1 vote
1 answer
354 views

Concatenate Label Values Fails to Calculate Aggregate

I'm trying to do what seems like a very simple operation (It's SUPER easy in ArcMap...). I'm kind of a novice with QGIS, so it's probably something really simple that I'm doing incorrectly. The ...
user avatar
  • 119
2 votes
1 answer
2k views

Concatenating string with space

I am adding a number of strings together to create a linestring but as such I need spaces between the initial XY values and the end XY values, plus a comma in between the two halves. Should result in ...
user avatar
  • 197
3 votes
3 answers
3k views

Concatenating strings from two fields using Python in ArcMap Field Calculator?

I'm new to Python scripting and I don't understand what is wrong with this code. I want to concatenate the string values from GRID1MIL and GRID100K. I've created a text column MGRS to begin with. I ...
user avatar
  • 621
0 votes
1 answer
166 views

Cannot define output with Concatenated path

I am working on a series of geoprocessing tasks and trying to define the output through the concatenation of folders, a geodatabase, and finally a raster dataset. Each way I try it I receive an error ...
user avatar
  • 3
5 votes
3 answers
2k views

Listing IDs of polygons within another polygon in the Attribute table

I have two polygon shapefiles in QGIS. I would like to have the polygon "ID"s of 'B' listed in the attribute table of 'A' for the case that they overlap. As a demonstration: I tried ...
user avatar
  • 665
1 vote
1 answer
267 views

Regrouping concat labels with overlapping intersecting geometries in QGIS

All the fields i want to show on the map are in the same layer. All the labels have to be showed on the map. But the concentration is high. So i would like to concat the labels when geometries are ...
user avatar
  • 995
1 vote
1 answer
3k views

How to concatenate string and noneType object

My issue is: I can't concatenate string and noneType object. Some attribute values are empty. It follows that label isn't displayed. What is the solution? def FindLabel ( [CONTENU], [...
user avatar
  • 35
0 votes
1 answer
215 views

Using cursor to populate a new field by concatenating existing fields

I have a question for a current assignment that requires me to write a script that will add a new field to a feature class and then use a cursor to populate the new field by concatenating five other ...
user avatar
  • 175
3 votes
1 answer
29 views

Find unique ZIP codes and add to field

I have multiple values in a table with the same CODE(Name) and each one has a ZIP. How to find all of the unique ZIP codes and add them to a field. Here is an example of the result I am looking for: ...
user avatar
  • 31
0 votes
0 answers
146 views

Spatial join with concatenation of results

I've two polygon layers which I would make a spatial join. The objective is to transport a specific code from layer A (Municipality) to layer B (Issues) using like a concatenate function, in this way ...
user avatar
  • 489
1 vote
0 answers
42 views

QGIS: Join by Location: Option to retain all attributes of spatially related objects of my join layer [duplicate]

I am facing the problem that I want to join the attributes from one specific column of ALL intersecting features from my join layer to my target layer in case of an intersection (1:n relationship) ...
user avatar
  • 501
4 votes
2 answers
687 views

Concatenating two fields (type double) into single field?

In ArcGIS 10.3 using the field calculator, I'm trying to concatenate a census tract field (double) with a census block field (double) into a single field that has the two values separated by a decimal ...
user avatar
2 votes
2 answers
590 views

Concatenate geospatial pdfs

I am looking for a simple way to concatenate one geospatial pdf (with multiple layers in a single image) and regular pdf. I have tried tools such as pdfunite, pdftk and pdfconcat, without success. The ...
user avatar
5 votes
5 answers
12k views

How to combine text and integers in a string field?

I have field with numbers in it (field type: double, number format: numeric) and I need to create a new field and put text in front of the numbers. I know that I need to add a new string field, but ...
user avatar
  • 53
19 votes
5 answers
34k views

Concatenating fields in field calculator of QGIS?

Is there a way to concatenate fields in field calculator of QGIS? (e.g. hectares + ' ha')
user avatar
  • 5,298