Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Convert a flat file (JSON) to a Geometry

Hi everyone,

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.

Regards

Pierre
Labels (3)
2 Replies
Anonymous
Not applicable
Author

After days looking for this answer, it seems that the Gdal library could do what i'm looking for.. Am i going to the right way ?
Anonymous
Not applicable
Author

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