[geotk] Geometry operations in Geotk

Martin Desruisseaux desruisseaux at apache.org
Sat Jul 19 01:56:42 PDT 2014


Hello Jon

The geometry module is on a separated Maven repository:

http://maven.geotoolkit.org/

The groupId is "org.geotoolkit" if you are using Geotk-4.x (still very
in flux because of the migration to Apache SIS), or
"org.geotoolkit.pending" if you are using a Geotk-3.x version.

Just a reminder for other potential readers: the geometry module is not
yet on Maven central because it depends on the pending part of GeoAPI,
which is not yet on central. GeoAPI is deployed by OGC rather than
ourself, after we got a positive vote from the OGC working group. We
intentionally try to give power to OGC in the hope to encourage other
(independent or competitor) projects to participate to GeoAPI, assuming
that they may feel safer in a project controlled by a neutral
organization. We are not yet there, but I still not hopeless.

An other reason why the geometries are still considered "pending" is
that ISO 19107 is still in revision process. I'm following the mailing
list so I can confirm that the revision is still progressing - they are
not stall. I think we may have a draft stable enough in 2015, but maybe
not before.

    Regards,

        Martin


Le 18/07/14 20:12, Jon Blower a écrit :
> Hi Johann,
>
> This doesn’t seem to be on Maven Central (http://search.maven.org/#browse|1129291095). Is there a specific repository? I couldn’t find one on the Geotk website.
>
> 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 17:10, johann sorel <johann.sorel at geomatys.com> wrote:
>
>> It's on maven :
>>
>> groupId : org.geotoolkit
>> artifactId : geotk-geometry
>>
>> Johann Sorel
>> Geomatys
>>
>>
>> On 18/07/2014 18:04, Jon Blower wrote:
>>> Hi Johann,
>>>
>>> Which Geotk module is the JTS class in? Is it in the Maven repository?
>>>
>>> Cheers,
>>> Jon
>>>
>>> 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);
>>>>
>>>>
>>>>
>>>> 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



More information about the Geotoolkit mailing list