Geometry cannot be resolved to a type

Geometry cannot be resolved to a type

Hello,
I installed successfully the newest TOS DI and the spatial module according to the install instruction. Thereafter I am able to build complex jobs with GeoOperations integrating PostGIS, shapefiles and so on, this works very good. But I am not able to retrace / rebuild this example to create a new geometry from a WKT representation of a point:
https://github.com/talend-spatial/talend-spatial/wiki/Create-lines-or-polygons-from-points
If I execute the job, then I get the error message: Geometry cannot be resolved to a type.
Does anyone has a similiar problem?
Best regards, Stefan

One Star Fxp
One Star

Re: Geometry cannot be resolved to a type

Hi, could you post a screenshot of your job or the list of components used ?
I can't reproduce issue with tRowGenerator > tMap > sShapefileOutput.
It sounds related that no spatial component is in used (only a call to new Geometry) and the spatial libs may not be loaded. Try to add a sGeomTxtInput (which does nothing) in your job, which will trigger the spatial lib to be loaded. Another option could be to use tLibraryLoad.
Cheers.
Francois

Re: Geometry cannot be resolved to a type

I have appended 2 images,
basically it is the same example as the link below is showing
https://github.com/talend-spatial/talend-spatial/wiki/Create-lines-or-polygons-from-points
Regards, Stefan
One Star Fxp
One Star

Re: Geometry cannot be resolved to a type

Basically it's the same, but does not output a shapefile. This last component trigger the load of the library required for Geometry type.
Try to add a sGeomTxtInput.
Cheers.
Francois

Re: Geometry cannot be resolved to a type

sorry, the second image failed while uploading

Re: Geometry cannot be resolved to a type

When using sGeomTxtInput I get the error message, that this method is not defined,
In the tMap out component I wrote following:
sGeomTxtInput("LINESTRING("+row1.x+" "+row1.y +","+row1.x2+" "+row1.y2+")")
Does the WKT representation is the valid input string for the sGeomTxtInput method?
Best regards, Stefan

Re: Geometry cannot be resolved to a type

Hi, this way works:
tRowGenerator -> tMap -> sShapeFileOutput
in the tMap I defined the new Geometry(WKT) as the geometry representation.
Thank you very much for helping.
Best regards, Stefan

Calling Talend Open Studio Users

The first 100 community members completing the Open Studio survey win a $10 gift voucher.

Start the survey

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now

6 Ways to Start Utilizing Machine Learning with Amazon We Services and Talend

Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend

Blog

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now