Questions tagged [string]

A sequence of characters.

Filter by
Sorted by
Tagged with
0 votes
1 answer
10 views

How to update string column of a shapefile GRASS GIS

I'm relatively new in GRASS GIS and I want to update a column of a shapefile. I use GRASS GIS (version 7.8.6 on Ubuntu 20.04 .4 LTS), not the GRASS extension in QGIS. I'm workin on a shapefile. In ...
1 vote
1 answer
27 views

QGIS print layout: no options for string for path to raster image

I want to create a print layout/atlas in QGIS where an image captured by QField is displayed automatically. But now when I want to select the file path in the area Image -> Raster Image->Field ...
  • 11
0 votes
1 answer
29 views

Arcade Expression To Enforce Field Value String Length In a Subset of Records

Trying to apply an attribute rule to constrain a feature to a certain length (in the below example 8 character string, yet also trying to do it over a subset of data, in which attributes of another ...
1 vote
1 answer
27 views

How to find the row number based on a set of SFC coordinates, in order to pull out the value from another column

I am new to geodetic data in R, so apologies if this is way off. I have got a dataset, with a column geometry, which contains SFC points, and a second column IntersectingPoints: IntersectingPoints ...
  • 21
1 vote
0 answers
26 views

Using an input string in a file path for a input vector layer in QGIS model

I am building a QGIS model to perform field calculations on a large number of .shp files containing environmental information of different waterbodies. This model should be global for the different ...
1 vote
1 answer
90 views

Making new field with formatted values without leading zeros in QGIS

I have a field called "Kiinteistotunnus". The values ​​are of the form 73499900010025. The values ​​should be split into parts in style 734-999-0001-0025. But what should I do if I want ...
4 votes
3 answers
181 views

Adding letters, spaces, and removing parts of attribute string in QGIS

I have an attribute of the form: 12-06-065-03 W4M and would like it in the following form: LSD-12 SEC-06 TWP-065 RGE-03 MER-4
  • 607
1 vote
1 answer
38 views

Iteratively name output files in a loop while using arcpy.conversion.FeatureClassToFeatureClass

I have four input feature classes and one feature dataset which I am trying to send them to. I would like the new feature classes to have the same names as the originals. My process is as follows: for ...
  • 29
3 votes
2 answers
59 views

Removing question marks in front of records in QGIS

I am using QGIS 3.10.3 and noticed some question marks in one column of the attribute table. These marks are just before the numbers and represent the currency symbol. I want to get rid of them. I ...
  • 161
5 votes
4 answers
366 views

Removing unwanted data in the cell of the QGIS Attribute table

How can I remove remove data after any special character in the cell using QGIS? E.g.: Valli Amman Mandir, Chettiyakotai I want only Valli Amman Mandir in the cell. The rest should be removed.
  • 613
1 vote
1 answer
62 views

QGIS Rule Based Labeling filter string from a value

I'm relatively new to QGIS. Recently I started mapping the hiking trails of Nepal. I used a GPX recorder application from Android Play Store. While entering the waypoint, I entered the name. The ...
2 votes
2 answers
96 views

Getting EPSG code from QgsCoordinateReferenceSystem

I can create a QgsCoordinateReferenceSystem from a EPSG ID. How can I get a string formatted like EPSG:4326 back from the QgsCoordinateReferenceSystem? >>> p = QgsCoordinateReferenceSystem....
  • 4,464
1 vote
1 answer
65 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 ...
  • 147
0 votes
1 answer
76 views

Merge featurecollection [closed]

If I have several featurecollections in GEE, I can merge them quickly. However, if I have 1000 featurecollections, whether it means I need to type 999 'merge' in code. I think it is too time-consuming....
  • 3
2 votes
1 answer
49 views

How can I transform a StringList to one String

I have a column in Qgis with type:"StringList" eg { "name": "William", "height": "1.87", "age": 90 }, { "name": "Mary", &...
-2 votes
1 answer
57 views

Time difference between two string fields with microsecond (or seconds) resolution using, Arcpy, datatime and UpdateCursor

I am trying to calculate (using Arcpy) the time difference between two fields that are in string data type and they have the following time format "YYY-MM-DD HH:mm:SS.sss" I have achieved ...
1 vote
0 answers
29 views

String splits on KML conversion [closed]

I am opening this file with Google Earth and I am supposed to to do a bunch of string splits on the KML conversion since it saves the folder structure in the “PATH” field iirc. How can I do this? Here ...
4 votes
1 answer
338 views

Summing numbers separated by commas in string field in QGIS

In QGIS, I have a column separated by comma (shown by column "lengths"). I want to sum up elements in it for each row. The column is a text field string.
  • 133
4 votes
1 answer
93 views

Making new field with formatted values in QGIS

I have a column called "Kiinteistötunnus". The values ​​are in the form 73479400010025. Values in the whole column ​​should be changed to form 734-794-0001-0025. The data type is Integer64. ...
1 vote
1 answer
62 views

Is it possible to overline labels / text / strings in QGIS 3.x?

I would like to overline the denominator in these fractions. Underlining the numerator would result in too short a line when the numerator is shorter than the denominator. The numbers in this image ...
1 vote
0 answers
17 views

Alternate view to normal view in attribute table [closed]

I have somehow accidentally changed how my attribute table looks and I dont know how to get it to go back to the original state has anyone any idea how to change?
  • 11
0 votes
1 answer
2k views

psycopg2 cursor.copy_expert() BadCopyFileFormat: extra data after last expected column when writing WKB data

I am trying to write a WKB representation (i.e. a binary string) of a Shapely Polygon into a PostgreSQL/PostGIS database using psycopg2 cursor.copy_expert() for a bulk insert. I narrowed down the ...
  • 9,111
4 votes
2 answers
305 views

Geopackage in QGIS: Search and replace in all attribute fields at once

The context I have a Geopackage file opened in QGIS. It was created by importing a CSV file. However, when importing, something regarding encoding went wrong: I have several special characters like ...
  • 55.3k
5 votes
4 answers
217 views

Removing file type from attribute table in QGIS

I imported a shapefile that contains track plots of SGY files into QGIS, and I would like to remove '.sgy' from the file names in the attribute table. In the image, I've highlighted the section of ...
  • 61
0 votes
0 answers
150 views

Double "foreach" - replace text in string when matching text in list using FME

I have a dataset containing texts for translation using Azure's Cognitive Services, and another dataset containing the names of points of interests (and their geolocations). Multiple matches can occur....
  • 101
1 vote
0 answers
102 views

How to use WFS to update the value of a field to an empty string '', not Null?

I tried to set a field value of a feature to an empty string '' via WFS, but I didn't find a way to make it happen. I use the WFS protocol to send to Geoserver. I tried the following three methods: 1. ...
  • 33
3 votes
2 answers
254 views

Replace all but coordinates from a WKT string, including closing bracket ')'

To get a list of coordinates from a polygon and remove unwanted parts from the resulting string, the following expression works fine to remove the string elements 'Polygon', spaces and opening ...
  • 55.3k
4 votes
4 answers
253 views

Extracting number with letter from the address string in QGIS [closed]

I have the following address examples to extract: 4A MANOR FARM CLOSE 38A OXFORD ROAD 56A BISHOPSTONE and after using the following codes: regexp_substr( "Address L2", '(\\d*) ' ) or ...
  • 3,773
6 votes
1 answer
85 views

Extracting part of string from two columns at once in QGIS

I would like to extract numbers from two columns at once because I have the situation you see below. regexp_substr(regexp_substr("Address L1", '(\\d*) ')("Address L2"), '(\\d*)') ...
  • 3,773
7 votes
3 answers
475 views

Extracting two last characters (numbers) doesn't work properly in QGIS

I have the string CBG/FON/BCK-STO/A1/FDJ10 and I would like to extract the 2 last numbers (sometimes one, sometimes three). I found some hint here: Splitting string (the last digits) in QGIS but it ...
  • 3,773
4 votes
2 answers
468 views

Replace using regular expression in QGIS: how to mask a dot (point)?

In QGIS, I have a string with the pattern (1 character)(1 character)(dot)(number with 1 or more digits). How can I use regexp_replace() to get the number only? I tried regexp_replace('ab.27',('(\\D\\D(...
  • 55.3k
-2 votes
1 answer
147 views

Separating characters using Python Parser of Field Calculator in ArcMap [closed]

How can I separate the characters of a string, for example, three by three with slash letters or dashes and insert them in the Attribute table in ArcMap? abc-def-gh a100-b200-c300
  • 1
4 votes
1 answer
178 views

Retrieve values seperated by comma's in QGIS column

What is the simplest way to retrieve each value to a new column from a string with values separated by commas in QGIS? My data look kind of like this: STRING ----------- wp1,wp2,wp3 but I want ...
2 votes
2 answers
224 views

QGIS select by expression based on different elements concatenated inside a string

Using the field filter or advanced filter expression in the attribute table of QGIS, I want to select features that have values in the first three levels and exclude features that values other than ...
  • 345
7 votes
4 answers
465 views

Labelling with first letter taken from each word in string using QGIS

I have a field called "Species" which is composed by two words (e.g. 'Robinia pseudoacacia') and I would like to extract the first letter of both the words in order to get two letters (e.g. '...
0 votes
2 answers
581 views

Extract numbers from mixed string (numbers & text) in QGIS

In QGIS 3.18. There are several similar questions such as this one which do not address my exact problem. I have an attribute of comma-concatenated values containing text and numbers. I would like to ...
  • 1,031
3 votes
1 answer
903 views

Removing part of string from the right in QGIS

I am trying to remove the last piece of my string in QGIS. I want to delete the E10 from the end. I tried both: How to easily edit attribute data using Regular Expressions? regexp_replace("UPRN&...
  • 3,773
2 votes
1 answer
105 views

Getting percentage of string values for point layer within polygons of another one

I have two layers. One with polygons of areas of a city. Another one - with points corresponding to buildings. In point layer there is a field with the names of management companies of that buildings. ...
  • 515
4 votes
2 answers
243 views

Inserting words from field into new column in QGIS

Is there any good expression to extract the first word of a field and put it into a new column? I would like to create a new column without the numeric values and filter out words that are doubled. ...
  • 275
3 votes
1 answer
397 views

Counting elements in comma-separated string in attribute table in QGIS

One of my column in an attribute table in QGIS is separated by comma (shown by column "N") and I wanted to count elements in it. The column is a text field string.
  • 87
4 votes
3 answers
443 views

Splitting string with dates by '/'-character and getting ancient/latest date as new column in QGIS

I have dates separated by '/' character in column "date" in format RRMMDD as on the screenshot below: I want to separate dates into another columns "date_from", "date_to"...
  • 51
2 votes
1 answer
253 views

QGIS 3 batch processing - INPUT value not correct when autofill

I want to batch process with Clip function (also problem with any other). I have several input layers. I would like to autofill the output Clipped parameter with name of the input feature and _clipped ...
  • 187
3 votes
2 answers
250 views

Compare strings, extract unique values from one (QGIS)

In QGIS 3.18. I am looking for a field calculator expression able to return the values of a string (comma separated) in Field B which are not* also values of a string in Field A. For example: Field ...
  • 1,031
6 votes
2 answers
557 views

Removing duplicates from string in QGIS

In QGIS 3.18 in a shapefile attribute table, I have some fields with concatenated values (with commas , as the delimiter). Some of the values are duplicate, and I would like to remove them. For ...
  • 1,031
0 votes
1 answer
273 views

Inserting space into string using ArcMap Field Calculator

I am using ArcMap 10.7.1. I want to insert a space into a string between specific parts of the string using Field Calculator: !FIELD! .replace("F'target", "F 'target") Neither 'F' ...
  • 590
6 votes
2 answers
249 views

Extracting number from address string using QGIS

I have a table with addresses and I need to extract only the number from the attributes. The format is as follows: address VALLEY VIEW HOUSE, 36 HIGH VIEW, USHAW MOOR, DH7 7QQ 35 HIGH VIEW, USHAW ...
  • 101
1 vote
0 answers
442 views

PyQGIS 'str' object has no attribute 'fields' [closed]

I'm trying to write my first Python script from template in QGIS. I want to delete all fields except specific ones. Therefore I create a list to fill it with all the field names except the specific ...
  • 11
0 votes
0 answers
64 views

How to input a string (or any type) value to a field for multiple feature layers at once

I work in ArcMap 10.8.1. I added fields to all of my feature layers using Batch Add Field tool. Now I'm trying to find a way to enter values into those fields. Values are identical for each field. My ...
  • 173
1 vote
2 answers
38 views

Changing strings with no decimals to have .0 at the end

I have a points layer with a "Name" column. The "Name" values are strings and similar to 'X501', 'X501.1', and 'X501.2'. I need to change any values like 'X501' to 'X501.0' and ...
0 votes
1 answer
567 views

What VBScript can I use to populate a field with text using the ArcGIS field calculator?

I need to populate one field in the attribute table of a File Geodatabase with text. Every entry in the field is set to a Null value and text entry isn't conditional upon any other factor. Every entry ...
  • 103

1
2 3 4 5