Hi All
I have a dataset of ship positions as a point feature class with:Vessel Name,UT Time at position, X and Y. I need to join the points to form lines representing each vessel's track. I have previously been using GME (SpatialEcology) to achieve this however I'd rather bring this into the desktop client to save some time.
If I use the "Points to Lines" Toolbox feature it connects all the points for each ship name. However if a ship leaves the dataset's extent and re-enters elsewhere then the track continues, possibly crossing the entire data extent. What I want to do is to specify that the lines are not joined if the difference in UT exceeds a specified time (say 30 minutes).
A quick way to do this would be to create a new attribute field as a "transit number" where the first number is 1 and when looping through the attributes if either the UT exceeds a certain amount or the ship name changes then the transit number adds 1 to 2. I can then use "Points to Lines" on the transit number to only connect where my criteria is met. Does anyone know how to achieve this in the field calculator? My coding experience isn't too great!
I can do this in Excel easily by calculating the time difference for each row and IF(UTDiff>30mins,RowAbove+1,RowAbove).
Example goal:
(Object-id: Vessel Name: UT: Transit Number)
1 Ship1 12:00 1
2 Ship1 12:10 1
3 Ship1 19:00 2
4 Ship1 19:10 2
5 Ship2 12:00 3
Thanks
Andrew (Using ArcGIS Desktop)
I have a dataset of ship positions as a point feature class with:Vessel Name,UT Time at position, X and Y. I need to join the points to form lines representing each vessel's track. I have previously been using GME (SpatialEcology) to achieve this however I'd rather bring this into the desktop client to save some time.
If I use the "Points to Lines" Toolbox feature it connects all the points for each ship name. However if a ship leaves the dataset's extent and re-enters elsewhere then the track continues, possibly crossing the entire data extent. What I want to do is to specify that the lines are not joined if the difference in UT exceeds a specified time (say 30 minutes).
A quick way to do this would be to create a new attribute field as a "transit number" where the first number is 1 and when looping through the attributes if either the UT exceeds a certain amount or the ship name changes then the transit number adds 1 to 2. I can then use "Points to Lines" on the transit number to only connect where my criteria is met. Does anyone know how to achieve this in the field calculator? My coding experience isn't too great!
I can do this in Excel easily by calculating the time difference for each row and IF(UTDiff>30mins,RowAbove+1,RowAbove).
Example goal:
(Object-id: Vessel Name: UT: Transit Number)
1 Ship1 12:00 1
2 Ship1 12:10 1
3 Ship1 19:00 2
4 Ship1 19:10 2
5 Ship2 12:00 3
Thanks
Andrew (Using ArcGIS Desktop)