[GRASS-dev] [GRASS GIS] #1438: g.remove cannot remove vector map

#1438: g.remove cannot remove vector map
-------------------------+--------------------------------------------------
Reporter: arencambre | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone:
Component: Vector | Version: unspecified
Keywords: | Platform: MSWindows 7
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
I have a vector map named '''pointdata'''. I can confirm this because if I
run '''v.in.ogr''' against a PostGIS database with '''output''' set to
'''pointdata''', the command's output is:
'''ERROR: Vector map <pointdata> already exists'''

Yet when I run '''g.remove pointdata''', I get:
'''Removing raster <pointdata>
Raster map <pointdata> not found
<pointdata> nothing removed'''

But then you may say, "Hey, moron, that's a vector layer! Use the right
command." OK, I ran '''g.remove vect=pointdata''' and I get:
'''Removing vector <pointdata>
DBMI-DBF driver error:
Unable to open database <cat C:\Users\Aren Cambre\Desktop\DEEM
documents\GRASS\DallasCountyCrashes\Crases2\dbf\> by driver <dbf>
Unable open database <cat C:\Users\Aren Cambre\Desktop\DEEM
documents\GRASS\DallasCountyCrashes\Crases2\dbf\> by driver <dbf>
Unable to find table <crash> linked to vector map <pointdata>
couldn't be removed
<pointdata> nothing removed'''

I've attached a copy of the mapset in concern.

This is for GRASS GIS 6.4.1 (that option not available in the
'''Version''' dropdown).

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

#1438: g.remove cannot remove vector map
--------------------------+-------------------------------------------------
  Reporter: arencambre | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone:
Component: Vector | Version: unspecified
Resolution: duplicate | Keywords:
  Platform: MSWindows 7 | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by arencambre):

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

Comment:

Duplicates #1158.

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

#1438: g.remove cannot remove vector map
--------------------------+-------------------------------------------------
  Reporter: arencambre | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone:
Component: Vector | Version: 6.4.1
Resolution: | Keywords:
  Platform: MSWindows 7 | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by arencambre):

  * status: closed => reopened
  * version: unspecified => 6.4.1
  * resolution: duplicate =>

Comment:

Un-marking this as duplicate because #1158 appears to be about something
else.

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

#1438: g.remove cannot remove vector map because of space in DB layer name
--------------------------+-------------------------------------------------
  Reporter: arencambre | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone:
Component: Database | Version: 6.4.1
Resolution: | Keywords: dbln, g.remove, layer name
  Platform: MSWindows 7 | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by hamish):

  * keywords: => dbln, g.remove, layer name
  * component: Vector => Database

Comment:

Hi,

your vector/pointdata/dbln file looks like this:

{{{
1/raw.TxDOT crash pointdata cat $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/ dbf
}}}

the layer name (raw.TxDOT crash) is not allowed to have a space in it with
GRASS 6. In GRASS 7 the separator becomes a "|" instead of a space so they
are allowed there. GRASS 6 can read dbln files with "|" as the fields
separator, so you might try to edit it by hand to:

{{{
1/raw.TxDOT crash|pointdata|cat|$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/|dbf
}}}

Hamish

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

#1438: g.remove cannot remove vector map because of space in DB layer name
--------------------------+-------------------------------------------------
  Reporter: arencambre | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone:
Component: Database | Version: 6.4.1
Resolution: | Keywords: dbln, g.remove, layer name
  Platform: MSWindows 7 | Cpu: Unspecified
--------------------------+-------------------------------------------------

Comment(by hamish):

(or rename the layer name to use an underscore instead of a space:
"raw.TxDOT_crash")

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

#1438: g.remove cannot remove vector map because of space in DB layer name
--------------------------+-------------------------------------------------
  Reporter: arencambre | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone:
Component: Database | Version: 6.4.1
Resolution: | Keywords: dbln, g.remove, layer name
  Platform: MSWindows 7 | Cpu: Unspecified
--------------------------+-------------------------------------------------

Comment(by hamish):

So the trouble was that v.in.ogr was not checking for sql-compliant layer
naming?

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

#1438: g.remove cannot remove vector map because of space in DB layer name
--------------------------+-------------------------------------------------
  Reporter: arencambre | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 6.4.4
Component: Database | Version: 6.4.1
Resolution: | Keywords: dbln, g.remove, layer name
  Platform: MSWindows 7 | Cpu: Unspecified
--------------------------+-------------------------------------------------
Changes (by neteler):

  * milestone: => 6.4.4

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

#1438: g.remove cannot remove vector map because of space in DB layer name
--------------------------+-------------------------------------------------
  Reporter: arencambre | Owner: grass-dev@…
      Type: defect | Status: reopened
  Priority: normal | Milestone: 6.4.4
Component: Database | Version: 6.4.1
Resolution: | Keywords: dbln, g.remove, layer name
  Platform: MSWindows 7 | Cpu: Unspecified
--------------------------+-------------------------------------------------

Comment(by neteler):

Replying to [comment:3 hamish]:
> Hi,
>
> your vector/pointdata/dbln file looks like this:
>
> {{{
> 1/raw.TxDOT crash pointdata cat $GISDBASE/$LOCATION_NAME/$MAPSET/dbf/
dbf
> }}}
>
> the layer name (raw.TxDOT crash) is not allowed to have a space in it
> with GRASS 6. In GRASS 7 the separator becomes a "|" instead of a space
> so they are allowed there.

So that looks like "wontfix" for GRASS 6 (since we cannot change the
format)
and "already solved" in GRASS 7?

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