Opened 13 years ago

Last modified 8 years ago

#1438 reopened defect

g.remove cannot remove vector map because of space in DB layer name

Reported by: arencambre Owned by: grass-dev@…
Priority: normal Milestone: 6.4.6
Component: Database Version: 6.4.1
Keywords: dbln, g.remove, layer name Cc: aren@…
CPU: Unspecified Platform: MSWindows 7

Description

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).

Attachments (1)

Crashes2.zip (3.5 KB ) - added by arencambre 13 years ago.

Download all attachments as: .zip

Change History (9)

by arencambre, 13 years ago

Attachment: Crashes2.zip added

comment:1 by arencambre, 13 years ago

Resolution: duplicate
Status: newclosed

Duplicates #1158.

comment:2 by arencambre, 13 years ago

Resolution: duplicate
Status: closedreopened
Version: unspecified6.4.1

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

comment:3 by hamish, 12 years ago

Component: VectorDatabase
Keywords: dbln g.remove layer name added
Summary: g.remove cannot remove vector mapg.remove cannot remove vector map because of space in DB layer name

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

comment:4 by hamish, 12 years ago

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

comment:5 by hamish, 11 years ago

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

comment:6 by neteler, 11 years ago

Milestone: 6.4.4

in reply to:  3 comment:7 by neteler, 10 years ago

Replying to 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?

comment:8 by neteler, 8 years ago

Milestone: 6.4.46.4.6
Note: See TracTickets for help on using tickets.