hey Nico,

wouldn't it make sense to quote sql values in case they contain spaces?

..ede

On 8/10/2017 18:21, jump-pilot-svn--- via Jump-pilot-devel wrote:
> Revision: 5487
>           http://sourceforge.net/p/jump-pilot/code/5487
> Author:   elnico
> Date:     2017-08-10 16:21:24 +0000 (Thu, 10 Aug 2017)
> Log Message:
> -----------
> Spatial Index support for SQLite/Spatialte datasources: wrong test for 
> GeoPackage spatial query bbox overlaping
> 
> Modified Paths:
> --------------
>     core/trunk/ChangeLog
>     
> core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteSQLBuilder.java
> 
> Modified: core/trunk/ChangeLog
> ===================================================================
> --- core/trunk/ChangeLog      2017-08-10 13:43:01 UTC (rev 5486)
> +++ core/trunk/ChangeLog      2017-08-10 16:21:24 UTC (rev 5487)
> @@ -4,6 +4,10 @@
>  #<-------------------------------- 80 chars 
> ---------------------------------->#
>  
>  2017-08-10 Nicolas Ribot <nicolas.ri...@gmail.com>
> +  * Spatial Index support for SQLite/Spatialte datasources: wrong test for 
> +    GeoPackage spatial query bbox overlaping
> +
> +2017-08-10 Nicolas Ribot <nicolas.ri...@gmail.com>
>    * Spatial Index support for SQLite/Spatialte datasources: checks if 
> geometry
>      columns are indexed and builds custom SQL queries to use index according 
> to
>      detetected SQLite flavors
> 
> Modified: 
> core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteSQLBuilder.java
> ===================================================================
> --- 
> core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteSQLBuilder.java
>      2017-08-10 13:43:01 UTC (rev 5486)
> +++ 
> core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteSQLBuilder.java
>      2017-08-10 16:21:24 UTC (rev 5487)
> @@ -156,9 +156,9 @@
>      if (gc.isIndexed()) {
>        if (dsm.getGeometryColumnsLayout() == 
> GeometryColumnsLayout.OGC_GEOPACKAGE_LAYOUT) {
>          ret = String.format(Locale.US,
> -          " AND ROWID IN (SELECT id FROM rtree_%s_%s WHERE minx > %f and 
> maxx < %f and miny > %f and maxy < %f) ",
> +          " AND ROWID IN (SELECT id FROM rtree_%s_%s WHERE minx < %f and 
> maxx > %f and miny < %f and maxy > %f) ",
>            query.getDatasetName(), query.getGeometryAttributeName(), 
> -          env.getMinX(), env.getMaxX(), env.getMinY(), env.getMaxY());
> +          env.getMaxX(), env.getMinX(), env.getMaxY(), env.getMinY());
>        } else if (dsm.isSpatialiteLoaded()) {
>          // always use spatialIndex table if spatialite
>          ret = String.format(Locale.US,
> 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to