Select to view content in your preferred language

Add Geometry as Text Options to 'Calculate Geometry Attributes' (WKT, WKB, GeoJSON)

2317
4
10-16-2020 07:30 AM
Status: Open
Labels (1)
ColeAndrews
Frequent Contributor

As mentioned here by Kory Kramer, ArcPy now has functions to calculate spatial objects as text, such as WKT and GeoJSON. Please add this to an out of the box GP tool-- I believe Calculate Geometry Attributes is the perfect place for it. 

Purpose: populate a text field with the string representation of valid geometric objects, with options including WKT, WKB, and GeoJSON.

Use case: Portability of GIS data. We need the ability to load a delimited csv of all tabular attributes of a feature class to data warehouses, including one text field containing the text representation of a spatial object. Once the csv is loaded to a data warehouse as a table, most of the database platforms can convert the geometry text to a spatial object using SQL functions like ST_FromText and TO_GEOGRAPHY.

4 Comments
JoshuaBixby

You got my vote, I think this it quite a good idea.

ColeAndrews

This is a relatively simple enhancement that would make this task much easier to work with, especially in model builder, so I requested it be logged as a formal enhancement. Here is the enhancement number:

Zartico-GIS

not sure if you are aware or not, but you can accomplish this by simply inputting "!shape.wkt!" into the python command a calculate field dialog.

ZarticoGIS_0-1677710538091.png

 

Bud
by

Somewhat related: