You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically the title, but in our use case, we want to allow users to also send Route objects (b-m-r), in the current implementation these are automatically converted to LineString elements.
changed the title [-]QUESTION: Why are CoT types other then Point are overriden?[/-][+]QUESTION: Why are CoT types other then Point get overriden?[/+]on Apr 21, 2025
Yuval Bubnovsky (@YuvalBubnovsky) When parsing the raw CoT message, the original message is retained in CoT.raw as a 1:1 JSON representation of the COT message.
I'm assuming you are referring to the output of the to_geojson() functionality?
If so, then yes, the b-m-r messages are converted to LineStrings as although it is a lossy conversion from a metadata perspective, it is a necessary one for renderers that need a GeoJSON input file for UI interactions.
There is no necessity to use the to_geojson function and you could handle these manually by checking the type of the COT message and not calling to_geojson and instead handling the route object manually.
If however you are seeing the route converted to GeoJSON outside of the to_geojson function please give me a little more detail about what exactly you are calling and what the expected behavior is.
Nick (@ingalls) I'm calling the from_geojson() function, our application presents the users with the ability to create GeoJSON LineString.
When exporting our GeoJSON data to a TAK system, I want to present that LineString as a TAK Route object (b-m-r) while adding the appropriate properties (for example: whether it's walking/driving)
In short, I'd just like to be able to pass a GeoJSON LineString with additional properties and have it turned into the apropriate Route TAK object
For many of the fields we have 1:1 conversion between GeoJSON and TAK COT (IE Video Tags), but the route info isn't something we have focused on so we added MVP support for getting Routes INTO geojson for rendering on a map.
I'd love to make support more complete here and if you could provide a couple of XML COT examples of routes and the properties you are most interested in supporting bidirectionally between COT <=> GeoJSON we can probably get a PR that expands our current Route support with a more complete set of COT Route properties.
For the Route object itself, the properties can probably still be a 1:1 mapping from the existing GeoJSON properties (uid, type, time, stale, stroke, color etc.), I also note that the entire Route's callsign is controled within <contact callsign>
For each Route Waypoint I I'd like to be able to control it's callsign and coordinates
I would also like to be able to define the following properties:
planningmethod
method
type = In this example, it says On Foot, there are also variations for driving/flying
direction = Infil/Exfil
routeType = Primary/Secondary
My second example includes a Route which also has control points (b-m-p-c):
The issue I currently have is that I don't have a straightforward way to encode properties alongside internal points and remain valid GeoJSON.
The only way I can think of is to either use a GeoJSON FeatureCollection within a FeatureCollection to store these points:
IE:
{
"type": "FeatureCollection",
"features": [
<Feature: With LineString of entire route>
<Feature of Waypoint with waypoint specific features>
]
}
OR run parallel arrays of some kind in the properties?
{
"type': "Feature",
"properties": {
"route": {
"route-specific-keys": "Value",
"more-route-specific-keys": "Value",
"links": [ each link object is 1:1 with the number of coordinates in the geometry ]
}
},
"geometry": {
"type": "LineString",
"coordinates": [[ coords ], [ more coords], etc ]
}
}
If the above seems reasonable I can update the schema with this parsing. I'd probably lean towards using parallel arrays but the user must then keep the order & number of the coordinates identical and in the same element positions as the links array
I did the same thing at mapbox for encoding street numbers on a MultiPoint, it works but just doesn't quite feel right.
Nick (@ingalls) Hello, apologies for late reply again,
I deleted my previous comment suggesting to use some sort of a Collection within a Collection - but after spending some time trying to make it work on my fork, I conclude that although not ideal, the solution of having parallel array between links and coordinates is probably the way to go..
I have started by expanding the definition on features.ts:
So you have already implemented some handling for the links..
I would love some extra guidance on how to proceed from this point, forcing the type to be b-m-r here will mean that every GeoJson LineString is going to be converted into a TAK Route, which I'm not sure is the correct way to go about this
Would love to get some feedback and take it away from here as this is something I'd definitely like to be implemented.
Hey Yuval Bubnovsky (@YuvalBubnovsky) Let me sketch this out in a PR and get a feel for. I agree that the parallel construction at this point is probably a necessary evil. I'll have something hopefully today but if not by next monday to play with.
Hey Nick (@ingalls), just checking in kindly 🙏
Wanted to see if you had a chance to sketch out the PR you mentioned - I know you're probably juggling a lot, but I’d love to help move this forward if there's anything I can do. Appreciate all the work you're doing 🙂
OK v13.1.0 starts to sketch out better Route support. Initially it allows you to specify the feature.properties.type = "b-m-r" and then will treat the conversion of a GeoJSON LineString into a Route type.
I'm leaving this ticket open as the other properties will still need mapping on the incoming GeoJSON
During my testing, all coordinates were succusefuly recognized by my Android ATAK app, but only the edge ones had attribute data assosicated with them (default values), the other coordinates in-between could be "upgraded" to hold said data by interacting with them.
I'm assuming this is some default behaviour not related to your implementation.
Looking forward to be able to set Link Attributes based on GeoJSON data!
Activity
[-]QUESTION: Why are CoT types other then Point are overriden?[/-][+]QUESTION: Why are CoT types other then Point get overriden?[/+]ingalls commentedon Apr 21, 2025
Yuval Bubnovsky (@YuvalBubnovsky) When parsing the raw CoT message, the original message is retained in
CoT.rawas a 1:1 JSON representation of the COT message.I'm assuming you are referring to the output of the
to_geojson()functionality?If so, then yes, the
b-m-rmessages are converted to LineStrings as although it is a lossy conversion from a metadata perspective, it is a necessary one for renderers that need a GeoJSON input file for UI interactions.There is no necessity to use the
to_geojsonfunction and you could handle these manually by checking the type of the COT message and not callingto_geojsonand instead handling the route object manually.If however you are seeing the route converted to GeoJSON outside of the
to_geojsonfunction please give me a little more detail about what exactly you are calling and what the expected behavior is.YuvalBubnovsky commentedon Apr 21, 2025
Nick (@ingalls) I'm calling the
from_geojson()function, our application presents the users with the ability to create GeoJSON LineString.When exporting our GeoJSON data to a TAK system, I want to present that LineString as a TAK Route object (
b-m-r) while adding the appropriate properties (for example: whether it's walking/driving)In short, I'd just like to be able to pass a GeoJSON LineString with additional properties and have it turned into the apropriate Route TAK object
ingalls commentedon Apr 21, 2025
Yuval Bubnovsky (@YuvalBubnovsky) Gotcha! So the GeoJSON definition that node-cot uses internally is an opinionated one in that it's something that State of Colorado - DFPC - Center of Excellence (@dfpc-coe) created for bi-directional support of features from our rendering engine to the underlying COT that gets passed to clients/TAK Server.
For many of the fields we have 1:1 conversion between GeoJSON and TAK COT (IE Video Tags), but the route info isn't something we have focused on so we added MVP support for getting Routes INTO geojson for rendering on a map.
I'd love to make support more complete here and if you could provide a couple of XML COT examples of routes and the properties you are most interested in supporting bidirectionally between COT <=> GeoJSON we can probably get a PR that expands our current Route support with a more complete set of COT Route properties.
YuvalBubnovsky commentedon Apr 22, 2025
Nick (@ingalls)
Let's use this Route XML as an example, it's a Route (
b-m-r) object containing two Route Waypoints (b-m-p-w)For the Route object itself, the properties can probably still be a 1:1 mapping from the existing GeoJSON properties (uid, type, time, stale, stroke, color etc.), I also note that the entire Route's callsign is controled within
<contact callsign>For each Route Waypoint I I'd like to be able to control it's callsign and coordinates
I would also like to be able to define the following properties:
planningmethodmethodtype= In this example, it saysOn Foot, there are also variations for driving/flyingdirection= Infil/ExfilrouteType= Primary/SecondaryMy second example includes a Route which also has control points (
b-m-p-c):For these waypoints, the ability to set the already existing properties would be greatly appreciated (callsign, type, coordinates)
Let me know if you need any further data here.
ingalls commentedon Apr 23, 2025
Yuval Bubnovsky (@YuvalBubnovsky) This is perfect and is jogging my memory as to why I didn't fully implement the route format.
The issue I currently have is that I don't have a straightforward way to encode properties alongside internal points and remain valid GeoJSON.
The only way I can think of is to either use a GeoJSON FeatureCollection within a FeatureCollection to store these points:
IE:
OR run parallel arrays of some kind in the properties?
If the above seems reasonable I can update the schema with this parsing. I'd probably lean towards using parallel arrays but the user must then keep the order & number of the coordinates identical and in the same element positions as the
linksarrayI did the same thing at mapbox for encoding street numbers on a MultiPoint, it works but just doesn't quite feel right.
YuvalBubnovsky commentedon Jun 12, 2025
Nick (@ingalls) Hello, apologies for late reply again,
I deleted my previous comment suggesting to use some sort of a Collection within a Collection - but after spending some time trying to make it work on my fork, I conclude that although not ideal, the solution of having parallel array between links and coordinates is probably the way to go..
I have started by expanding the definition on
features.ts:I noticed in the
from_geojson()function the case forLineStringis:So you have already implemented some handling for the links..
I would love some extra guidance on how to proceed from this point, forcing the type to be
b-m-rhere will mean that every GeoJsonLineStringis going to be converted into a TAKRoute, which I'm not sure is the correct way to go about thisWould love to get some feedback and take it away from here as this is something I'd definitely like to be implemented.
ingalls commentedon Jun 12, 2025
Hey Yuval Bubnovsky (@YuvalBubnovsky) Let me sketch this out in a PR and get a feel for. I agree that the parallel construction at this point is probably a necessary evil. I'll have something hopefully today but if not by next monday to play with.
YuvalBubnovsky commentedon Jun 24, 2025
Hey Nick (@ingalls), just checking in kindly 🙏
Wanted to see if you had a chance to sketch out the PR you mentioned - I know you're probably juggling a lot, but I’d love to help move this forward if there's anything I can do. Appreciate all the work you're doing 🙂
ingalls commentedon Jun 25, 2025
Hey working on this today, sorry got into the weeds dealing with Media Streaming
ingalls commentedon Jun 26, 2025
Starting to sketch this out here: #82
[-]QUESTION: Why are CoT types other then Point get overriden?[/-][+]Route Support[/+][-]Route Support[/-][+]Increased Route Support[/+]ingalls commentedon Jun 26, 2025
OK
v13.1.0starts to sketch out better Route support. Initially it allows you to specify thefeature.properties.type = "b-m-r"and then will treat the conversion of a GeoJSON LineString into a Route type.I'm leaving this ticket open as the other properties will still need mapping on the incoming GeoJSON
YuvalBubnovsky commentedon Jun 26, 2025
Nick (@ingalls) Sketch looks great, I'll upgrade the version and start to see how it looks on my end
YuvalBubnovsky commentedon Jun 30, 2025
Hey Nick (@ingalls) , had the chance to play around a bit with the new Route support (converting LineString GeoJSON to Route).
I noticed that the following segment sets all coordinates passed as
b-m-p-c(this code is fromparser.ts)During my testing, all coordinates were succusefuly recognized by my Android ATAK app, but only the edge ones had attribute data assosicated with them (default values), the other coordinates in-between could be "upgraded" to hold said data by interacting with them.
I'm assuming this is some default behaviour not related to your implementation.
Looking forward to be able to set Link Attributes based on GeoJSON data!