Opened 12 years ago
Last modified 5 years ago
#4397 closed defect
issue in StringList serialization — at Version 2
Reported by: | esseffe | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | closed_because_of_github_migration |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | a.furieri@…, Kyle Shannon |
Description (last modified by )
Hi Even,
so standing things there is a strong inconsistency in the SQLite [output] driver implementation.
I'll actually find several "serialized" values in any SpatiaLite DB created by ogr2ogr, and I'm completely unable to parse such values in a safe and consistent way. that's not all, such "serialized" values could be actually truncated, and there is no way to understand if some truncation occurred when readind the DB. Sorry, I didn't noticed this further issue. So, such "serialized" values into the DB are irremediably useless.
On the other side I notice that the SHP driver completely omits to create any attribute/column of the StringList, IntegerList or RealList type: may be this one could be a better (and more consistent) design choice for the SQLite driver as well ?
by Sandro
Change History (3)
by , 12 years ago
Attachment: | comma-patch.zip added |
---|
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Description: | modified (diff) |
---|
I'm not convinced that this patch is really usefull. There's a risk of confusion between items in the list that are empty, which would also serialized as "" . But the main objection is that you shouldn't rely on GetFieldAsString() to get a string list, because in the case of lists, GetFieldAsString() limits the output to char szTempBuffer[TEMP_BUFFER_SIZE], that is to say 80 bytes. So the best approach is to use GetFieldAsStringList().