I am building a model to fetch tables with point data from a folder and make lines. Each file contains one week of AIS (Automatic Identification System) data, i.e. shipping data.
The attribute table of the points contain the following fields
For making the lines I am using a publicly available script called TrackBuilder. The attribute table of the lines look like this:
The problem is that the field "shipType" is missing. I would like to modify the script (see attachment) to get that field in the lines attribute table.
I thought I could add a join to the model but I didn't succeed.
As you see above, the TrackBuilder script doesn't output a feature dataset that I can use to join it with the point table and get the "shipType".
Any ideas on how to modify the script or alternative solutions are welcome!
You need a field in each table which contains a common identifier if you are trying to do an attribute join.
Alternately, are you wanting to a join by spatial location? Spatial Join—Help | ArcGIS for Desktop
yes, the join can be made with the mmsi field. I just want to make a attribute join, not spatial join.
The problem is that the result of the TrackBuilder script goes directly to the geodatabase. There is no output green "bubble"
You'll need to use the Make Feature Layer tool against your target table (i.e. the table where you want to see the join). The Join tool's first input must be a layer type as joins and selections can only be applied to layer objects.
Make Feature Layer
If you look at the Add Join tool you'll see that the first parameter is "in_layer_or_view".
that would solve the problem if the script "TrackBuilder" had an output with which I could do the join. But, as you see, nothing comes out of it. The result FC goes directly to the geodatabase
To me this seems to be an issue with that script, how to edit it so that it outputs something to make the join with?
I am trying an alternative solution here