Hi,

I have a slight feeling that there may be some trouble if attribute "ROWID" is 
INTEGER PRIMARY KEY but it does not AUTOINCREMENT and users do lot of deletes 
and inserts. Maybe not if the triggers in r-tree tables are clever enough. Just 
a slight feeling but perhaps you should test also cases where ROWID differs 
from OID and _ROWID_?

-Jukka-

Lähettäjä: Even Rouault [mailto:even.roua...@spatialys.com]
Lähetetty: 7. maaliskuuta 2017 16:51
Vastaanottaja: gdal-dev@lists.osgeo.org
Kopio: Rahkonen Jukka (MML) <jukka.rahko...@maanmittauslaitos.fi>; 
a.furi...@lqt.it
Aihe: Re: [gdal-dev] sqlite -> spatialite (rowid)


Arg, it seems my email has been truncated in text version. Retrying...



> Now I delete feature with rowid=3:

>



Let's see the state:



$ ogrinfo test.db -al

INFO: Open of `test.db'

using driver `SQLite' successful.



Layer name: test

Geometry: Unknown (any)

Feature Count: 2

Extent: (1.000000, 2.000000) - (5.000000, 6.000000)

Layer SRS WKT:

(unknown)

FID Column = rowid

Geometry Column = GEOMETRY

OGRFeature(test):1

POINT (1 2)



OGRFeature(test):5

POINT (5 6)



$ ogrinfo test.db -sql "select * from idx_test_GEOMETRY"

INFO: Open of `test.db'

using driver `SQLite' successful.



Layer name: SELECT

Geometry: None

Feature Count: 2

Layer SRS WKT:

(unknown)

pkid: Integer (0.0)

xmin: Real (0.0)

xmax: Real (0.0)

ymin: Real (0.0)

ymax: Real (0.0)

OGRFeature(SELECT):0

pkid (Integer) = 1

xmin (Real) = 1

xmax (Real) = 1

ymin (Real) = 2

ymax (Real) = 2



OGRFeature(SELECT):1

pkid (Integer) = 5

xmin (Real) = 5

xmax (Real) = 5

ymin (Real) = 6

ymax (Real) = 6





-> The spatial index has been properly maintained: the entry corresponding to 
the deleted feature has been deleted as well.



Even



--

Spatialys - Geospatial professional services

http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to