[Qgis-user] loading a project from the command line bug

Craig Leat craig.leat at gmail.com
Wed Dec 9 05:39:37 PST 2009


Ricardo wrote:
> I don't really know if opening .qgs files from the command line is a
> supported feature, but if it is, then this behaviour is probably a
> bug. If this feature is not supported, can I make a wish for it?
> Tested with QGis 1.3.0 stable and also with 1.4 (rev. 12337).

$ qgis --help
Quantum GIS - 1.3.0-Mimas 'Mimas' (exported)
Quantum GIS (QGIS) is a viewer for spatial data sets, including
raster and vector data.
Usage: /usr/bin/qgis.bin [options] [FILES]
  options:
	[--snapshot filename]	emit snapshot of loaded datasets to given file
	[--width width]	width of snapshot to emit
	[--height height]	height of snapshot to emit
	[--lang language]	use language for interface text
	[--project projectfile]	load the given QGIS project
	[--extent xmin,ymin,xmax,ymax]	set initial map extent
	[--nologo]	hide splash screen
	[--help]		this text

  FILES:
    Files specified on the command line can include rasters,
    vectors, and QGIS project files (.qgs):
     1. Rasters - Supported formats include GeoTiff, DEM
        and others supported by GDAL
     2. Vectors - Supported formats include ESRI Shapefiles
        and others supported by OGR and PostgreSQL layers using
        the PostGIS extension

$qgis MyPrj.qgs
This works.
$qgis --project MyPrj.qgs
This also works.

I find the above explanation a bit confusing. A QGIS project file can
appear as an argument to --project and can also appear in the list of
FILES. It would appear that the following is valid syntax:
$qgis --project MyFirstPrj.qgs MyRaster.tif MyVector.shp
MySecondPrj.qgs MyThirdPrj.qgs

I haven't tested this, but wonder if it would work and handle projects
with different projections? Well rasters in different projections are
definitely a problem.

Craig



More information about the Qgis-user mailing list