Select to view content in your preferred language

Get Field Value with Data Type Coordinate System

148
2
2 weeks ago
Labels (1)
ChadR
by
Emerging Contributor

In ArcGIS Pro model builder there is a utility named Get Field Value.  The parameters of the tool are an Input Table, a Field (Column Name), and Data Type.  You can choose from a long list of data types.  One of the data types is "Coordinate System", and this is the one I'm having trouble with.  What I'm trying to do is iterate through a table and for each record in the table, I want the Get Field Value to read a coordinate system I will have stored in the table, in a column named [Coor_Sys].  Once it gets the field value, I want to use that as a variable in a later tool (Create Feature Dataset).  Here is what I don't know...  What EXACTLY should be stored in the [Coor_Sys] column for a downstream tool to recognize the variable as a coordinate system?

Should the contents of the [Coor_Sys] column be text like this:

WGS 1984

NAD 1983 (2011) StatePlane Georgia East FIPS 1001 (US Feet)

OR

Should the contents of the [Coor_Sys] column be a number like this:

4326 (the WKID of WGS 1984)

6445 (the WKID of GA East StatePlane)

OR

Should it be something else?

 

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

The example here

Using the spatial reference class—ArcGIS Pro | Documentation

uses the factory code

but you can create the spatial reference using methods/properties in that class

SpatialReference—ArcGIS Pro | Documentation


... sort of retired...
ChadR
by
Emerging Contributor

I found that if I had an integer type field and I populated it with the coordinate system number such as 4326, I could use the Get Field Value utility in model builder with the data type listed as "Coordinate System" to create a coordinate system variable.  The variable was successfully used in the Create Feature Dataset tool.  However, when I put the whole process behind an iterator, the variable would not update as expected and was stuck on whatever the first coordinate system it read in.  Thanks Dan... Your information helped me figure out the first part of my problem!

0 Kudos