Revision: 4724 http://sourceforge.net/p/jump-pilot/code/4724 Author: elnico Date: 2015-12-29 16:32:13 +0000 (Tue, 29 Dec 2015) Log Message: ----------- OGC WKB and MySQL geometry binary types handled for MySQL/Spatialite
Modified Paths: -------------- core/trunk/src/com/vividsolutions/jump/datastore/mariadb/MariadbValueConverterFactory.java Modified: core/trunk/src/com/vividsolutions/jump/datastore/mariadb/MariadbValueConverterFactory.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/datastore/mariadb/MariadbValueConverterFactory.java 2015-12-29 16:13:05 UTC (rev 4723) +++ core/trunk/src/com/vividsolutions/jump/datastore/mariadb/MariadbValueConverterFactory.java 2015-12-29 16:32:13 UTC (rev 4724) @@ -30,10 +30,11 @@ throws SQLException { String dbTypeName = rsm.getColumnTypeName(columnIndex); - // manages 2 cases: type retrieved from Database metadata (DataStore Panel) + // manages 2 cases: type retrieved from Database metadata (DataStore Panel) // and from direct Adhoc query (type of the column resultset). - if ("LONGBLOB".equalsIgnoreCase(dbTypeName) || "GEOMETRY".equalsIgnoreCase(dbTypeName)) // WKB is now the normal way to store geometry in PostGIS [mmichaud 2007-05-13] - { + if ("LONGBLOB".equalsIgnoreCase(dbTypeName)) { + return WKB_GEOMETRY_MAPPER; + } else if ("GEOMETRY".equalsIgnoreCase(dbTypeName)) { return MYSQLWKB_GEOMETRY_MAPPER; } @@ -117,10 +118,8 @@ nativeFormat = true; } - // TODO: how to recognize MySQL binary from wkb ? -// } else if (Arrays.equals(ctrl, firstFour)) { } else if (true) { - // Nicolas Ribot: mysql now stores srid at the beginning of the geom ? + // Nicolas Ribot: mysql binary stores srid at the beginning of the geom nativeFormat = true; } return nativeFormat; ------------------------------------------------------------------------------ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel