[GRASS-dev] Re: [GRASS GIS] #222: v.in gns broken in grass 7.0 trunk

Glynn Clements glynn at gclements.plus.com
Tue Oct 21 07:49:46 EDT 2008


GRASS GIS wrote:

> #222: v.in gns broken in grass 7.0 trunk
> ---------------------+------------------------------------------------------
>   Reporter:  gisix   |       Owner:  gisix    
>       Type:  defect  |      Status:  assigned 
>   Priority:  major   |   Milestone:  7.0.0    
>  Component:  Vector  |     Version:  svn-trunk
> Resolution:          |    Keywords:  v.in.gns 
>   Platform:  Linux   |         Cpu:  x86-32   
> ---------------------+------------------------------------------------------
> Changes (by neteler):
> 
>   * milestone:  6.3.1 => 7.0.0
> 
> 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 at 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 at 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.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list