Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

mathieu_r
2009-04-29 09:48:15

Hi,

It must be an advanced operation.
Could you tell me where I write these lines of code?

Code:

org.talend.sdi.geometry A,B;
A.union(B);

I wrote this line in my tMap:

Code:

row1.the_geom.union(row2.the_geom)

but i get the following error:
"Starting job union at 09:44 29/04/2009.
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
    The operator ! is undefined for the argument type(s) Geometry

    at general.union_0_1.union.sShapefileInput_1_GIProcess(union.java:4012)
    at general.union_0_1.union.runJobInTOS(union.java:4917)
    at general.union_0_1.union.main(union.java:4833)
Job union ended at 09:44 29/04/2009. [exit code=1]
"

Mbaroudi
2009-04-28 17:41:06

Hi,
On java yo do this :
org.talend.sdi.geometry A,B;
A.union(B);
On tMap you define A and B as a Geometry and you may be do A.union(B);
ctrl+space can help you to find the good operation.

Regards.

mathieu_r
2009-04-28 10:35:50

Hello,

I tried your method with Geometry.union(row1.the_geom,row2.the_geom)
but it tells me the method "union" is unknown...

Code:

Starting job Copy_of_contains at 10:34 28/04/2009.
Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
    The method union(Geometry) in the type Geometry is not applicable for the arguments (Geometry, Geometry)
    org.talend.sdi.geometry cannot be resolved to a type

    at general.copy_of_contains_0_1.Copy_of_contains.sShapefileInput_1_GIProcess(Copy_of_contains.java:4014)
    at general.copy_of_contains_0_1.Copy_of_contains.runJobInTOS(Copy_of_contains.java:4920)
    at general.copy_of_contains_0_1.Copy_of_contains.main(Copy_of_contains.java:4834)
Job Copy_of_contains ended at 10:34 28/04/2009. [exit code=0]

The screenshot I attached shows how I tried to process this operation.

Thanks,

Mathieu

Mbaroudi
2009-04-27 21:13:23

Hello,
I'm sorry I would like to say : org.talend.sdi.geometry.union(Geometry geom)

The source code of all geometry operation in SDI was here: https://project.camptocamp.com/svn/c2c_ … metry.java


Regards

mathieu_r
2009-04-27 13:36:27

hello,

I have no function Geometry.union available
Maybe you wanted to mention Geometry.intersection?

I attached a screenshot to this post. The cities are in blue. the region contour is in red and fits the cities' contour.

Thanks,

Mathieu

Mbaroudi
2009-04-26 20:34:30

Hello,
Try Geometry.union() operation to do that.

Regards

mathieu_r
2009-04-24 16:25:40

Hello,

I've got a question regarding the geographical set of operations avalaible in SDI.

here is my problem:
I've go two input shapefiles: one for the cities, another with regions. These input shapefiles are of multipolygon type...
I put some images with this post so as you figure it out...

I'd like to get a shapefile with all the cities belonging to these regions.

For this, I know I have to use the tMap component, but I don't know which GeoOperation function to use:
contains,
covers,
covered by,
intersects,
overlaps?

If my cities input is row1, my regions row2, could you tell me which expression I have to write?

Thanks!

Board footer

Powered by FluxBB