You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Override
public void onCreate(SQLiteDatabase db) {
String createSql = "CREATE TABLE t_geom id INTEGER NOT NULL " +
"PRIMARY KEY AUTOINCREMENT " +
"name TEXT NOT NULL " +
"measured_value DOUBLE NOT NULL);";
db.execSQL(createSql);
db.rawQuery("SELECT InitSpatialMetaData();");
db.rawQuery("SELECT AddGeometryColumn('t_geom', 'the_geom', 4326, 'POINT', 'XY', 1);"");
...
}
I'm getting everything instantiated:
But when I'm trying to INSERT value in that field INSERT INTO t_geom(name, measured_value, the_geom) VALUES ('testtttt', 22.3, PointFromText('POINT(101.23 171.82)'));
I'm getting: android.database.sqlite.SQLiteConstraintException: t_geom.the_geom violates Geometry constraint [geom-type or SRID not allowed] (code 1811) at org.spatialite.database.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method) at org.spatialite.database.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:764) at org.spatialite.database.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:766) at org.spatialite.database.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:68) at org.spatialite.database.SQLiteDatabase.executeSql(SQLiteDatabase.java:1677) at org.spatialite.database.SQLiteDatabase.execSQL(SQLiteDatabase.java:1669)
Spatial-gui also displays error message:
Any idea?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi,
i've initialized database with:
I'm getting everything instantiated:
But when I'm trying to
INSERT
value in that fieldINSERT INTO t_geom(name, measured_value, the_geom) VALUES ('testtttt', 22.3, PointFromText('POINT(101.23 171.82)'));
I'm getting:
android.database.sqlite.SQLiteConstraintException: t_geom.the_geom violates Geometry constraint [geom-type or SRID not allowed] (code 1811) at org.spatialite.database.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method) at org.spatialite.database.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:764) at org.spatialite.database.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:766) at org.spatialite.database.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:68) at org.spatialite.database.SQLiteDatabase.executeSql(SQLiteDatabase.java:1677) at org.spatialite.database.SQLiteDatabase.execSQL(SQLiteDatabase.java:1669)
Spatial-gui also displays error message:
Any idea?
Thanks.
The text was updated successfully, but these errors were encountered: