Bug report #2571

Path to GRASS vector map loses "vector/" in path string

Added by Markus Neteler about 14 years ago. Updated about 14 years ago.

Assignee:Lorenzo Masini
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:invalid
Crashes QGIS or corrupts data: Copied to github as #:12631


To access Quantum GIS environment from this console
use qgis.utils.iface object (instance of [[QgisInterface]] class).

>>> iface=qgis.utils.iface
>>> map=iface.mapCanvas()
>>> print map.layer(0).source()

the correct path to a GRASS vector layer would be including "vector/" in the string:


Note: for raster layers it is ok:

>>> print map.layer(1).source()

The omission of "vector/" in the string leads to troubles in ogr2ogr called by QGIS plugins.


#1 Updated by Redmine Admin about 14 years ago

  • Resolution set to invalid
  • Status changed from Open to Closed

layer.source() is internal data provider representation of data location. For GRASS vector provider it is GISBASE/LOCATION/MAPSET/MAP/LAYER_TYPE.

Expecting that layer.source should be a valid OGR DSN is just misunderstanding.

Warning: please don't try to change that format, it would break all old project files.

Also available in: Atom PDF