[Geoserver-users] h2gis and Geoserver 2.22-2.23

Hi,

I have a system that is using Geoserver-2.8.5 with h2gis to render maps. It is using the following h2gis jars:

h2gis-api-1.3.2
h2gis-functions-1.3.2
h2gis-geoserver-0.1.0
h2gis-geotools-0.1.0
h2gis-network-1.3.2
h2gis-utilities-1.3.2

I did not build the system originally so I am not that familiar with the internals but now I want to migrate the system to Geoserver 2.22 or 2.23. Can someone tell me which h2gis jars I should be using with these versions?

Any help would be appreciated.

Thanks in advance,
Chris Mugdan

I was not aware of that datastore; a quick web search shows it is active (https://github.com/orbisgis/h2gis-geotools) and mtaintained by orbisgis.

Checking their pom.xml it is using GeoTools 28-SNAPSHOT - which is the same GeoTools 28.x series as used for GeoServer 2.22.x.

So it should already be good, but reach out to the maintainers of that repository to learn more.

···


Jody Garnett

Op 28-02-2023 om 09:06 schreef Jody Garnett:

I was not aware of that datastore; a quick web search shows it is active (https://github.com/orbisgis/h2gis-geotools) and mtaintained by orbisgis.

The H2-GIS datastore was recently added to GeoTools as an unsupported module: https://github.com/geotools/geotools/pull/4043

https://github.com/geotools/geotools/tree/main/modules/unsupported/jdbc-h2gis

As it requires Java 11 it would only be available for the `main` branch (29-SNAPSHOT / 2.23-SNAPSHOT)

the geoserver extension lives at https://github.com/orbisgis/h2gis-geoserver but it seems to be sleeping/stalled/dead

Mark

The latest H2GIS is unfortunately incompatible with GeoServer: it uses H2 2.x native geometry support,
while GeoServer ships with H2 1.x, and depends on it in a large variety of places.

H2 developers made it very difficult for us to upgrade: the used the same package names for the two versions,
meaning they cannot coexist, and made the binary format of the databases incompatible, and without automatic
upgrade. One would have to manually perform a dump to SQL and a restore, which works for alphanumeric
databases, but won’t work for spatialized ones… meaning a custom tool would have to be written in order to perform upgrades.

We have ideas on how to perform migrations, but it would be a lot of days of development… lack of funding is what
is keeping us at bay. If anyone here is interested to contribute to this endeavour please contact me privately.

Best regards
Andrea

···

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail

Hi Andrea,

I have just got back to this after a long hiatus. I should explain what we are trying to do in more detail:

Our application renders maps from business intelligence tools using an underlying map server. Geoserver is one of these. As part of a large overhaul of the system a few years back we decided to use the H2 database version 1.4.196 to store our layers for performance reasons and because the support for h2gis was available in Geoserver 2.8. This also improves the performance of rendering maps because the Geoserver now uses the H2 database in our product for the ephemeral layers we generate rather than having to send the layer information to it.

We add a workspace with the details of our map layers to the Geoserver map folder under workspaces. For all this to work we use h2gis version 1.3.2 in both our application and in the geoserver which we deploy with our application. We also deploy another h2gis jar that has the org.h2gis.geoserver.H2GISDataStoreFactoryInitializer.class in it. According to the Github site https://github.com/orbisgis/h2gis-geoserver it is supposed to be compatible with Geoserver 2.15 but it seems to work fine with Geoserver 2.8.

The question is: can I get all this to work with Geoserver 2.23 or 2.24? Since there are issues with the latest h2gis, can we make the version we are currently using (1.3.2) work or are there some basic incompatibilities that render our current version of h2gis, H2 and supporting classes useless?

Any assistance gratefully received.

Regards,
Chris Mugdan

···

On 01/03/2023 12:07 pm, Andrea Aime wrote:

The latest H2GIS is unfortunately incompatible with GeoServer: it uses H2 2.x native geometry support,
while GeoServer ships with H2 1.x, and depends on it in a large variety of places.

H2 developers made it very difficult for us to upgrade: the used the same package names for the two versions,
meaning they cannot coexist, and made the binary format of the databases incompatible, and without automatic
upgrade. One would have to manually perform a dump to SQL and a restore, which works for alphanumeric
databases, but won’t work for spatialized ones… meaning a custom tool would have to be written in order to perform upgrades.

We have ideas on how to perform migrations, but it would be a lot of days of development… lack of funding is what
is keeping us at bay. If anyone here is interested to contribute to this endeavour please contact me privately.

Best regards
Andrea

On Wed, Mar 1, 2023 at 11:14 AM mark <mc.prins@anonymised.com> wrote:

Op 28-02-2023 om 09:06 schreef Jody Garnett:

I was not aware of that datastore; a quick web search shows it is active
(https://github.com/orbisgis/h2gis-geotools
<https://github.com/orbisgis/h2gis-geotools>) and mtaintained by orbisgis.

The H2-GIS datastore was recently added to GeoTools as an unsupported
module: https://github.com/geotools/geotools/pull/4043

https://github.com/geotools/geotools/tree/main/modules/unsupported/jdbc-h2gis

As it requires Java 11 it would only be available for the main branch
(29-SNAPSHOT / 2.23-SNAPSHOT)

the geoserver extension lives at
https://github.com/orbisgis/h2gis-geoserver but it seems to be
sleeping/stalled/dead

Mark


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Regards,

Andrea Aime

== GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information. == Ing. Andrea Aime @geowolf Technical Lead

GeoSolutions Group phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail

_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: [http://www.ianturton.com/talks/foss4g.html#/](http://www.ianturton.com/talks/foss4g.html#/)
- The GeoServer user list posting guidelines: [http://geoserver.org/comm/userlist-guidelines.html](http://geoserver.org/comm/userlist-guidelines.html)

If you want to request a feature or an improvement, also see this: [https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer](https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer)

[Geoserver-users@lists.sourceforge.net](mailto:Geoserver-users@lists.sourceforge.net)
[https://lists.sourceforge.net/lists/listinfo/geoserver-users](https://lists.sourceforge.net/lists/listinfo/geoserver-users)

Op 23-06-2023 om 12:22 schreef Chris Mugdan:

The question is: can I get all this to work with Geoserver 2.23 or 2.24? Since there are issues with the latest h2gis, can we make the version we are currently using (1.3.2) work or are there some basic incompatibilities that render our current version of h2gis, H2 and supporting classes useless?

newer versions of GeoTools/Geoserver use a newer version of JTS that is incompatible with older versions; this is mostly package names though, so if you were to start of with the original obisgis geotool/geoserver code you could maybe migrate that to be compatible with eg 2.23.x geoserver.
Some other things in Geotools have changed; but there's documentation on that: https://docs.geotools.org/stable/userguide/welcome/upgrade.html

It could be painful and you may be better off reconsidering the datastore and workflow to eg. use geopackage instead

Mark

Hi Mark,

Thank you for your response. Either way it would be a pain for us because the H2 database is now heavily embedded in our product. We shall have to ponder the direction we take. I shall examine geopackage.

Cheers,
Chris

On 27/06/2023 3:26 pm, mark wrote:

Op 23-06-2023 om 12:22 schreef Chris Mugdan:

The question is: can I get all this to work with Geoserver 2.23 or 2.24? Since there are issues with the latest h2gis, can we make the version we are currently using (1.3.2) work or are there some basic incompatibilities that render our current version of h2gis, H2 and supporting classes useless?

newer versions of GeoTools/Geoserver use a newer version of JTS that is incompatible with older versions; this is mostly package names though, so if you were to start of with the original obisgis geotool/geoserver code you could maybe migrate that to be compatible with eg 2.23.x geoserver.
Some other things in Geotools have changed; but there's documentation on that: https://docs.geotools.org/stable/userguide/welcome/upgrade.html

It could be painful and you may be better off reconsidering the datastore and workflow to eg. use geopackage instead

Mark

_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Chris, think about it well, because the H2 version 1 database is already removed from
GeoServer core, and in time (pending funding), it will be removed from the rest of GeoServer as well,
and eventually the H2 datastore will die too.

So it’s high time to start looking into a migration to some other solution: GeoPackage if you have
to do it right now, or the latest H2Gis in the medium term, or if you know you’ll never use the
other modules that need H2 version 1 (e.g., NetCDF/Grib)

Best regards
Andrea

···

Regards,

Andrea Aime

==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions Group
phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail

Hi Andrea,

Thanks for responding. Your reply is fortuitous because we are just about to discuss a roadmap for our product that uses Geoserver.

Cheers,
Chris

···

On 28/06/2023 9:27 am, Andrea Aime wrote:

Chris, think about it well, because the H2 version 1 database is already removed from
GeoServer core, and in time (pending funding), it will be removed from the rest of GeoServer as well,
and eventually the H2 datastore will die too.

So it’s high time to start looking into a migration to some other solution: GeoPackage if you have
to do it right now, or the latest H2Gis in the medium term, or if you know you’ll never use the
other modules that need H2 version 1 (e.g., NetCDF/Grib)

Best regards
Andrea

On Tue, Jun 27, 2023 at 5:34 PM Chris Mugdan <chris.mugdan@anonymised.com> wrote:

Hi Mark,

Thank you for your response. Either way it would be a pain for us
because the H2 database is now heavily embedded in our product. We shall
have to ponder the direction we take. I shall examine geopackage.

Cheers,
Chris

On 27/06/2023 3:26 pm, mark wrote:

Op 23-06-2023 om 12:22 schreef Chris Mugdan:

The question is: can I get all this to work with Geoserver 2.23 or
2.24? Since there are issues with the latest h2gis, can we make the
version we are currently using (1.3.2) work or are there some basic
incompatibilities that render our current version of h2gis, H2 and
supporting classes useless?

newer versions of GeoTools/Geoserver use a newer version of JTS that
is incompatible with older versions; this is mostly package names
though, so if you were to start of with the original obisgis
geotool/geoserver code you could maybe migrate that to be compatible
with eg 2.23.x geoserver.
Some other things in Geotools have changed; but there’s documentation
on that: https://docs.geotools.org/stable/userguide/welcome/upgrade.html

It could be painful and you may be better off reconsidering the
datastore and workflow to eg. use geopackage instead

Mark


Geoserver-users mailing list

Please make sure you read the following two resources before posting
to this list:

If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Regards,

Andrea Aime

== GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information. == Ing. Andrea Aime @geowolf Technical Lead

GeoSolutions Group phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail