Questions tagged [string]

A sequence of characters.

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

Local Coordinates Transform to CRS string

I am fairly new to coordinate system transformation, so I am rather lost on the following case. I intend to process LIDAR data into LAS files and usually use global coordinates. this case uses local ...
1
vote
1answer
28 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
36 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
64 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
35 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
38 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
43 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
48 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
56 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
84 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
175 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
360 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
30 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
66 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
49 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 ...
2
votes
1answer
27 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
27 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
61 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
149 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
60 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
147 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
50 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
86 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
61 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
140 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
425 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 ...
5
votes
2answers
2k 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
106 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
41 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
2answers
3k 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
3answers
89 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
627 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
282 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
238 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
523 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
98 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
2k 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
147 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
837 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
44 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
51 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
232 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
56 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 ...
1
vote
1answer
377 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
1k 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
340 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
167 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
2k 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
3k 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 ...
2
votes
1answer
101 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 ...