[GRASS-dev] [GRASS GIS] #1328: v.in.ogr: bogus table connection created when input Shapefile has spaces in it's name

#1328: v.in.ogr: bogus table connection created when input Shapefile has spaces in
it's name
----------------------+-----------------------------------------------------
Reporter: msieczka | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.1
Component: Vector | Version: svn-releasebranch64
Keywords: | Platform: All
      Cpu: All |
----------------------+-----------------------------------------------------
Debian, releasebranch_6_4 r45717.

Import the attached "a a.shp":

{{{
$ v.in.ogr dsn=a\ a.shp output=b
}}}

Try some operation on it - e.g:

{{{
$ v.info -c b
Displaying column types/names for database connection of layer 1:
DBMI-DBF driver error:
Cannot create dbf database: cat /home/grassdata/spearfish60/PERMANENT/dbf/

ERROR: Unable to open database <cat
        /home/grassdata/spearfish60/PERMANENT/dbf/> by driver <d
}}}

That's because the table link is bogus:

{{{
$ v.db.connect -p b
Vector map <b@PERMANENT> is connected by:
layer <1> table <a> in database <cat
/home/grassdata/spearfish60/PERMANENT/dbf/> through driver <dbf> with key
<b>
}}}

which should rather be:

{{{
layer <1> table <b> in database
</home/grassdata/spearfish60/PERMANENT/dbf/> through driver <dbf> with key
<cat>
}}}

The respective dbln file contains:

{{{
1/a a b cat $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/ dbf
}}}

(Mind the "a a" above, derived from input Shapefile layer name.)

Does GRASS allow spaces in layer names? If so, maybe use a different
separator in dbln's?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1328&gt;
GRASS GIS <http://grass.osgeo.org>

#1328: v.in.ogr: bogus table connection created when input Shapefile has spaces in
it's name
----------------------+-----------------------------------------------------
Reporter: msieczka | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.1
Component: Vector | Version: svn-releasebranch64
Keywords: | Platform: All
      Cpu: All |
----------------------+-----------------------------------------------------

Comment(by hamish):

see #809.

the dbln file field sep in grass7 has been changed to '|' from space.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1328#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1328: v.in.ogr: bogus table connection created when input Shapefile has spaces in
it's name
----------------------+-----------------------------------------------------
Reporter: msieczka | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.4
Component: Vector | Version: svn-releasebranch64
Keywords: | Platform: All
      Cpu: All |
----------------------+-----------------------------------------------------
Changes (by neteler):

  * milestone: 6.4.1 => 6.4.4

Comment:

Replying to [comment:1 hamish]:
> see #809.
>
> the dbln file field sep in grass7 has been changed to '|' from space.

Since we cannot change the dbln format in GRASS 6, this looks like
"wontfix".

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1328#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1328: v.in.ogr: bogus table connection created when input Shapefile has spaces in
it's name
----------------------+-----------------------------------------------------
Reporter: msieczka | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.4
Component: Vector | Version: svn-releasebranch64
Keywords: | Platform: All
      Cpu: All |
----------------------+-----------------------------------------------------

Comment(by mmetz):

Replying to [comment:2 neteler]:
> Replying to [comment:1 hamish]:
> > see #809.
> >
> > the dbln file field sep in grass7 has been changed to '|' from space.
>
> Since we cannot change the dbln format in GRASS 6, this looks like
"wontfix".

Fixed in 6.5 r52755 by replacing whitespace with underscore in the GRASS
layer name. Works for me with shapefiles with whitespace in the name.
Backport to 6.4?

Markus M

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1328#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1328: v.in.ogr: bogus table connection created when input Shapefile has spaces in
it's name
----------------------+-----------------------------------------------------
Reporter: msieczka | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.4
Component: Vector | Version: svn-releasebranch64
Keywords: | Platform: All
      Cpu: All |
----------------------+-----------------------------------------------------

Comment(by mmetz):

Replying to [comment:3 mmetz]:
> Replying to [comment:2 neteler]:
> > Replying to [comment:1 hamish]:
> > > see #809.
> > >
> > > the dbln file field sep in grass7 has been changed to '|' from
space.
> >
> > Since we cannot change the dbln format in GRASS 6, this looks like
"wontfix".
>
> Fixed in 6.5 r52755 by replacing whitespace with underscore in the GRASS
layer name. Works for me with shapefiles with whitespace in the name.
Backport to 6.4?

Whitespace support in OGR dsn and OGR layer names has been backported to
6.4 in r52765.

Markus M

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1328#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1328: v.in.ogr: bogus table connection created when input Shapefile has spaces in
it's name
-----------------------+----------------------------------------------------
  Reporter: msieczka | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.4
Component: Vector | Version: svn-releasebranch64
Resolution: fixed | Keywords:
  Platform: All | Cpu: All
-----------------------+----------------------------------------------------
Changes (by mmetz):

  * status: new => closed
  * resolution: => fixed

Comment:

Closing ticket.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1328#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>