Larry Reeder <lnreeder <at> gmail.com> writes: > > > > Great analysis, Michaël. Looks like the spatialite component of plugin will need to do it's own WKB decoding instead of relying on the JTS WkbReader, at least in part. > -lreeder
Theoretically, if the plugin was only a Spatialite plugin, I think the right and simple thing to do would be "SELECT AsBinary(geometry)" so that Spatialite itself would take care of converting Spatialite BLOBs into WKB. However, the very inportand part of DB Query Plugin is that it does not necessarily need Spatialite. For the own WKB decoding the best result would be achieved by rewiting Spatialite WKB parsing code into Java. It seems to be in gg_wkb.c file in Spatialite sources. However, Spatialite is internally using something called gaia geometry, and conversion goes as Spatialite BLOB -> gaia geometry -> WKB and gaia geometries are perhaps handled in spatialite.c. Sources I was browsing were from http://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-4.0.0.zip Rewriting Spatialite BLOB handling feels like a big job. Probably more realistic would be to enhance the DB Query to be able to handle multigeometries and multigeometries. However, it is to be noticed that this would not make the plugin to read all Spatialite databases that exist because it looks like Spatialite BLOBs can also contain geometries as compressed. I feel that some day OpenJUMP will have a dedicated plugin for Spatialite and it will need the Spatialite extension and read geometries through AsBinary but it would be nice if Larry or some other developer would enhance DB Query plugin so that it could handle uncompressed Spatialite BLOBs with multigeometries and geometry collections. Or could it be possible to make a dirty workaround to taking the WKB handling code from the JTS 1.12, rename it and use that together with the existing WKB decoding of DB Query plugin? -Jukka Rahkonen- ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel