#222: v.in gns broken in grass 7.0 trunk
----------------------+-----------------------------------------------------
Reporter: gisix | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.3.1
Component: Vector | Version: svn-trunk
Keywords: v.in.gns | Platform: Linux
Cpu: x86-32 |
----------------------+-----------------------------------------------------
v.in.gns aborts when applied to a country file:
GRASS 7.0.svn (wgs84_4326):~/gns > v.in.gns --overwrite file=ce.txt
vect=sri
Converted 36554 place names.
WARNUNG: Vector map <sri> already exists and will be overwritten
Scanning input for column types...
Current row:
'RC;UFI;UNI;LAT;LONG;DMS_LAT;DMS_LONG;MGRS;JOG;FC;DSG;PC;CC1;ADM1;ADM2;POP;ELEV;CC2;NT;LC;SHORT_FORM;GENERIC;SORT_NAME;FULL_NAME;FULL_NAME_ND;MODIFY_DATE'
FEHLER: Unparsable latitude value in column <3>: LAT
FEHLER: Unable to open vector map <sri@gns> on topology level 2
#222: v.in gns broken in grass 7.0 trunk
---------------------+------------------------------------------------------
Reporter: gisix | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.3.1
Component: Vector | Version: svn-trunk
Resolution: | Keywords: v.in.gns
Platform: Linux | Cpu: x86-32
---------------------+------------------------------------------------------
Old description:
v.in.gns aborts when applied to a country file:
GRASS 7.0.svn (wgs84_4326):~/gns > v.in.gns --overwrite file=ce.txt
vect=sri
Converted 36554 place names.
WARNUNG: Vector map <sri> already exists and will be overwritten
Scanning input for column types...
Current row:
'RC;UFI;UNI;LAT;LONG;DMS_LAT;DMS_LONG;MGRS;JOG;FC;DSG;PC;CC1;ADM1;ADM2;POP;ELEV;CC2;NT;LC;SHORT_FORM;GENERIC;SORT_NAME;FULL_NAME;FULL_NAME_ND;MODIFY_DATE'
FEHLER: Unparsable latitude value in column <3>: LAT
FEHLER: Unable to open vector map <sri@gns> on topology level 2
New description:
v.in.gns aborts when applied to a country file:
{{{
GRASS 7.0.svn (wgs84_4326):~/gns > v.in.gns --overwrite file=ce.txt
vect=sri
Converted 36554 place names.
WARNUNG: Vector map <sri> already exists and will be overwritten
Scanning input for column types...
Current row:
'RC;UFI;UNI;LAT;LONG;DMS_LAT;DMS_LONG;MGRS;JOG;FC;DSG;PC;CC1;ADM1;ADM2;POP;ELEV;CC2;NT;LC;SHORT_FORM;GENERIC;SORT_NAME;FULL_NAME;FULL_NAME_ND;MODIFY_DATE'
FEHLER: Unparsable latitude value in column <3>: LAT
FEHLER: Unable to open vector map <sri@gns> on topology level 2
}}}
{{{
GRASS 7.0.svn (wgs84_4326):~/gns > v.in.gns --overwrite file=ce.txt
vect=sri
Converted 36554 place names.
WARNUNG: Vector map <sri> already exists and will be overwritten
Scanning input for column types...
Current row:
'RC;UFI;UNI;LAT;LONG;DMS_LAT;DMS_LONG;MGRS;JOG;FC;DSG;PC;CC1;ADM1;ADM2;POP;ELEV;CC2;NT;LC;SHORT_FORM;GENERIC;SORT_NAME;FULL_NAME;FULL_NAME_ND;MODIFY_DATE'
FEHLER: Unparsable latitude value in column <3>: LAT
FEHLER: Unable to open vector map <sri@gns> on topology level 2
}}}
New description:
v.in.gns aborts when applied to a country file:
{{{
GRASS 7.0.svn (wgs84_4326):~/gns > v.in.gns --overwrite file=ce.txt
vect=sri
Converted 36554 place names.
WARNUNG: Vector map <sri> already exists and will be overwritten
Scanning input for column types...
Current row:
'RC;UFI;UNI;LAT;LONG;DMS_LAT;DMS_LONG;MGRS;JOG;FC;DSG;PC;CC1;ADM1;ADM2;POP;ELEV;CC2;NT;LC;SHORT_FORM;GENERIC;SORT_NAME;FULL_NAME;FULL_NAME_ND;MODIFY_DATE'
FEHLER: Unparsable latitude value in column <3>: LAT
FEHLER: Unable to open vector map <sri@gns> on topology level 2
}}}
Comment:
(milestone tag fixed)
I am not sure how to address this problem if the GNS format is a moving
target...
> v.in.gns aborts when applied to a country file:
>
> {{{
> GRASS 7.0.svn (wgs84_4326):~/gns > v.in.gns --overwrite file=ce.txt
> vect=sri
> Converted 36554 place names.
> WARNUNG: Vector map <sri> already exists and will be overwritten
> Scanning input for column types...
> Current row:
> 'RC;UFI;UNI;LAT;LONG;DMS_LAT;DMS_LONG;MGRS;JOG;FC;DSG;PC;CC1;ADM1;ADM2;POP;ELEV;CC2;NT;LC;SHORT_FORM;GENERIC;SORT_NAME;FULL_NAME;FULL_NAME_ND;MODIFY_DATE'
> FEHLER: Unparsable latitude value in column <3>: LAT
> FEHLER: Unable to open vector map <sri@gns> on topology level 2
> }}}
New description:
v.in.gns aborts when applied to a country file:
{{{
GRASS 7.0.svn (wgs84_4326):~/gns > v.in.gns --overwrite file=ce.txt
vect=sri
Converted 36554 place names.
WARNUNG: Vector map <sri> already exists and will be overwritten
Scanning input for column types...
Current row:
'RC;UFI;UNI;LAT;LONG;DMS_LAT;DMS_LONG;MGRS;JOG;FC;DSG;PC;CC1;ADM1;ADM2;POP;ELEV;CC2;NT;LC;SHORT_FORM;GENERIC;SORT_NAME;FULL_NAME;FULL_NAME_ND;MODIFY_DATE'
FEHLER: Unparsable latitude value in column <3>: LAT
FEHLER: Unable to open vector map <sri@gns> on topology level 2
}}}
Comment:
(milestone tag fixed)
I am not sure how to address this problem if the GNS format is a moving
target...
Is this the shell version or the Python version?
AFAICT, the Python version will never copy the first row to the
temporary file passed to v.in.ascii, regardless of its contents. Also,
the temporary file should always match the original hard-coded schema,
regardless of the schema used by the input data.
[The reason for this is that the test file which I used for testing
didn't match the original hard-coded schema.]
In retrospect, it would probably be better to import the data verbatim
(i.e. with the schema from the first row of the file), and simply
adjust v.in.ascii's x= and y= parameters to match the file.