Questions tagged [string]

A sequence of characters.

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

TerraClimate: Error generating chart: Data column(s) for axis #0 cannot be of type string

I am using "TerraClimate: Monthly Climate and Climatic Water Balance for Global Terrestrial Surfaces, University of Idaho" dataset... When I try my code, I have this error message Error ...
0
votes
0answers
11 views

Creating a new band with String Values

I need to create an Image with a Geometry Feature Property which is a String so that I can map an ImageCollection with that property. I tried reduceToVectors but the output vector doesn't have the ...
2
votes
1answer
76 views

FME: how to replace a character at a specific index?

Suppose I've a string foo, How can I change the 3rd character (identified by its index) ? The Ruby equivalent would be # Define the variable string and assign the value 'bar' string = 'foo' #=&...
0
votes
1answer
17 views

Bounding Areas using Feature Collection values (RESOLVE Ecoregions 2017)

I'm pretty new to the Earth Engine and have been working through some of the tutorials to familiarize myself with it. I have very little code experience. What I am trying to accomplish is creating a ...
2
votes
1answer
60 views

Changing number of decimal places of a String variable within a Vector Layer using PyQGIS

I have earthquake data and within the data, there are magnitude, longitude and latitude values. However, these values have around 6/7 decimal places but I would like to only have 2 decimal places for ...
7
votes
2answers
194 views

What is the maximum number of characters for a label in QGIS 3?

I am trying to determine the maximum number of characters for a label in QGIS 3. I am at over 1,000 characters and it does not display. Is there another way to display text on a map with a large ...
7
votes
2answers
254 views

Deleting any characters after certain character in QGIS label expression

I have a shapefile with attribute values like this: C834 K9 L523;L553 W2,T48 I want to display only the characters before certain characters, for example ; and , : C834 K9 L523 W2 How to achieve ...
5
votes
1answer
139 views

How to use label maximum line length for word wrapping in QGIS 3

I am confused on how to use the maximum line length for word wrapping a label in QGIS 3. The dialog and documentation show an option to "Wrap lines to" and then allow selecting "Maximum ...
3
votes
2answers
272 views

Cannot convert '#value!" to double

I am trying to convert a string to a numerical format by creating a new field. I get an error message saying "Cannot convert '#VALUE!' to double." What does this mean?
1
vote
2answers
115 views

QGIS: Comparing attribute values from different layers with Expression string builder

I want to compare attribute values from different attributes from multiple layers in the Expression string builder in QGIS (3.16.1) in of these layers, but I don't know how to do that. I've tried out ...
7
votes
1answer
68 views

Convert a list to string in QGIS

I have edited a field into the attribute form of a QGIS project as a "Value Relation" to create a checkbox where I can choose few possibilities. I have a tree sickness and the field I am ...
0
votes
0answers
28 views

Text to date field conversion

in QGIS I created a point layer with a field which was initially set as text. For each feature, I wrote in that field a date: "yy.mm.dd". I then modified the field to "date" with a ...
1
vote
1answer
30 views

Selecting features by characters contained in a text string

Is there a way to select the features of a map by finding text within an attribute table? For example, if several features are listed as "Nature preserve" under a column called "...
3
votes
2answers
161 views

Converting PyQt5.QtCore.QVariant to string

I am using QGIS with the in-built Python console. I want to replace some values in a shapefile with some other values. But when I try to change the attribute values, I get an error about the data ...
3
votes
1answer
44 views

Selecting in expression features with line break

I'm trying to filter features in a QGIS layer to those with the following in their "description" attribute. <td>CC_W</td> <td>3</td> I think what I need is ...
3
votes
1answer
65 views

Splitting string into “alphabetic” or “numeric” in QGIS 3.10.1

What are the right functions and formulas with the field calculator to delete "alphabet" or "number" inside a field? Let me be clear. I want to be able to delete "alphabetic ...
2
votes
1answer
97 views

Creating new column based on parts of strings in another column in QGIS

I have a column with zoning names (with "subzones" like UV036, UMTs2 etc.) and would like to create a new column with the general zone instead (UV instead of UV036, UMT instead of UMTs2... ...
2
votes
1answer
21 views

Problem in storing splitted strings in attribute table

I want to split strings of column 'Text' and save them in column 'Text_edit'. So far the split and storing the new values in a new column works. However as can be seen in the attached figure, only the ...
2
votes
1answer
98 views

Concatenating part of string and sorting it using QGIS

I'd like to know how to concatenate part of a string and sort it. For example, i have a FIELD1 (string) and i should have the numbers of the string separated with ';' in the FIELD2. Only the numbers ...
6
votes
2answers
194 views

Removing two letters only if they appear at end of a field in QGIS labels

I am trying to remove the letters 'a' and 'o' only if they appear at the end of the field 'name' while labeling. For example, I'm working with names like: Ontario, Manitoba, Alberta, Quebec, Nova ...
-1
votes
1answer
86 views

How do you add user variables to custom python functions in QGIS Function Editor?

How do you add user input variables to a Custom Function created in Python in QGIS3.x. I found the below piece of code but need to modify it to control the string to split by and the index value to ...
4
votes
2answers
312 views

Count number of times matching string appears in another column (similar to Excel COUNTIF)

Which function can I use to count the number of times a string for a row in column "LeaseName" matches another row's string for "LeaseName"? For example, Row 1 is 'HADLEY #9' and I want to know the ...
1
vote
2answers
783 views

How to get current date “YYYY-MM-DD” in string format in GEE script

I tried to get current "YYYY-MM-DD" in Google Earth Engine script. I succeeded to get current "YYYY-MM-DD" in "Date" format in GEE script. But I want to convert it to String format for setting as a ...
1
vote
1answer
46 views

Dissolve ArcGIS Pro Python doesn't take string variable for field list

I try to dissolve layer having multiple fields statistics calculated. I prepared a string variable which has all the information in it. When I paste printed variable into dissolve it works. However I'...
2
votes
1answer
71 views

Proj string issue

Could anyone explain why the target in this proj string is not correct? $ projinfo -s EPSG:4326 -t '+proj=gnom +lat_0=61.39107201212929 +lon_0=-58.56360634793518' -o PROJ target CRS string is not ...
5
votes
2answers
359 views

Find lower/upper case letters in QGIS

Is there a possibility to find lower and/or upper case letters in QGIS? I know that it is possible to convert all lower to upper: upper('hello WOrld') → 'HELLO WORLD' and all upper case to lower: ...
0
votes
0answers
106 views

Rasterize: Best way to burn string values into raster (string to real) (QGIS)

I have to rasterize a polygon layer. Unfortunately the values of the field I have to burn into the raster has a variety of string entry's like "L239x" or "a403" (case sensitive!). RAT (Raster ...
9
votes
4answers
798 views

Counting the occurrence of a specific letter within a string (QGIS)?

I have a field which contains a series of words separated by commas. I am wondering if it is possible to count the number of times the letter 'G' occurs. Alternatively it might be possible to split ...
2
votes
1answer
26 views

ArcPy .replace Field Calculator - replace only standalone 0's with 111, not all instances of 0

I've searched on google intensively, must be missing something here: I only want to replace (in a string field) standalone zeros (len is 1 character), but the .replace function replaces all instances ...
2
votes
0answers
57 views

Complex parametrized string to export gpkg in Python [closed]

I'm trying to write a Python script that does a process (in this case a buffer) iteratively. The input layer is always the same but, in each iteration, the name of the output file must change and It ...
1
vote
1answer
32 views

Why does Arcpy CalculateField alter string being written to string field?

I have a "Model_Version" field in my feature class that is being used for record keeping. I do not intend to ever do any numeric operations with it, so I am storing it as a string field. Right now ...
0
votes
0answers
265 views

ValueError: could not convert string to float: 'x_degree'

I want to create a decimal degree (dd) field from degree minute seconds (DMS) as a script tool. The CSV looks like this. My code looks like this: import arcpy inTable = arcpy.GetParameterAsText(...
0
votes
1answer
223 views

Adding spaces in string using Python parser of ArcMap field calculator

I am using ArcGIS Desktop 10.6. I have a integer field [no_lot] which contains values in the following format: '3 546 777' I need to transfer the data into a text field for joining purposes. I ...
0
votes
0answers
49 views

Using gdal_translate with a high number of gcp

I've a CSV file witch describes the coordinates of each pixels in a image, it is structured like this: xcoord,ycoord,row,col 716657.6518375501,4784215.095395751,0,0 716657.6915582813,4784215....
0
votes
1answer
110 views

Slicing all values in field using arcpy.da.UpdateCursor

I have a folder with a (3) shapefiles. Each shp. has a field titled "country" with a country name. I've already set my desired workspace correctly and everything else in my script works for what I ...
2
votes
0answers
77 views

QGIS3 python: right(QTextStream) - getting unexpected type ' str'

I have a field type double that I need to reduce from 9 digits to 8 ie 123456789 -> 23456789. If I do it as an integer I loose leading zeros ie 10002345 -> 2345. I am attempting to use refactor fields ...
3
votes
2answers
120 views

Omitting certain style string labels in QGIS 3 rule-based labeling

I’m labeling airport taxiways. The taxiway labels are all strings but they tend to be one of three varieties and I would only like to show one of those. I’ve been trying to mess around with Rule-Based ...
4
votes
1answer
93 views

Evaluate string in field calculator QGIS

Is there any way to evaluate a string as an expression in QGIS. For example, I want to evaluate the string in Column 'hukg' as an expression.
0
votes
3answers
561 views

Concatenating list of strings using ArcPy?

My code from Returning strings showing all vertices from all polygons in shapefile using ArcPy? creates is the following: import arcpy fc=r'D:\GIS Data\TOOLS\EV calc in Python\Data.gdb\PolyWGS842' ...
2
votes
1answer
206 views

Returning strings showing all vertices from all polygons in shapefile using ArcPy?

I want to have a string showing all vertices from all polygons in a shapefile. In my example below my code lists all vertices and the first column shows the polygon they are part of (I only have 2 in ...
0
votes
1answer
6k views

Python3 Replace “/” With “\” [closed]

I want to import several spatial csv files (points) into QGIS. The path to the folder, where the csv files are located is stored in the variable "Folder_Path". The file names are stored in a list. It ...
2
votes
0answers
42 views

Receiving strange characters from GPS tracker, is this HEX or binary?

I am struggling with a GSM GPS tracker. It looks like a clone of GT02A, and it is a relatively common model. My problem is that when it sends data to my server, it is not readable. I set it to send ...
2
votes
0answers
165 views

Conversion to_string provides NULL in QGIS

I've been trying to convert a decimal row into a string row using a few methods. Below is my CSV file: also, note that csv header has been updated too, State;AverageRainfall;ProbabilityBelow;...
2
votes
1answer
101 views

Inserting string without ' ' in QGIS modeler?

QGIS 3.4.7 I have a lot of Models where there are some string inputs. In all of them, I have to enter the string between quotation marks ''. I understand the meaning and pourpose of them in any ...
0
votes
1answer
1k views

Editing list of strings using Google Earth Engine?

I'm trying to edit string elements in a list object. I need to get a list of IDs of a image collection, and then replace the orbit row to another (in this case, 073 to 074). I'm new to GEE and got ...
2
votes
1answer
33 views

Running IDW, but values are '<1' not 0.934 so they are Strings not Doubles

I am trying to use some interpolation tools for analytical data of concentrations of Benzene for monitoring wells. A decent amount of our values for Benzene are '<1' (not 0.943 or 0.345) because of ...
2
votes
0answers
35 views

Long string field for Atlas in QGIS [closed]

In QGIS 3.4 I need a long string field to store one description (2000 characters) for each point. The project is based on *.shp files however they manage only 254. I need to compile lots of formats ...
1
vote
2answers
149 views

Using the Expression String Builder to ultilise specific data within an attribute table

I have an issue relating to the 'Expression String Builder'. I have a series of data over a 8 year period. I need to collect that data for only a 5 year period. Once collected I need to find the ...
2
votes
3answers
218 views

Batch rename MODIS data?

I have MOD13Q1 NDVI images. Data are named in this format: MOD13Q1.A2007049.h26v06.006.2015161224938_MODIS_Grid_16DAY_250m_500m_VI.tif (YYYYDDD) Here 2007 is a year and 049 is day in year. I ...
1
vote
0answers
115 views

String slicing in ArcMap dynamic text element

Is it possible to slice a string in ArcMap's HTML-like dynamic text elements? I've got a string field "Code" with contents like 'A.3.5', I need to extract the number in the middle ('3' in this case). ...