Efficiency improvements.
Adds capabilities
SelectAtId
CreateSpatialIndex
This uses line number as an index. Allows jumping to a line number
without interpreting all intermediate records, so much more efficient.
Also retains the current record in a buffer, so successive requests for
the same record do not require rereading the file.
With index available have also added indexing of subsets and optional
creation of spatial index.
Note: did try using QTextStream.pos to build a random access index -
this was incredibly slow. Have found using line based index is
reasonably fast even on quite large (50+Mb) text files.
* In the attributetable there was a mess with references and pointers, originating from 66fadee8ef.
* QgsVectorLayerCache did sometimes cache features which did not contain all information which needs to be cached and therefore corrupting the cache and leading to incomplete cache hits.
* Add a unit test for the cache problem
* Fix QgsCacheIndexFeatureId
* QgsAbstractCacheIndex::getCacheIterator now produces a QgsFeatureIterator (instead of a list of Feature Ids). This allows to combine a mixed response, partly satisfied by the cache and partly by an additional query to the backend.
Regular expression delimiter: fixed non-intuitive behaviour of not
including capture groups in the returned fields, and improved behaviour
for anchored regular expressions. Added test cases for handling of
regular expressions.
File encoding: Selected file encoding was being ignored. Fixed and
added test cases for file encoding.
Bad formatted quoting: Fixed handling of badly formatted quotes (eg
unclosed quotes). Added test case.
Field names: Where a file had duplicate or blank field names it was
not possible to reliably set the names of X,Y,WKT fields. Relocated
field name handling to simpler common code in QgsDelimitedTextFile, with
automatic renaming of fields with ambiguous or missing names. Add test
case for field renaming
User interface fixes: Fixed tooltip and other messages throughout.
Changed encoding combo box to be alphabetically sorted. Fixed data
sample to be refreshed when encoding changed.