I'm a new user of the spatial extension for talend and i have an issue. I want to create a point/polyline/polygone in talend and add it into an Oracle database.
I have no problem to get all the data from the JSON (input) but i'm stuck to convert coordinates into a geometry. I achieved to make a point with the s2DPointReplacer component but what about polygone/polyline ??
i'm convinced that it does exist an easier solution but i can't find it... Thanks in advance for your answer, i would be really grateful.
Hi,
I would say, 3 options:
1/ use sOGRInput and use the GeoJSON driver
2/ Create a component to convert JSON geometry to Talend Geometry (something like https://github.com/talend-spatial/talend-spatial/blob/6.x/main/plugins/org.talend.sdi.designer.components/components/s2DPointReplacer/s2DPointReplacer_main.javajet#L38)
3/ Create a routine that you can use in expression (eg. https://github.com/talend-spatial/talend-spatial/blob/6.x/main/plugins/org.talend.sdi.designer.routines/resources/java/routines/GeometryUtility.java#L50)
HTH
Francois