0
votes
0answers
56 views

How to keep all the unique columns of the shapefiles after merge?

Writing a script where the user is asked to select a directory which contains Folder_1 and Folder_2, both containing shapefiles and run various algorithms. The basic logical process of the script is: ...
0
votes
2answers
46 views

How to show attribute table in the form

Is there any way to show the attribute table of a layer in a QtextBrowser or a QtableView on form? I did this but,(shows attribute table in a separate dialog) I have no idea, how to show it in my ...
1
vote
2answers
60 views

Edit Field Value of Feature Class Using Python in ArcGIS 10.2

I have a feature class whose attribute table looks like this: Latitude | Longitude | Area For the area column, all rows are null. I would like to put in a specific value for all rows using Python. ...
0
votes
1answer
47 views

Change Attirbute Name (Fiona)

I have a shapefile that has 2 attributes named "X" and "Y". I want to change this to "Lon" and "Lat". My (limited) experience tells me that I should read in the original shapefile, preserve the ...
0
votes
0answers
55 views

PyQgis: How can I “append” features to a Vector Layer instead of “stacking” them?

As I read data from a text file and add points to a QgsVectorLayer (as well as related attributes), each new record gets 'stacked' on top of the previous one in the Attribute Table (and within the ...
1
vote
2answers
146 views

Autoincrementing Python Script is over writing all fields versus just fields that are null

Using ArcMap and the Field Calculator I have a python script that should autoincrement the FacilityID field if it is null. It works the first time through but the second run causes it to overwrite ...
4
votes
1answer
501 views

Finding duplicate records in a field via Python in field calculator

im looking for duplicate records in dbf files based upon the attribute called 'ID'. I have various dbf files from 500,000 records to 1.5 million and I know there are a host of duplicates. I would ...
1
vote
2answers
70 views

How to transfer multi attributes in to features?

i have 2 feature classes, i want to transfer all attributes by one click to another attribute feature class, i have used Spatial Adjustment tools, but the challenge with me is to, how to transfer all ...
2
votes
1answer
219 views

How to make autoIncrement number start with (001…009, 011…099)?

i have a challenge with my time in my work, i have feature class called "Parcel" storing many data, i generated an autoIncrement number by using field calculator, in field "parcel code" Expression: ...
0
votes
1answer
36 views

How to Add Field Between Two Existing Field in Shapefile

Can you please let me know if it is possible to add a new Field between two existing field using ArcPy? For Example if I have "Name", "Area", fiels already in my shapefile can I add a new field called ...
0
votes
1answer
45 views

How to store both fixed and variable attributes as a feature class?

I have a live data feeds as an XML file from the Internet. I need to use Python and ArcPy lib to store each feed as a point feature in a feature class of an ArcSDE datbase. The xml looks like: ...
0
votes
0answers
125 views

Change field attribute in one column based on Domain value from another field using Field Calculator

When I am editing a feature class, I want to automatically populate another field base on one column in the table. Here are the fields and data I am working with. Proj_Code, Proj_Name DA, Dawn Lake ...
5
votes
0answers
51 views

Altering the order of attributes in a table [duplicate]

I have gone through a sequence of table joins. The resultant table should be with the attributes rearranged in more logical order. I cannot find this functionality within Arc GIS or any mention of it ...
1
vote
1answer
216 views

remove whitespace Python code results in odd character - Field Calculator

I need to remove whitespace from the end of a string in a field in ArcMap. I tried first the VBA function RTrim, but whitespace still remained. I thought maybe the whitespaces were tabs, so I tried ...
3
votes
1answer
1k views

How to edit attribute tables using Python/ArcPy?

I am new to Python, so sorry for such a trivial question. There is a shapefile (let's call it Structures.shp) and the script I'm writing needs to update the value of only one record in only one field ...
7
votes
2answers
939 views

How to Refresh open attribute table in ArcMap using ArcPy rather than ArcObjects?

I am running the Calculate Field GP tool from the arcpy in ArcMap. When a row value is updated, it does not show up untill I use the Reload Cache tool (Table Options > Reload Cache). How do I refresh ...
0
votes
0answers
241 views

Select record from table attributes in QGIS and Python

Can anyone tell how I can access to the attribute table of a shp and select a record from a specific row and column using Python (with console or a script). I've been looking for in the qgis API, but ...
8
votes
1answer
458 views

Fastest methods for modifying attribute tables with Python?

A while ago, I wrote a quick Python function for converting an attribute table to a python dictionary, where the key is taken from a user-specified unique ID field (typically the OID field). ...
2
votes
1answer
156 views

Updating and inserting a field within the same loop

I am working with an empty feature class where I am writing a script to create polylines within the featureclass and attach an associated text value with the polyline. I am using a for loop as noted ...
1
vote
0answers
222 views

Morphometric and hydrological analysis with Python and ArcGIS

How can I write a program using python, that calculates some morphometric and drainage indexes using numeric attributes in the attribute table with ArcGIS? The data I have in my table are area and ...
4
votes
1answer
134 views

convert a dbf into a raster image using python? work around for arcpy

ArcGIS' arcpy does not have a function to add a table to a layout. I was thinking that maybe taking that table (e.g. a dbf), there may be some python script command to turn it into a raster (e.g. do ...
4
votes
1answer
566 views

How to write values from arcpy statistical output to table?

The attached script is my stalled attempt to perform the following workflow: Create a table and create fields Loop through a folder of point shapefiles and perform average nearest neighbor analysis ...
2
votes
3answers
970 views

Creating new shapefile based on its attributes with python

I have a shapefile which has an attribute year. I used to generally copy and paste these features in the dataframe and then using the definition query just show polygons which were established before ...
2
votes
1answer
331 views

How do I select * rows of multiple columns in one query using Select by Attributes within ArcMap?

I am trying to convert a psql query string into arcpy formatting for an UpdateCursor where expression parameter: '''SELECT ...
8
votes
2answers
545 views

Python, GDAL and building raster attribute tables

I have an integer raster for which I would like to build a raster attribute table using Python and GDAL. I can create a GDAL raster attribute table in Python as follows: >>> rat = ...
1
vote
1answer
2k views

ArcGIS 10.0 \ arcpy - CalculateField_management : help with syntax for updating text in attribute table of feature classes

I am trying to add (ie "Author", "LastUpdated") to feature classes within a gdb and then populate each of those fields. I have been able to get my code to run properly for the numerical field but I ...
5
votes
1answer
250 views

Python/GDAL get unique values in discrete-valued raster

I would like to get some advice on the most efficient way to return a list of unique values of a discrete-valued raster using Python and GDAL. I had thought that the most obvious way would be to ...
0
votes
2answers
709 views

How to auto populate multiple fields in attribute table?

i have Feature Class Buildings, it has many fields like ...
6
votes
1answer
4k views

How to add automate values to attribute field?

I have parcel, Buildings layers, without any information attribute table, and i want to replace "NULL" values with numbers form 1 to 2000, in "Parcel ID", or "Building ID" field thank you.
3
votes
1answer
887 views

Add multiple fields in attribute table

How do I add in multiple fields in the attribute table? In the attribute table I have crop types such as corn, cotton, sorghum....etc (as shown image below), in square meters. and I want to generate ...
1
vote
2answers
804 views

ArcGIS problem accessing fields attribute table

I encounter a strange problem. I have a simple shape file to which I added some fields and then populated them. Now I wanna access those fields from a script to run some buffer operations. I wanna ...
4
votes
5answers
510 views

Can a new point automatically be populated with data from the containing polygon

I need some help to create a script. Imagine that I'm using 3 shapes: 1 point and 2 polygons. When I create a new point I want it to assume some attributes of the polygons in which that point is ...
2
votes
1answer
478 views

Attribute Table Decimal Places

As we all know, the attribute table field properties has number format to display number of decimal places to up to maximum 15. If we have many fields/columns in attribute table, how can we change all ...
4
votes
1answer
3k views

How to add field in attribute table by python

I have research on the question (How to add an attribute field to an existing Shapefile via Python) but could not implement it. If you can give me examples on how to add field name in attribute ...