Opened 21 years ago
Last modified 9 years ago
#372 closed defect
OGR/OGDI: All (?) string column field lengths shortened by 1 character — at Initial Version
Reported by: | Owned by: | warmerdam | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | krbaker@…, Mateusz Łoskot |
Description
Frank, after digging around with the extraction of political boundaries from VMAP0, I discovered, that the column length are not correct. id: Integer (10.0) f_code: String (5.0) nam: String (64.0) na2: String (2.0) na3: String (1.0) tile_id: Integer (5.0) fac_id: Integer (10.0) At least the column 'na2' is one character too short. This works however (extraction of Botswana): ogrinfo -ro -where "na2 = ' BC'" gltp:/vrf/grass0/warmerdam/v0soa/vmaplv0/soamafr 'polbnda@bnd(*)_area' INFO: Open of `gltp:/vrf/grass0/warmerdam/v0soa/vmaplv0/soamafr' using driver `OGDI' successful. Layer name: polbnda@bnd(*)_area Geometry: Polygon Feature Count: 10 Layer SRS WKT: GEOGCS["NAD83", [...] while this fails: ogrinfo -ro -where "na2 = ' B'" gltp:/vrf/grass0/warmerdam/v0soa/vmaplv0/soamafr 'polbnda@bnd(*)_area' INFO: Open of `gltp:/vrf/grass0/warmerdam/v0soa/vmaplv0/soamafr' using driver `OGDI' successful. Layer name: polbnda@bnd(*)_area Geometry: Polygon Feature Count: 0 Layer SRS WKT: [...] It should be a 3 chars string just to be able to store UNK = No entry present When exporting to SHAPE, and then using ARCExplorer, one character in the 'na2' column is lost. To fetch the USA from NOAMER, I have to run ogrinfo -ro -where "na2 = ' US'" gltp:/vrf/grass0/warmerdam/v0noa/vmaplv0/noamer 'polbnda@bnd(*)_area' The bug may also be related to the fact, that the columns f_code, nam, na2, na3 start with a white space. Maybe the reading of the string is shifted by one character. Hope it is easy to fix. Thanks, Markus
Note:
See TracTickets
for help on using tickets.