Questions tagged [fields-attributes]

Fields, also known as attributes, contain information about features.

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

Select by attribute not working [closed]

I created a point shapefile by converting a raster into points. The default fields generated were FID, Shape, POINT_ID, and GRID_CODE. I added two new fields "X_location" and "Y_location". I ...
2
votes
2answers
387 views

SQL Query not selecting all points that it should?

I am working on a map of 60+ monitoring wells and I plotted them through an excel data sheet and a few tools. In that data sheet, I have Benzene concentrations associated with almost each point. I ...
0
votes
1answer
46 views

Expression returning wrong value in QGIS Field Calculator?

My QGIS Field Calculator expression: case when "field_value" = '' or "field_value" <> NULL then (if( "field_value" = '', 'N', 'Y')) end returns null value even if "field_value" has something ...
1
vote
0answers
20 views

Controlling field names with arcpy.Combine?

If I run the arcpy.Combine command as such: result = arcpy.Combine(["CDL/raster07", "NHD/raster07", "OtherRaster"]) The resulting raster has an attribute table with fields [f.name for f in arcpy....
1
vote
0answers
37 views

Determine the most frequent value for an attribute based on another attribute [closed]

I need to determine the most frequent value of one attribute based on another. For example: Field 1 Field 2 Cat Tabby Cat White Cat White Dog Brown Dog ...
3
votes
1answer
46 views

Isolating and exporting specific sections of a shapefile in QGIS?

If I have a shapefile layer in QGIS showing the spatial boundaries of subsections of a larger area (e.g. counties within a state, or countries within a continent), how would I selectively crop out one ...
3
votes
1answer
188 views

Dissolve (merge) polygons QGIS based on attribute values only when are adjacent

I am a fairly new user of QGIS having a question regarding dissolve functionality. I am working with the NUTS-2 shapefiles provided by EU, which I have imported in QGIS. I have created a new layer ...
2
votes
1answer
97 views

Dissolve (merge) polygons QGIS based on (non exact) attribute values

I am a fairly new user of QGIS having a question regarding dissolve functionality. I am working with the NUTS-2 shapefiles provided by EU, which I have imported in QGIS. To ease the discussion, I ...
1
vote
0answers
29 views

How to get the TEXT from a layers attributes to display on my map [duplicate]

I'm totally new with GIS software, so I apologize if this is a question that's already been answered! I'm working with the Texas Landgrid. It's composed of Leagues, Labors, Blocks, Townships, ...
0
votes
0answers
42 views

Attributes missing from geodatabase in QGIS

I have been trying to load a gdb file into QGIS, but one of the layers do not show the attributes mentioned in the metadata. The data can be downloaded here. https://pubs.er.usgs.gov/publication/...
0
votes
0answers
78 views

Writing only one of the input vector fields to output vector using Fiona/ Python?

I'm working on a function to perform operations on folders of vector files. These files might have differing attribute fields but there will be a common field between them. I'm using fiona in python ...
1
vote
0answers
82 views

QGIS 3, Expression to address ranges in the symbology [closed]

I noticed many new entries in the list of expressions in the QGIS3-Version. Is there an expression that I can use to address the symbology of a Layer? It would be of particular interest to get the ...
1
vote
1answer
111 views

Creating points with attributes from coordinates in ArcPy

I know how to create points by coordinates with arcpy using the following code: import arcpy ptList =[[20.000,43.000],[25.500, 45.085],[26.574, 46.025], [28.131, 48.124]] pt = arcpy.Point() ptGeoms =...
3
votes
1answer
19 views

Calculate a field using text from another field separated with comma

I have an address field containing the following text: "64,ramkoti,hyderabad,500070" I need to copy hyderabad to another field. What would be the code used in the field calculator tool to achieve ...
3
votes
0answers
317 views

Extract derived data fields from Shapefiles

I've uploaded shapefiles with professionally supplied survey data into QGIS and it all plots fine, then when I export the attributes table into Excel I see that the XYZ values are all zeros. I know ...
2
votes
1answer
86 views

Unable to select interpolation attributes from my shapefile?

My point shapefile has four fields, three of which are numerical: longitude, latitude, and homicides. However, the homicides field does not appear for me to select it as an interpolation attribute (...
3
votes
1answer
190 views

Getting field type in ArcPy?

I've got back into Python after a long break. I'm creating a simple data validation script at the moment. I am just trying to return the field type of a field input by the user. I'm using arcpy....
1
vote
0answers
20 views

QGIS 2.12 How can I assign the attributes of the polygons of the layer A containing the geometry of layer B?

In other words, I have two shapefiles: Layer A: not-intersected Areas (1 attribute: ID); Layer B: Buildings (Several attributes). I want to identified by the related ID attribute all the buildings ...
0
votes
0answers
12 views

Attribute table QGIS [duplicate]

I have a attribute table with different columns. I have to add one more column and then copy paste the values from a different column, but both columns are in the same table attribute. How can I do ...
2
votes
1answer
247 views

Populating new field in shapefile with values from list?

I'm looking to populate a newly created field in a shapefile that from a list using basic python and osgeo tools. The values are integers and in a python list that is the length of the number of ...
0
votes
1answer
119 views

arcpy.da.SearchCursor storing data in a list with a query

I am currently working with a database that hold street names, x and y coordinates and many more fields. I would like, through a search cursor, to store the x,y coordinates in a separate list for ...
2
votes
1answer
875 views

How to create a polygon from a data CSV file with coordinates using QGIS? [duplicate]

Having the following information in a CSV file: I want to build a polygon with all the points where the Group name is the same. For example I want to join all the points where the group is T101 and ...
2
votes
1answer
1k views

QGIS 3: How to rename attribute/field names for Geopackage Layer

Issue: I need to rename several attributes/fields in a geopackage layer. How to do this? Linked Issue: there are numerous pages on how to rename the attributes/fields of a shapefile. However there do ...
2
votes
2answers
47 views

Selecting features of a shapefile using attributes of another shapefile

A newbie here trying to learn QGIS for work. How can I select specific features of a polyline with the same values as the attributes of the buffer polygons I generated? I have a layer of polylines ...
2
votes
2answers
291 views

How to permanently change attribute values using PyQGIS?

I'm trying to iterate through all the features of a layer to change the value of some of its attributes. I'm using the following code: from qgis.core import * import os working_folder = r'C:\...
1
vote
0answers
169 views

How to set a default attribute value based on the feature being created

This question expands on, and updates for QGIS 3, the answers found here. I have a layer with attributes called "Name" and "Label". I would like to set to default value of "Label" to be the same as ...
0
votes
0answers
31 views

field information lost when importing geojson file into qgis

I have an attribute in the geojson file which contains a list of elements (usually 3). The attribute has 700-1000 characters. I learned that for shape files, qgis can only have fields with less than ...
1
vote
3answers
66 views

Deleting blank fields in multiple shapefiles in folder using ArcPy?

I have some shapefiles and each shapefile is having some blank or zero value fields. My task is to delete blank/zero value fields for all shapefiles in the folder. I have searched for solution in ...
0
votes
3answers
120 views

Using ArcPy to ListFields inside SearchCursor?

The current code I have simply lists ALL fields in the feature class and seems to ignore my logic of if row[0] is not None: Why does it do this? fields = arcpy.ListFields('\\\\Bvweb104draco\\e\\...
4
votes
2answers
136 views

Running arcpy.AlterField_management 2,000 times takes too long?

I am trying to replace field names of a table stored in a file geodatabase using a dictionary as a lookup table. My field names got cut off from the Tabulate Area tool (Tabulate Area Truncates Field ...
1
vote
0answers
74 views

Select Feature Based on Iterate Row Value in ModelBuilder

I have a table showing commuting trips from home to work. home_id represents home and work_id represents work. Now I want to step through the trips table using Iterate Row Selection in ModelBuilder, ...
0
votes
1answer
74 views

Field Value shapefile - Add values

I have a shapefile that contains three lines. I want to add a specific numeric id to the field "line_id" and a string id to the field "border_id". Basically, for the first line, I want to add the ...
0
votes
1answer
138 views

Fill the color of polygons with some attribute value using ArcGIS

I have a large set of polygon features where I need to add some attribute value in "Name" field. Because it is a large set of polygons I want to have all polygons where I have add the value to be ...
2
votes
1answer
106 views

LiDAR data in GPS time, only in second. Missing week?

I have LiDAR data LiDAR Data captured, unsure what units or format this time field is in? which I learned that my LiDAR data is in GPS second, however I do not have a column of data which shows the ...
3
votes
1answer
67 views

LiDAR Data captured, unsure what units or format this time field is in?

I haven't been able to figure out or find out from searching around what units or format this time field is in my LiDAR data that was collected?
0
votes
1answer
153 views

Limited field type options QGIS 3.4

I'd like to add a 'Decimal Number (double)' field to an attribute table, however, this option seems to be missing when I go to add a field. I have looked at some videos for adding fields in QGIS and ...
1
vote
3answers
220 views

Making one field/values equal to another field/values

I have created a new field called "SFX" in a shapefile called "myshape.shp": input = r"C:\files\myshape.shp" arcpy.AddField_management(input, "SFX", "TEXT", field_length=100) There is now a field ...
0
votes
0answers
51 views

Adding field to middle of attribute table using ArcPy? [duplicate]

When executing the add field command in arcpy it always appends the field at the end of an attribute table. Can someone help me write a code where a field can be inserted in the middle of an ...
3
votes
3answers
332 views

Changing field types so graduated symbols are available

I can't seem to make graduated symbols work. When I try to click on my column it doesn't show any options. I think these is due to those columns being formatted as text and not number. Any ideas how ...
0
votes
1answer
64 views

Reclassify with attribute

So, I don't really know how to word what I want to ask, but I took a DEM file and did used the raster calculator to select a certain elevation range. After that I reclassified it to separate it into ...
0
votes
1answer
79 views

Run model from script

This is my script where I am trying to use selectby_attribute within a model, based on a field, F*. There are 6 fields, so I want 6 derived layers. Then I am going to use bearing and distance tool ...
3
votes
1answer
702 views

Defining fields and adding features to output layer using QGIS?

I have two input vector layers (one point and one line layer). I loop through every feature in the input-line-layer and calculate some things (with help of the point layer). What I am trying to do ...
2
votes
1answer
428 views

KeyError when trying to set attribute in QGIS?

I have two input vector layers and I want to create an Output vector layer by doing some calculations. But somehow, the setAttribute method does not work. In QGIS 2.18, I was able to set an attribute ...
1
vote
1answer
102 views

Creating polygon from lines, using the lines' attributes?

I'm trying to transform lines into polygons with the attributes. The lines are from a dwg file. I tried to use "feature to polygons" but doesn't preserve the attribute. I tries to transform lines to ...
0
votes
1answer
27 views

IndexError when adding multiple fields to shapefile

As part of a larger project i'm looking to add multiple fields to a shapefile using an index. This is the snippet in question: listFields = [['ITEM', 'TEXT'], ['SYSTEM', 'TEXT'], ['WATERCOURCE_BANK', ...
1
vote
0answers
248 views

QGIS3: How to set an attribute value?

I have written a python script which has one output line-vector layer. The python script should calculate some value and then the script should set the attribute (with that value) of a newFeature (...
1
vote
2answers
895 views

Getting field index from input vector layer in PyQGIS?

I am very new to QGIS3 and I am currently trying to convert a python script from QGIS 2.18 to QGIS 3. Therefore, I am trying to integrate my python script into the template from underdark -> see here ...
0
votes
1answer
278 views

Extract Raster to Multiple Rasters by List of Values in R?

I'd like to use the Raster package in R to process a single DEM. I'd like to use a pre-determined list of elevation values to extract multiple raster datasets from this DEM. Not all values are of ...
0
votes
1answer
270 views

How to handle A column was specified that does not exist exception. and still put a value where the column should be

ArcGIS 10.4 I have a python (arcpy) script that is pulling values from a input list of fields for every featureclass in a geaodatabase (gdb) using a SearchCursor and is putting those values in a csv. ...
1
vote
2answers
446 views

Attribute constraints

Is there, with QGIS 3.x, any way to restrict the data added to a specific field of a GeoPackage layer? I want to restrict the data in a field of an attribute table with something like that: 2letters(...

1 2 3 4 5 23