Comments (11)
from android-spatialite.
- The intersects function does work, in fact the example query posted in the issue returns 18 rows.
- "umlaut" ??? don't understand what you mean??? if you are referring to the like '%desagü%' I tested with other conditions and the intersection function still doesn't work.
from android-spatialite.
from android-spatialite.
What I need to do is a geocoding search using spatialite, that's why I need the intersection function, I made a small spatialite database for testing purposes, cause my app database is really big. This database has an only table with 18 rows representing streets, each row has a name and a MULTILINESTRING geometry.
Link to download database: https://mega.nz/#!BY8QEI5Z!FSW6rQkBHQk8LMnNq6ph5TwCN7sUJy0a6tEsqmzfO00
Running this query using spatialite_gui app:
select name, geometry, astext(geometry) textgeometry, astext(intersection(geometry, (select geometry
from ln_data where id=62175
))) as textintersection
from ln_data
where
intersects(geometry, (select geometry
from ln_data where id=62175
))
will return 18 rows which are the intersections of the street with id=62175 and the rest of the streets in database including the same. In the spatialite_gui app this query results is OK, 18 rows and each column has a non null value as expected, but using android_spatialite the 18 rows has a null value in the conlumn of textintersection.
This is the java code I used:
SQLiteDatabase spatialiteDatabase = SQLiteDatabase.openDatabase("/sdcard/map/test.sqlite", null, SQLiteDatabase.OPEN_READONLY);
Cursor cursor = spatialiteDatabase.rawQuery("select name, geometry, astext(geometry) textgeometry, astext(intersection(geometry, (select geometry\n" + "from ln_data where id=62175\n" + "))) as textintersection\n" + "from ln_data\n" + "where \n" + "intersects(geometry, (select geometry\n" + "from ln_data where id=62175\n" + "))\n", null);
if(cursor != null && cursor.moveToFirst())
{
do
{
String name = cursor.getString(cursor.getColumnIndex("name"));
byte[] geometry = cursor.getBlob(cursor.getColumnIndex("geometry"));
String textgeometry = cursor.getString(cursor.getColumnIndex("textgeometry"));
String textintersection = cursor.getString(cursor.getColumnIndex("textintersection"));
Log.d("test", "name: " + name);
Log.d("test", "geometry: " + geometry);
Log.d("test", "textgeometry: " + textgeometry);
Log.d("test", "textintersection: " + textintersection);
}while(cursor.moveToNext());
}
spatialiteDatabase.close();
So this query uses 3 spatialite functions which are: astext(...), intersection(...) and intersects(...), and I have 18 rows as result, so the intersects(...) function is working OK, and the astext(...) function is working OK, but the intersection(...) function is not working at all.
I hope this is enough to reproduce the problem I've been facing.
Thanks in advance.
from android-spatialite.
from android-spatialite.
I checked and the Spatialite version is the same, the GEOS version it is different, it is the v3.5.0 different to the v3.4.2 included in the lib... But i don't think the problem is a missing function cause there is not any Sqlite Exception about any invalid function...
from android-spatialite.
from android-spatialite.
Ok thanks, I will be aware.
from android-spatialite.
Is this problem solved?
from android-spatialite.
Is this problem solved?
No idea, it has been a long time
from android-spatialite.
Is it possible that intersects=1 but intersection=null?
from android-spatialite.
Related Issues (17)
- dlopen failed: library "libandroid_runtime.so" not found in Android 7 HOT 5
- AddGeometryColumn Error (InitSpatialMetadata related) HOT 7
- Constraint fails when trying to INSERT
- E/SQLiteLog: (1) no such function: ExportSHP
- Suspect undocumented dependency issue? HOT 2
- Need Version 2.0.0 Back HOT 1
- a more recent build HOT 1
- Update request for SQLite library
- Utilize Parameterized SQL Queries to Address DAST Issues
- SQLiteCipher - SpatiaLite question HOT 1
- table tablename has no column named colname (code 1) HOT 4
- Native Crash on arm64-v8a Android 7.0 HOT 9
- export shape files HOT 4
- make sure spatial_ref_sys is always created while openening new database HOT 1
- Failed to resolve: android-spatialite HOT 5
- How to use Spatialite Virtual Routing Network HOT 20
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-spatialite.