[GRASS-dev] [GRASS GIS] #2692: v.in.ascii does not handle text in qoutes

GRASS GIS trac at osgeo.org
Sun Jun 14 05:18:09 PDT 2015


#2692: v.in.ascii does not handle text in qoutes
-------------------------+-------------------------------------------------
  Reporter:  wenzeslaus  |      Owner:  grass-dev@…
      Type:  defect      |     Status:  new
  Priority:  normal      |  Milestone:  7.0.1
 Component:  Default     |    Version:  svn-trunk
Resolution:              |   Keywords:  CSV, doublequote, singlequote, text
       CPU:              |  delimiter
  Unspecified            |   Platform:  Unspecified
-------------------------+-------------------------------------------------

Comment (by mlennert):

 Replying to [comment:1 mlennert]:
 > Replying to [ticket:2692 wenzeslaus]:
 > > Since r63581 G7:v.in.ascii should be able to handle "CSV with quoted
 text fields" (`text` option) but the quotes are stored to the database.
 This is the result from `v.db.select` (same thing in `sqliteman`):
 > >
 > > {{{
 > > 100|437343.6704|4061363.41525|"High Erosion"|"Low Deposition"
 > > }}}
 > >
 >
 > IIUC, this comes from
 [https://trac.osgeo.org/grass/browser/grass/trunk/lib/gis/token.c#L107
 this part of lib/gis/token.c]. The p++ just advances the pointer like for
 any other character. I guess that in order to skip it, one would have to
 create a second pointer which takes a copy of the first, but advances only
 when the first one is not equal to the character you want to eliminate. Or
 something like that. But my pointer foo is much too low to handle this
 directly. Anyone more C-savy who could do this in 5 minutes ?

 The attached patch seems to solve the problem for me, but it feels like a
 quick fix and there probably is a better way...

 Moritz

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2692#comment:2>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list