Manipulate GeoJSON Data via Typescript Function in Palantir Foundry

67 Views Asked by At

I am building a map application in Palantir using the workshop module. I want transport routes along roads to appear based on user inputs. I can see how to display a route based on GeoJSON data, but is there a way I can manipulate the GeoJSON data via a typescript function triggered by a widget? Or is there another way of approaching this e.g. can road routes be displayed using a dataset that is more easy to manipulate?

Any help with this is is much appreciated.

1

There are 1 best solutions below

2
ZettaP On

You most likely need and want to use Geometry properties in the Ontology, to represents points, lines or geoshapes.

You can use Pipeline Builder to generate "routes" (where you can as well preview on a map directly) and sync that as an object with a "line" property which will follow a convention like

{ "type": "LineString", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] }

You can then sync this property to a "route" object, with the Geoshape property type. enter image description here