You can specify an intersection filter but only between a table column 
and a literal geometry. If you want to do a "join" you need two for 
loops (one through one table, where you take out each geometry, and a 
second as you use the geometry to perform your intersection query 
against the second table).
(Look at the validation module for lots of examples that work like this).

It is all very inefficient and involves a round trip between the 
database and your java program. Try creating a view in PostGIs based on 
the intersection you need.

Jody
> Jody Garnett a écrit :
>> If both tables are in PostGIS you should be able to do this directly 
>> using SQL. It would be much faster then using GeoTools for the task.
>> Jody
> Ok I will try this way.
> It seems that there is some work in progress about Hints and DataStore 
> like PostGIS DS, do you know if it is possible to use Hints in this 
> data store in order to use a postGIS method like 
> intersection(geometry, geometry) ?
>
> Thanks,
> Cédric B.
>
>>> Hi everyone,
>>>
>>> I have two PostGIS tables that contains "MULTIPOLYGON"  geometries. 
>>> I would like to do a clipping between these two tables, in order to 
>>> get the intersections of geometries between these two tables. Is it 
>>> a method in Geotools that can do this work on these geometries ?
>>> I've found on the web an old javadoc that contained the class 
>>> "org.geotools.renderer.geom.Clipper" 
>>> (http://udig.refractions.net/docs/api-geotools/index.html), but it 
>>> only seems to take polyline geometry, and it is probably old 
>>> packages since I haven't found it on the svn branche 2.3.x.
>>> I know that in PostGIS there is a method intersection() that can 
>>> probably provide me the new geometries resulting from an 
>>> intersection of two units, but I'd like to know if there is 
>>> something in Geotools that can do that for me...
>>>
>>> Regards,
>>> Cédric B.
>>>
>>> ------------------------------------------------------------------------- 
>>>
>>> This SF.net email is sponsored by: Microsoft
>>> Defy all challenges. Microsoft(R) Visual Studio 2005.
>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>> _______________________________________________
>>> Geotools-gt2-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>>   
>>
>>
>



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to