I NEED PUT THE COORDINATE AND THE WORD : NOMBRE, LIKE: 57485.258 NOMBRE
Solved! Go to Solution.
POINT_X and POINT_Y are both numeric type fields. You will need to add two new fields of String type in order to concatenate the word NOMBRE to it.
Add two new string type field, naming them as you wish.
Then in the field calculator you can copy and paste the following for each of the new fields:
str(!POINT_X!)+' '+'NOMBRE'
str(!POINT_Y!)+' '+'NOMBRE'
This casts the value of each variable to a string and then puts a space between the value and NOMBRE. You may need to set the format of the POINT_X and POINT_Y fields to the number of decimal places you want to display.
POINT_X and POINT_Y are both numeric type fields. You will need to add two new fields of String type in order to concatenate the word NOMBRE to it.
Add two new string type field, naming them as you wish.
Then in the field calculator you can copy and paste the following for each of the new fields:
str(!POINT_X!)+' '+'NOMBRE'
str(!POINT_Y!)+' '+'NOMBRE'
This casts the value of each variable to a string and then puts a space between the value and NOMBRE. You may need to set the format of the POINT_X and POINT_Y fields to the number of decimal places you want to display.
thanks for your fast and effective answer
To avoid whether you need cast things to strings, learn the python "format" mini-language. It can all be done on 1 line and is even more powerful than its sibling the f-string.
"{}
"{} {}".format('a string', 1) # ---- implicit order
'a string 1'
"{1} {0}".format('a string', 1) # ---- explicit order
'1 a string'
"{}{}{}".format('stuff', " in between "*3, ['a, b', 1, 2.0]) # ---- it can do anything
"stuff in between in between in between ['a, b', 1, 2.0]"
Very good, it´s working. Thanks
Armando Freites, please mark one of the responses as Correct to close out your question. If multiple people gave you good answers, pick the one that helped the most and mark it correct while marking the others as helpful.
Ok ok