Hi,
I need to reduce WKT (Well Known Text) length.
The reduction is done by rounding/trunkating decimal places from 11 to 3 - default output for the script !shape.wkt! returns coordinate list with 11 decimal places (in a metric projected coordinate system).
I ran across a RegEx expression that might do the job, but it returns an error (arcGIS Pro 2.7 - python):
%Expression:
regex(!WKT!)
%Code Block:
import re
def regex(!WKT!):
return re.replace (!wkt!, '(\d+. \d{4}) \d+)', '\1')
I'm not experianced python user.
I'd be happy to get help with solution - it doesnt has to be this expression - any creativ/simple solution (in Field Calculator) is welcomed.
I attached a sample layer (FGDB).
Thanks in advance,