We changed our privacy policy. Read more.

Questions tagged [field-mapping]

The relationship between from fields and to fields when performing append, merge or similar operations indicating how fields will be populated in the result dataset.

Filter by
Sorted by
Tagged with
3
votes
1answer
40 views

Copying Object ID from an online layer to offline one using Feature class to Feature class conversion (ArcGIS Pro)

I have an online feature class "A" with a field "OBJECT ID". I am using Feature Class to Feature Class conversion to create a copy in my local Geodatabase. While doing so I ...
2
votes
2answers
56 views

Trying to use fieldmap to append external featureclass/shapefile to new featureclass using external table for mapping

I am trying to work out a way to populate a series of shape files into a new set of Datasets and feature classes. I have an external table of what the destination feature class field name should be ...
-2
votes
1answer
76 views

SQL statement (where_clause) does not work for UpdateCursor syntax but same works for SearchCursor syntax

feature class fc1 (daily data) and feature class fc2 (geodatabase) both have unique_id field which will be used to map Col1 rows in fc1 to update corresponding Col2 rows (not all rows) in fc2. Below ...
0
votes
0answers
82 views

Issue importing CSV with CSVT (fields format not applied - QGIS 3.18)

I'm trying to import a CSV file with some data and hoping that QGIS will properly format the fields type but so far no luck. I have my data in a file called coords.csv and I made a single line text ...
0
votes
1answer
32 views

What is the field_map_name in findFieldMapIndex ()?

I am using ArcPy with ArcGIS Pro and FieldMappings. FieldMappings are fiddly and I'm struggling to understand a specific function. I need to replace an 'old' fieldMap with a 'new' fieldMap. FieldMaps ...
0
votes
1answer
23 views

arcpy.FieldMappings renames input fields internally

I'm trying to make use of Field mappings to merge many datasets into a new one... as per the manual. ... print (type(idealFieldList)) # class 'list' # let's prune the fluff ...
0
votes
0answers
25 views

Converting ArcPy fieldmap to pandas dataframe

I want to get a "snapshot" of a fieldMapping / FieldMap. How do I convert it to a pandas dataframe? My current approach is to fieldList = arcpy.ListFields(theFeatureClass) extracted = [] ...
0
votes
0answers
12 views

csv to feature classes not yet geospaced

Use case: preparing features for collector/fieldmaps for recording existing underground irrigation. Optimally my field tech would be able to go to a customer's house, see the customer is has[item ...
-2
votes
1answer
81 views

Reducing number of lines / more efficient coding method for field maps [closed]

I am looking for ways to reduce the number of lines when making field maps in ArcPy (note, I am using ArcPy with ArcMap 10.6). I cannot seem to figure out a way, and am stuck with a significant amount ...
0
votes
1answer
31 views

ArcMap 'Add Locations' field mappings not showing added field for network analyst layer

I have successfully created a new field 'Status' in the incidents sublayer of a closest-facility network analyst layer, using the 'Add Field to Analysis Layer' tool. However, when I try to populate ...
0
votes
0answers
12 views

Spatial join with field mappings yields zero value when inputs are layers made from feature classes

this might be more of a bug report than a question, but I encountered this strange behavior in ArcPy and was wondering if anyone else has experienced the same issue. Summary: I was trying to perform a ...
1
vote
1answer
50 views

Performing a spatial join to obtain attribute field summaries of nested polygons that are located within polygon regions using ArcPy

I have created an ArcPy script tool that finds depressions from an input DEM, and then generates closed contours (both polyline and polygon outputs) as well as regions (raster and polygon outputs). I ...
2
votes
1answer
153 views

Adding input field to field map using ArcPy gives RuntimeError

I'm a Python beginner and I would like to export a csv from a feature class, including only some fields. I'm trying to do it using the field mapping control, but I'm doing something wrong because I ...
0
votes
1answer
61 views

ArcPy script doesn't work for TRIM function

I have this code: import arcpy import os def massiveTrim (vrb): y=r"shape path" for i in y: campos = arcpy.ListFields(vrb, "", "String" ) for camp in campos: ...
0
votes
0answers
295 views

QGIS field calculator: Subtracting values from specific fields

I am trying to create an Isopach map of two subsurface formations. If a well has the two formations in question, then I would like a new layer with the data created so I can contour the points. I ...
-3
votes
1answer
104 views

Importing map found on the Internet to QGIS [closed]

I am new to QGIS and I have learned some of the basics. Now, I have found a Soil Map of Germany I want to work with on the internet. My tasks now are as follows. To reduce the size of the map with ...
-1
votes
1answer
50 views

ReAsked - Why is manipulating field map schemas inconsistent (ArcGIS)? [duplicate]

I've got a knotty problem which I am trying to solve in a very methodical and deliberate step by step process, to ensure that non-technical colleagues are able to verify the content every step of the ...
1
vote
1answer
43 views

Select Issues with Converting Feature Class to Shapefile with only certain fields

This is not a copy of previous questions like Selecting certain fields from feature class to create new feature class in ArcPy? but builds on them. I have two approaches and two different issues. ...
1
vote
1answer
150 views

Field mapping features to different feature with different field names using ArcPy

I was trying to you this instead of field mapping because field mapping is hard to understand. outfc = r'\\water.com\Blank.gdb\SewerCollection\ssLateralLine' infc = r'\\water.com\Test.gdb\...
0
votes
1answer
175 views

Applying field mapping during Merge using ArcPy

I am trying to merge 10 stream feature classes together using arcpy. But I need to limit the number of fields in the output (all feature classes share the same fields). working_dir = r"C:\Projects\...
1
vote
1answer
85 views

How to specify fields to use in a merge

I am using arcpy to merge multiple feature classes from a list of feature classes. They all have the same fields. Let's say they all have the fields = ['CO_FIPS', 'MILES', 'FLOOD_ZONE', 'VALID', '...
3
votes
1answer
103 views

Defining fields to keep and deleting all other fields in feature class using ArcPy?

I am trying to write a script to read a feature class, list all fields and keep only specic ones. I.e. drop all remaining columns. I guess that pseudo code should be: allFields = create list of all ...
1
vote
0answers
142 views

Field Mappings control doesn't show the Add Input Field in the context menu of a Python Toolbox

I’m trying to build a Python Toolbox which uses a Field Mappings control (GPFieldMapping parameter). For some reason I don’t manage to get the same behaviour of the Field Mappings control as in the ...
1
vote
0answers
81 views

Are feature ids in QGIS and ArcMap stored differently?

I have a shapefile that I use as a layer in ArcMap. Opening the attribute table, shows a fid starting with 0 for the features. If I attach the same shapefile in QGIS and open the attribute table, the ...
3
votes
2answers
1k views

Understanding and using fieldmapping with ArcPy?

I'm having trouble trying to understand how fieldmapping works in ArcPy (I'm kinda new to Python). In the below example, I want to take a shapefile and append it to a feature class. But I want to use ...
0
votes
0answers
67 views

Fieldmapping for mean and max using arcpy

I'm trying to spatial join two features. One polygon layer and one point layer. The point layer contains one field of values that I want the Mean and Min of. Im trying to use the fieldmaper object to ...
2
votes
1answer
555 views

Creating Field Mapping Parameter in Arcpy Script

I'm trying to create a tool that compares two data sets. I do not want the Feature Compare tool. Most of the field names in the two data sets are the same, but not all. I want a way to map one field ...
2
votes
1answer
217 views

Using ArcPy FieldMappings?

This is a follow up to Output field name not showing up in spatial join result in which I received no response. I am trying to convert a shapefile to a feature class, I also have a GeoJSON file with ...
0
votes
0answers
70 views

Calculating field after arcpy.Append_management()?

I have some AutoCAD layers (f.e. Cad1, Cad2) and I want to export them into feature class in a geodatabase (f.e. feature_class). Also I want to calculate field in "feature_class" for objects from CAD. ...
0
votes
1answer
382 views

MultiValue Selection with MultiValue Input

I made this Python Toolbox as a practice run for a larger project I want to do as I am new to python toolboxes. While this was successful I am not able to the result that I want. I want to be able to ...
1
vote
1answer
82 views

Merging on specific fields

Lets say I have three shapefiles/features I want to merge: 'florida.shp', 'mississipi.shp' and 'louisiana.shp'. They all have 3 standard fields common to all: 'DFIRMID', 'SFX', and 'FIRMPAN'. I want ...
-1
votes
2answers
289 views

Field mappings remove field from arcpyTable to Table conversion

I want to export a table but would like to remove one of the fields before doing so using arcpy. I'm trying to use field mappings but am missing something: fields = arcpy.ListFields("some_table") ...
0
votes
0answers
149 views

Passing attributes from join features to target features in 'SpatialJoin_analysis'?

I'm doing a spatial join between two polygon data sets (A and B). B polygons are always smaller than A polygons and there's only a small number of them. They have 2 attributes that I'd like to pass on ...
1
vote
0answers
309 views

Renaming ESRI default SHAPE_Length and SHAPE_Area fields [closed]

I have been working on a draft feature class that will eventually go into our production database, and I just tested it against my organization's standards, but it fails because the "SHAPE_Length" and ...
2
votes
1answer
205 views

Cannot assign output field name to FieldMap

In attempting to map input fields to output fields, I am finding that I cannot correctly assign the output field name. Running the script produces no errors, but for a given FieldMap object, the ...
2
votes
1answer
49 views

Merging many different feature classes into one but only taking certain fields from each?

I'm trying to merge ~50 feature classes into 1. The problem is, these feature classes have many different fields, and some that i don't want in the final FC. I can delete the fields one by one ...
1
vote
1answer
114 views

How to bring over only 2 fields from the join feature class when using "SpatialJoin_analysis" and set up a merge rule?

I'm trying to understand how to use FieldMap and FieldMappings. I know very little about objects plus I'm finding the explanations on ESRI website not very good and far from comprehensive. All I'm ...
4
votes
1answer
224 views

What does "Do you want to reset the field mapping" mean in QGIS Refactor Fields dialog?

I want to convert the type of some fields in a vector layer from String to Real. I am trying to use the Processing -> QGIS geoalgorithms -> Vector table tools -> Refactor fields tool to do this. When ...
3
votes
4answers
2k views

Using Field Mapping with TableToTable_conversion in arcpy

I am importing csv files into a gdb, and need to change a couple field types during the import. I am trying to use the field mapping in TableToTable_conversion to change the field type as the table ...
3
votes
1answer
96 views

Split a vector into parallel grids [duplicate]

I have a piece of land (vector) with, for example, potatoes and I want to make a grid for spraying. That means i need a grid with size 45mx10m with different values per box. Important is that the grid ...
6
votes
1answer
407 views

Using Polygon or Multipolygon for mapping fields in QGIS?

I'm trying to map medieval field systems in QGIS, this means that I'll be drawing quite a few polygons. I've mapped quite a few fields already using Spatialite layers using polygons, though I was ...
2
votes
1answer
291 views

Making model in ModelBuilder output fields based on user input shapefile and not shapefile used to build model?

I made a model with which I would like to process various shapefiles that have different fields. I built it using a test shapefile that had its own fields. When I try running another shapefile ...
5
votes
1answer
774 views

Resources for Arcpy Field Mappings String Syntax

I need to edit an existing python script to add an additional field to a field mapping function. This field mapping function does NOT use the arcpy field mapping object--it instead uses a structured ...
0
votes
2answers
447 views

ArcPy ERROR 000800 AlterField_management

I made some adjustments to existing code, and now there seems to be a glitch down the line in an area where no adjustments were made. My initial goal was to ensure the correct data types are shown ...
2
votes
1answer
214 views

Select all fields from table and use with arcpy.DeleteIdentical_management()?

I would like to use arcpy.DeleteIdentical_management() function without having to specify all fields in the table. Is there a keyword used to select all field in a table? I tried "*" or "ALL" but ...
3
votes
1answer
2k views

How to directly add new fields at the right position with PyQGIS?

I have an existing Attribute Table. I add new fields with PyQGIS but I would like to set this fields at the second and third position and, not at the end. Because by default, the new field is added at ...
2
votes
0answers
1k views

Using arcpy.FieldMappings() to load data into tables

I have been tasked with bringing in a dataset from one table with a hard and fast schema into another table with the same. Both tables have very similar fields, but the names and capitalization are ...
1
vote
2answers
131 views

Ignore Fields in Target Table When using FieldMapping in Append Tool

I am transforming one feature class into another (currently empty) feature class. The input feature class and output feature class share the same fields, but the output feature class has some ...
2
votes
0answers
179 views

Field Mapping in Custom ArcMap Script

I'm writing a script which takes, for its first two parameters, feature classes (or tables). For the third parameter, I want to provide the user with a field mapping option similar to what ArcMap uses ...
1
vote
0answers
377 views

Get field name of shapefile geometry for using GeoDjango LayerMapping

I want to use LayerMapping to insert any shapefile to PostGIS. I insert the geometry only, into generic tables. For that i need a mapping between the shapefile field names and the django models field ...