Does anybody have any ideas in Arcade or Python on how to calc the Unique ID field, like is shown below? The two points connected by the line have the same Unique ID....
As Johannes said, your question isn't quite clear.
If you're generating the points from lines you could:
- use the Feature Vertices to Points tool which will generate a feature class of points that contain the original FID of the line they came from.
- If you have an existing table of points that you want to keep you could then do a spatial join between the table from the tool and your original points and field calculate the original FID into it.
- Or take the point table generated from the line feature class in the tool and Calculate Geometry attributes for the coordinates.
As a second option you could make a point class from your table and then do a spatial join with the lines and field calc the id into it.
If you have no line feature class, this is just a table and the points are listed in pairs, then use the python script Johannes posted above to assign an ID to each set of points.
I'm not really sure what your question is...
# UniqueID = get_id() # Code Block i = 0 is_second = True def get_id(): global i global is_second is_second = not is_second if not is_second: i += 1 return i
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.