GeoLatte / geolatte-geom

A geometry model that conforms to the OGC Simple Features for SQL specification.
Other
132 stars 63 forks source link

Update jts-core to 1.18.0 #123

Closed mproboeuf closed 3 years ago

mproboeuf commented 3 years ago
tiago-s-vieira-alb commented 3 years ago

Hi @mproboeuf, did you test it integrated with a Geotools version? I use the GT24 with JTS-1.17.1, and it crashes. I think it's better to accept my PR first (https://github.com/GeoLatte/geolatte-geom/pull/122). In my opinion it should be released a geolatte version with JTS-1.17 on it (in compliance with Geotools and Geoserver 2.18.0), and then another version upgrading to JTS 1.18.0. In this way people can manage their dependencies as they want.

mproboeuf commented 3 years ago

Hi @tiago-s-vieira , I saw your PR and I'm perfectly agree that it should be merged first.

However, my use case is quite different : i'm using hibernate-spatial (which includes geolatte-geom) to manage my database entities and i'm also using jackson-datatype-jts (which includes jts-core in its latest version 1.18.0) to be able to serialize these entities towards my REST APIs. That first led to a dependency conflict for which I found a workaround to exclude jts-core from geolatte-geom dependency and to manually add jts-core dependency in its latest 1.18.0 version. But then, it led to a second conflict which is mainly the purpose of my PR : in jts-core 1.18.0, they introduce a new class called Position and it conflicts with Position class which is included in geolatte-geom.

So, maybe we could tackle both of our issues, as you've also updated JTS.java, if you could please include in your PR the import reorganization I've done in mine ?

maesenka commented 3 years ago

Hii @tiago-s-vieira and @mproboeuf , I was just getting ready to merge your PR's.

I will need to create different minor versions for geolatte-geom since JTS 1.17 has interface changes, and so has 1.18. So yes I would need to have different releases.

But Yes, it is a good idea to incorporate the changes in JTS.java directly.

maesenka commented 3 years ago

Btw, @mproboeuf You noticed that there is a geojson serializer/deserializer directly from Geolatte in the geojson module? You might consider that one for your needs?

mproboeuf commented 3 years ago

Hi @maesenka and thanks for the work you've done. I was not aware of these serializer/deserializer. But if I'm not mistaken, I have to annotate my attributes like this to use them

 @JsonSerialize(using = GeometrySerializer.class)
 @JsonDeserialize(using = GeometryDeserializer.class)

And that's what I want to avoid. That's why I'm using jackson-datatype-jts which provide a more official manner thanks to an jackson module (JtsModule in my case) you just have to register.

By the way, as @tiago-s-vieira asked before, when can we expect new releases ? Have a good day !

maesenka commented 3 years ago

Hi @mproboeuf, about the GeoJson module. I'm not a fan of annotations either. But there is a GeolatteGeomModule.

Anyway, seems the previous release (1.6.1) never made it to Maven central so I'm fixing that now. After that I'll be releasing 1.7 and 1.8 very shortly after that (in the next days). So we can start all with the new versions of JTS.

mproboeuf commented 3 years ago

Wow @maesenka , I was not aware of this class, I will have a look and try to test it. Many thanks !