Hello . We completed big project on uDig, GeoTools, PostGIS, H2 and SymmetricDS. In context of this project we invested into adopting H2 1.4 through GeoTools interfaces (H2DataStore) , basically by tuning gt-jdbc-h2 module , geodb and hatbox libraries. I want to share some observations first.
H2 is a great small database which shows excellent performance. Being integrated into uDig and after all optimization we did it makes rendering of dozens of thousands of features in multiple layers at the same time very fast. There are several changes that we have done: - Usage of VARBINARY data type instead of BLOB. For many reasons BLOB was not very efficient and became even less efficient in latest H2. - Changes in SQL generation by FilterToSQL-derived classes and optimizations for prepared statements - Declaring most Hatbox and geodb functions as DETERMINISTIC which in certain scenarios helps to H2 to make right execution plan and avoid calling functions unnecessarily many times with the same parameters. - Optimizing hatbox for handling MultiPolygons by splitting them into parts, requesting spatial index separately and merging results - boost in performance for MPs in spatial predicates that use spatial index of Hatbox. - some minor fixes everywhere. Also H2 database nowadays has built-in GEOMETRY type (based on WKB as a storage format and JTS for handling it in Java) and even spatial RTree based index. http://www.h2gis.org guys are developing a wrapping tier over H2, its built-in geometry type and JTS. In the end JTS is a driving engine for everything there. But it's GPL and I assume can not be used as a part of GeoTools library being distributed as GeoTools module. I would like to discuss the future of H2 module in GeoTools. I see 2 options. 1) First option is to establish probably a separate module in GT for H2 1.4 and using current infrastructure of geodb and hatbox which works just fine. I would contribute all our results to this module and would be a maintainer e.g. 2) Implement from scratch something similar as H2GIS as , again, a new GT module with usage of built-in GEOMETRY type and built-in RTree index. This option should give even better performance because of internal index utilization comparing with Hatbox (which is a simulation of an index using normal tables). Regards, Vitaly. ------------------------------------------------------------------------------ _______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel