[udig-devel] How can we find intersection of two geometries?

Adrian Custer acuster at gmail.com
Sat Apr 7 02:10:13 PDT 2007


Hello,

not sure if anyone got back to you...

The general solution is quite hard but a working solution can be
obtained using the underlying geometry library (JTS). Essentially you

  create your geometric elements (JTS) for cutting
  get a list of features, and for each:
    get the geometry
    use JTS operations to cut it with your elements
  re-combine the new geometries with your original or with new features
  repackage the whole thing

attached is a file that implements a uDig operation and buffers points
in this way. Hooking up the operation into uDig requires some eclipse
magic around the file---look at the uDig tootip example on the web to
understand the uDig IOp extension point.

hope this helps,
adrian


On Wed, 2007-04-04 at 20:02 +0300, Sergiy Doroshenko wrote:
> Hi all!
> 
> How can we create new feature from given one by intersecting its
> geometry by another geometry? For example, split given feature by
> rectangular grid and create new feature for every peace - in this case
> we need to find intersection of multipolygon and rectangles.
> 
> Is there some udig's or geotools' instrument, or this geometrical
> operation can be done only with some 3d party libraries?
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BufferPtLayerOp.java
Type: text/x-java
Size: 29361 bytes
Desc: not available
Url : http://lists.refractions.net/pipermail/udig-devel/attachments/20070407/cf533379/BufferPtLayerOp-0001.bin


More information about the udig-devel mailing list