mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
Fixed test script to actually use the cli args that are passed to it git-svn-id: http://svn.osgeo.org/qgis/trunk@7432 c8812cc2-4d05-0410-92ff-de0c093fc19c
32 lines
1.6 KiB
Python
Executable File
32 lines
1.6 KiB
Python
Executable File
#!/usr/bin/python
|
|
#***************************************************************************
|
|
# test_export.py
|
|
# --------------------------------------
|
|
# Date : Sun Sep 16 12:34:29 AKDT 2007
|
|
# Copyright : (C) 2007 by Gary E. Sherman
|
|
# Email : sherman at mrcc dot com
|
|
#***************************************************************************
|
|
#* *
|
|
#* This program is free software; you can redistribute it and/or modify *
|
|
#* it under the terms of the GNU General Public License as published by *
|
|
#* the Free Software Foundation; either version 2 of the License, or *
|
|
#* (at your option) any later version. *
|
|
#* *
|
|
#***************************************************************************/
|
|
|
|
|
|
# Test script to export a sample QGIS project file to mapserver
|
|
# No template of header/footer information is included in the map file
|
|
# To change units, image type, name, and dimensions, modify the ex.setOptions line
|
|
#
|
|
import sys
|
|
import ms_export
|
|
if len(sys.argv) == 3:
|
|
ex = ms_export.Qgis2Map(sys.argv[1], sys.argv[2])
|
|
ex.setOptions( 'Meters', 'JPEG', 'TestMap', '800', '600', '', '', '')
|
|
ex.writeMapFile()
|
|
else:
|
|
print "Test script to export a QGIS project file to a MapServer map file"
|
|
print "Specify the QGIS project file and a file name for the map file to be created:"
|
|
print " text_export.py my_qgis_project.qgs my_output_map.map"
|