[geotk] Geometry operations in Geotk

Jon Blower j.d.blower at reading.ac.uk
Fri Jul 18 09:04:31 PDT 2014


Hi Johann,

Which Geotk module is the JTS class in? Is it in the Maven repository?

Cheers,
Jon

--
Dr Jon Blower,
Technical Director, Reading e-Science Centre,
MELODIES project coordinator,
School of Mathematical and Physical Sciences,
University of Reading
Tel: +44 118 378 5213
Email: j.d.blower at reading.ac.uk

On 18 Jul 2014, at 16:31, johann sorel <johann.sorel at geomatys.com> wrote:

> Hi Jon,
> 
> We use JTS for geometries for now.
> 
> > Here is an example to create geometries :
> https://github.com/Geomatys/geotoolkit/blob/master/demos/geotk-demo-samples/src/main/java/org/geotoolkit/pending/demo/geometry/JTSDemo.java
> 
> > All operations are on the JTS geometry class.
> boolean intersect = geom1.intersects(geom2)
> 
> > For reading and writing you have WKTReader and WKTWriter, same for WKB.
> WKTReader reader = new WKTReader();
> Geometry geom = reader.read("POLYGON(....");
> 
> > For transformation between CRS.
> Geometry geom2 = JTS.transform(geom, crs1ToCrs2);
> 
> 
> 
> Johann Sorel
> Geomatys
> 
> 
> 
> On 18/07/2014 17:06, Jon Blower wrote:
>> Hi all,
>> 
>> I’d like to create simple geometries (mainly polygons) and detect for intersection, containment and other typical geometry operations. Which classes in Geotk should I look at? I found a large number of classes relating to geometries but was a bit confused about where to start.
>> 
>> (I’d also like to be able to parse and generate WKT strings if this is possible.)
>> 
>> Thanks,
>> Jon
>> 
>> --
>> Dr Jon Blower,
>> Technical Director, Reading e-Science Centre,
>> MELODIES project coordinator,
>> School of Mathematical and Physical Sciences,
>> University of Reading
>> Tel: +44 118 378 5213
>> Email: j.d.blower at reading.ac.uk
>> 
>> _______________________________________________
>> Geotoolkit mailing list
>> Geotoolkit at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geotoolkit
> 
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geotoolkit



More information about the Geotoolkit mailing list