Hi everyone,
A feature object contains a set of proprieties (any columns) and a set of geometries (geometry column datatype). I have successfully linked the H2GIS geometry datatype with the JTS library, thanks to Baremaps example
I'd like something like that
Jdbi jdbi = Jdbi.create(...)
.installPlugin(new H2GISPlugin());
List<Feature> features = jdbi.withHandle(handle ->
handle.createQuery("SELECT * FROM mygeodata limit 2")
.map(new FeatureMapper()).list());
Because the sql query can change every time, I would like to be able to feed the Feature on the fly and access the resulset values like this
feature.getString("name") // where name is the name of the column
feature.getGeometry("the_geom") // where the_geom is a column geometry mapped to JTS geometry type
I have looked in RowMapper and Reflection Mappers but I don't see a way to do it.
Note : I'd like also to stream and iterate the features to manage large geometry table. So the method getString, getGeometry on the feature object must interact with the resultset.
Thanks a lot in advance for your help!
Erwan