Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [string]

A sequence of characters.

1
vote
2answers
40 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
89 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
39 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). ...
1
vote
1answer
53 views

Creating drop-down list from dynamic field values in ModelBuilder?

I am trying to create a drop-down list containing all the values from a particular field, that I can use as an input for the Select by Attributes tool in ModelBuilder. The answer I’ve seen to ...
0
votes
1answer
29 views

Map.addLayer automation

As in the Hillshade Example, I wanted to automate adding all Layer from one Image for visual inspection. var band_names =Image.bandNames() print(ee.String(band_names.get(0))) for (var i = 0; i < ...
0
votes
1answer
40 views

.bandnames() as String

var bandname = ee.String(ee.ImageCollection.first().bandNames()) gets a print of: using ee.Image.regexpRename(bandname, new_name) or using var bandname = ee.String(bandname) results in : ...
0
votes
2answers
41 views

String Formatting;-Calling values from a dictionary to select by attribute in fc

New to python. In the code below, I create a dictionary b={} and wish to call keys to select by attribute. All goes well until I am required to format strings to come up with whereclause. I am ...
3
votes
2answers
79 views

FME geometry conversion from string?

I have an xlsx file that has incorrect X, Y location. Essentially the false northing is out 5000000 and there's no decimal point. As you can see in the image below the current file format is on the ...
1
vote
1answer
133 views

Selecting multiple values from a string in ArcMap?

I have a text field containing values like "1A,2P,13,17,22,34". I want to select the values that I need by a definition query of a layer. For a single value worked using LIKE and % but I need to ...
4
votes
2answers
670 views

How to extract a part of string from fields in QGIS field calculator?

I want to create a new field in my attribute table. My goal: returning all digits between the / and _ characters of the field named "location" by applying the next expression: regexp_substr( "Text", ...
0
votes
1answer
66 views

Dataset '{}' does not exist or is not supported in arcpy

I am trying to insert some variable into a simple arcpy call using .format(var1, var2) as I would in a string. I am new to using Python 3.6, so maybe there's been some change in how this is done. When ...
1
vote
1answer
36 views

Python Labelling in ArcGIS - Two Languages one string

I am trying to format a label in two languages in a way they appear on one line and not stacked in ArcGIS any ideas? Maplex Stacked label feature is not ticked so this does not help. This is how they ...
0
votes
0answers
18 views

Return records with specific numbers/characters on right most side of string using select by attributes [duplicate]

I have a field called TripID that I want to use the select by attributes to return all records within TripID that end in 01 and 02 only and leave the others. What code should I use to return these ...
0
votes
2answers
1k views

Changing string to integer using ArcGIS Field Calculator?

I have a table with two fields. One field (type short) is empty. One field (type string) is full of digits. There are no random characters in that field, just digits. I want to convert the string ...
3
votes
2answers
78 views

If any of B contains all of A, then count # of times A is in all of B

BACKGROUND: Long time reader, first time poster. Looking for help using QGIS to score data in a CSV table that was yielded from processing the contiguous neighbors of every polygon from a file with ...
1
vote
0answers
381 views

Edit Field Name In Attribute Table (QGIS 3) [duplicate]

This seems like such a simple task, yet after researching how to execute it in QGIS I've been unsuccessful. I'm merely trying to rename columns in my attribute table. My existing field is currently ...
2
votes
1answer
73 views

split attribute using ArcGIS Field Calculator

I have a long string in one attribute. I want to be able to extract a small portion of it into a new attribute. This is an example of the attribute: "< html xmlns:fo="http://www.w3.org/1999/XSL/...
0
votes
1answer
226 views

If-then-else Statements and string errors?

I'm defining a string field based on contents of another string field. Simply put, if the contents of field A contain this value, then fill field B with this text. It throws a string related error ...
1
vote
2answers
312 views

Comparing string values in field calculator

I am trying to compare the values of 2 fields in my attribute table and update a 3rd field as a result. In the field calculator I have CASE when (("Address") like ("COUNTYNAME" )) then 'Match' ...
0
votes
1answer
67 views

carto /cartocss : is there a function for “contains”?

I know how to set a specific color for a specific value (here specific_string) of a specific field (here field1) #mydataset[field1="specific_string"] { marker-fill: #000000; But what if I want to ...
1
vote
3answers
687 views

What is the limit to a column (field) title string in ArcMap?

Is the column heading limited to 10 characters? Is there a workaround besides changing the alias? I hear that QGIS does not have this issue. I downloaded shapefile data from https://egis-hud....
1
vote
0answers
104 views

Converting @layer_name tokens into Shapefile Attributes (Columns/Rows) using QGIS Expression Editor?

I'm a fairly novice Python user and I've been banging my head against this problem for a number of days now. Assumptions I've made: This is doable within QGIS, and does not need to be done ...
1
vote
0answers
510 views

Converting table asset data type from 'Long' to 'String'

I am attempting to generate 50 random points per land use class through Google Earth Engine. I have performed this operation before on an earlier instance, where the inputs were the following (1) ...
2
votes
1answer
35 views

Using Field Calculator to correct the nomenclature of APN values

I am currently working (in ArcMap 10.4) with two datasets that use different nomenclature for their assessor parcel numbers (APN) values. In one dataset the APN is a string dataset with the format "...
0
votes
0answers
39 views

File Geodatabase: storing text in an integer field?

I recently downloaded a FGDB from NOAA at https://marinecadastre.gov/ais/ The FGDB contains a point feature class with ship locations. One of its attribute fields, named [Status], is of type Long ...
0
votes
1answer
121 views

Iterating field name in UpdateCursor?

I have a series of fields to check for a certain value, then calculate other fields with using UpdateCursor. Fields are: SPECIES_CD_1, SPECIES_CD_2, etc.. up to SPECIES_CD_99 Here is the general ...
1
vote
0answers
52 views

Attribute table reformatting fields on programme close

I'm creating a density map using the graduated style in qgis. The data is created from the points in polygon tool, this is then saved as an integer (not sure why the plugin doesn't automatically do ...
0
votes
0answers
144 views

Add a string to a cell using graphical modeler

I want to add a new string to a shapefile using the Graphical Model Builder. This would then request a string input (Such as "Address line 1") then add this to the attribute table in the shapefile. ...
1
vote
1answer
240 views

Remove first character from a string if it satisfies an if statement [closed]

I have a bunch of phone numbers and some contain a 1 in front of them e.g. "18885556607" and I would like to simply remove the 1. I can't just remove all first characters because there are numbers ...
4
votes
2answers
750 views

Extracting only number from address in QGIS Attribute Table

I want to print only the number part of the address field. I tried to use the "field calculator" with "regexp_substr" to extract just the number (only string before the first space) but couldn't ...
1
vote
1answer
273 views

ArcGIS query “dash” character multiple times in a string & replace/remove dash

Using ArcMap 10.2.2 and have a string field in an attribute table that has values such as: xxxx-xxxx-x xxxx-xxxx-x xxxx-xxxx-x xxxx-xxxx xxxx-xxxx xxxx-xxxx I want to query for all records that have ...
5
votes
1answer
144 views

Test for (curly) brackets in expressions in QGIS 2.14.14 with strpos() weird results

When trying to find a strpos() of a substring containing curly brackets (or brackets anyway as far as I can see) I get 0 as a result. Test for substring without {} works fine: Test for substring ...
1
vote
1answer
963 views

Removing n first digits on a field attribute table using QGIS string functions

I'm looking for a QGIS function to remove the first n digits on a field attribute table using QGIS string function. For exemple I have the following string in a QGIS attribute table: 742-004-SRV ...
1
vote
2answers
2k views

How do I convert a STRING to a Real? [duplicate]

So I am trying to join some data I have (just numbers) to a map on QGIS. However it when I try to join the data to map it shows up as a string instead of a real. It's a just a normal exel file. I ...
3
votes
1answer
74 views

Populating new field based on existing string field using ArcGIS Field Calculator?

My programming is really rusty at this point, and I am trying to do a simple calculation using a Codeblock, either VB or Python is fine. I have tried about 50 different variations on same theme, and ...
1
vote
0answers
97 views

Moving substring from end to beginning of string

Disclaimer: I'm very new to QGIS and using expressions. I have a large data set that contains a time range (00:00-00:00) and 1-6 three-day abbreviations of days of the week (MON, TUE, WED, etc.). I ...
1
vote
1answer
109 views

How to fix Excel/Arcmap “data type mismatch” error?

I've had a polygon shapefile joined to an XLS file with no issue until today. Although the category of the column category is designated as "Number" in Excel, ArcMap recognizes the column as "String" ...
4
votes
4answers
121 views

Finding only records with numbers in a character string field?

I need to isolate those records containing numbers from a field with character string (it's a descriptive field). For example the string might be as follows: "A residential development of 12 no. ...
1
vote
1answer
238 views

Searching value in string and replacing it with double quotes in ArcPy?

Adds a new field Match_PINCODE Searches for a 6digit number in a string from Address field like "aaaaa,dsjfhdjfhd768543" set "Match_PINCODE" field with the 6digit row by row. Replaces 6digit number ...
2
votes
1answer
283 views

Using Field Calculator to assign consecutive letters for each feature?

I have a feature class generated in ModelBuilder using a transect script that contains multiple transects. Before moving on to further build the survey I would like to assign ID's to each feature in ...
10
votes
1answer
960 views

Obtaining specific part of string from field in QGIS attribute table?

I'm having a bit of trouble here with this situation. I want "NumeroCamp" only to have the numbers are showing in "Text". Is there any function in field calculator that could help me with that?
2
votes
2answers
359 views

Fixing address errors using Python Parser of ArcGIS Field Calculator?

I am working on a task that will calculate a field to fix errors stemming from the Standardize Addresses tool and human error with the input data. The script is below. I'm getting Error 000989 "...
0
votes
3answers
54 views

Stop srcipt working if more than one value are selected

I have a script tool which has string mulivalue paparameter with a filter list. For example in this case I want to stop script working after it detect that not only "AAA" parameter is selected but ...
1
vote
0answers
34 views

Why increasing decimal points not working for XY point features with sufficient precision length? [closed]

I am working with ArcMap 10.3.1 on a Lenovo ThinkPad (Windows 10). I want to display and copy x-y field values with more decimal positions (from 5 to 8; i.e. 34.3456 to 34.34561739), but after ...
2
votes
3answers
67 views

Query where one field includes the text string in another field

I am trying to query mailing address records that match physical address records, but the two fields sometimes have data in a different format. For example, the property's mailing address may be ...
2
votes
2answers
170 views

Stop script working after two specific values are selected

I have a script tool that runs after values from multivalue box are selected. The code is okay and runs withou any mistakes. But is it possible to make a kind of exception for selection of fields ...
4
votes
1answer
258 views

Decimal place in ArcGIS 10.3

In this attribute table, "DISTANCE" field name created with this python expression (in Field Claculator): str( !Shape_Leng! ) + !field_name! Everything works fine. But I seek a way to get on 1 ...
2
votes
1answer
105 views

String output as an input dataset variable

I have a model which creates topology with rules and validate itself. But I got used to working with layers in TOC and have a script in Calculate value tool that with a help of Parse path tool make a ...
2
votes
3answers
323 views

Sorting string column Qgis

I would like to order my field like "normal" but as this column is string it won't work. I got "Emplacement réservé 105";"Emplacement réservé 106"; .... before "Emplacement réservé 20". What should ...
1
vote
2answers
538 views

Loading CSV File with Data Labels

I am trying to upload a CSV file with Lat and Long data in it and there are two columns that are not numeric (see picture below). Whenever I try and upload the file, QGIS recognizes it as a string ...