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
0 votes
0 answers
14 views

Contingent values in ArcGIS Online - Need to update domain value in field based on another field value

I am trying to build a very simple calculation (or so I believe it should be) in Field Maps. I want the field, we'll call it "Calculations", to populate either "Compliant" or "...
user avatar
0 votes
1 answer
98 views

Create a function that will return geodataframe

I have created the following function to take Origin = str, Destination = str, line = shapely.geometry.linestring.LineString, node = GeoDataFrame def create_lines_df(Origin, Destination, line_, nodes_)...
user avatar
0 votes
1 answer
100 views

Implementing FieldMapping parameter in ArcGIS Pro Python Toolbox tool to map fields in two tables

I am trying to create a tool within a Python Toolbox in ArcGIS Pro that will accept a table and a featureclass and allow a user to map the fields from the feature class to fields in the table. ...
user avatar
0 votes
1 answer
47 views

Service error code 1000

I am trying to use Esri Field Maps to conduct maintenance inspections of stormwater assets. I have multiple layers (i.e. catch basins, outfalls, ditches, etc) each related to a maintenance table ...
user avatar
  • 1
3 votes
1 answer
101 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 ...
user avatar
2 votes
2 answers
78 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 ...
user avatar
-2 votes
1 answer
86 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 ...
user avatar
0 votes
0 answers
145 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 ...
user avatar
0 votes
1 answer
54 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 ...
user avatar
  • 203
0 votes
1 answer
30 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 ...
user avatar
  • 203
-3 votes
1 answer
85 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 ...
user avatar
0 votes
1 answer
41 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 ...
user avatar
  • 11
1 vote
1 answer
74 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 ...
user avatar
  • 43
2 votes
1 answer
228 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 ...
user avatar
  • 115
0 votes
1 answer
92 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: ...
user avatar
0 votes
0 answers
430 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 ...
user avatar
  • 1
-3 votes
1 answer
256 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 ...
user avatar
-1 votes
1 answer
58 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 ...
user avatar
  • 203
1 vote
1 answer
54 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. ...
user avatar
1 vote
1 answer
225 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\...
user avatar
  • 53
0 votes
1 answer
289 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\...
user avatar
  • 1,659
1 vote
1 answer
122 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', '...
user avatar
  • 1,659
3 votes
1 answer
128 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 ...
user avatar
  • 3,226
1 vote
0 answers
164 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 ...
user avatar
1 vote
0 answers
102 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 ...
user avatar
  • 293
3 votes
2 answers
2k 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 ...
user avatar
0 votes
0 answers
85 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 ...
user avatar
  • 249
3 votes
1 answer
796 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 ...
user avatar
2 votes
1 answer
267 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 ...
user avatar
  • 3,282
0 votes
0 answers
76 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. ...
user avatar
  • 45
0 votes
1 answer
495 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 ...
user avatar
1 vote
1 answer
83 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 ...
user avatar
  • 1,659
-1 votes
2 answers
341 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") ...
user avatar
  • 1,405
0 votes
0 answers
165 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 ...
user avatar
1 vote
0 answers
364 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 ...
user avatar
  • 393
2 votes
1 answer
225 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 ...
user avatar
  • 31
2 votes
1 answer
52 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 ...
user avatar
1 vote
1 answer
122 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 ...
user avatar
4 votes
1 answer
268 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 ...
user avatar
  • 673
4 votes
4 answers
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 ...
user avatar
  • 127
3 votes
1 answer
101 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 ...
user avatar
6 votes
1 answer
635 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 ...
user avatar
2 votes
1 answer
355 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 ...
user avatar
5 votes
1 answer
886 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 ...
user avatar
  • 166
0 votes
2 answers
500 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 ...
user avatar
2 votes
1 answer
236 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 ...
user avatar
  • 41
5 votes
1 answer
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 ...
user avatar
  • 995
2 votes
0 answers
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 ...
user avatar
1 vote
2 answers
161 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 ...
user avatar
  • 693
2 votes
0 answers
192 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 ...
user avatar
  • 21