4

I would know if there's a way to export qgis data to mapserver (Mapfile). In previous version of Qgis there was a plugin called "Export to Mapserver", now I can't find anything...

2 Answers 2

3

The plugin is still alive, now named RT mapserver exporter:

https://plugins.qgis.org/plugins/rt_mapserver_exporter/

To get it, you need to allow for experimental plugins, and you need the python-mapscript package on Linux (part of the ubuntugis mapserver package), or the mapscript-python package from OSGEO4W on Windows.

If you run into troubles, see QGis 2.0.1 mapserver extension missing

2
  • Be aware that mapfiles created by this plugin do not work straight ahead for MapServer 6.x and there will probably be more problems with MapServer 7.x. They are still usable as templates. But if you have used the plugin before this is no news for you.
    – user30184
    Commented Feb 24, 2015 at 21:29
  • Caution: after you install the plugin, you can find it under "Web->RT MapServer exporter". Commented Sep 12, 2015 at 21:44
0

I don't find a way to install python-mapscript package (and I suppose it is already installed, because with osgeo4w setup rerun it says that no package are missing). Anyway when I run the plugin RT mapserver exporter, this is the error:

Errore durante l'esecuzione di codice Python:

Traceback (most recent call last): File "C:/Documents and Settings/Administrator/.qgis2/python/plugins\rt_mapserver_exporter\plugin.py", line 65, in run from .mapfileexportdlg import MapfileExportDlg File "C:/PROGRA~1/QGISBR~1/apps/qgis/./python\qgis\utils.py", line 460, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Documents and Settings/Administrator/.qgis2/python/plugins\rt_mapserver_exporter\mapfileexportdlg.py", line 30, in import mapscript File "C:/PROGRA~1/QGISBR~1/apps/qgis/./python\qgis\utils.py", line 460, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: No module named mapscript

Versione Python: 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]

Versione di QGIS: 2.6.1-Brighton Brighton, e2a51df

Percorso Python: ['C:/PROGRA~1/QGISBR~1/apps/qgis/./python/plugins\processing', 'C:/PROGRA~1/QGISBR~1/apps/qgis/./python', u'C:/Documents and Settings/Administrator/.qgis2/python', u'C:/Documents and Settings/Administrator/.qgis2/python/plugins', 'C:/PROGRA~1/QGISBR~1/apps/qgis/./python/plugins', 'C:\Programmi\ArcGIS\bin', 'C:\PROGRA~1\QGISBR~1\bin\python27.zip', 'C:\PROGRA~1\QGISBR~1\apps\Python27\DLLs', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\plat-win', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\lib-tk', 'C:\PROGRA~1\QGISBR~1\bin', 'C:\PROGRA~1\QGISBR~1\apps\Python27', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\site-packages', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\site-packages\PIL', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\site-packages\jinja2-2.7.2-py2.7.egg', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\site-packages\markupsafe-0.23-py2.7-win32.egg', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\site-packages\python_dateutil-2.2-py2.7.egg', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\site-packages\pytz-2014.2-py2.7.egg', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\site-packages\win32', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\site-packages\win32\lib', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\site-packages\Pythonwin', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\site-packages\Shapely-1.2.18-py2.7-win32.egg', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\site-packages\six-1.6.1-py2.7.egg', 'C:\PROGRA~1\QGISBR~1\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\Documents and Settings\Administrator\.qgis2\python\plugins\MetaSearch\ext-libs', 'C:\PROGRA~1\QGISBR~1\apps\qgis\python\plugins\fTools\tools']

1
  • 1
    This should rather be a comment than an answer. In OSGEO4W, the package is called mapscript-python, and you can see it under advanced install.
    – AndreJ
    Commented Feb 25, 2015 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.