[Gfoss] Problema Mapserver

Amedeo Fadini amefad a gmail.com
Ven 30 Ott 2015 13:04:11 CET


l'errore python dice che manca il modulo _mapscript, ma non ti so dire
come installarlo in windows, se lo trovi basta copiarlo nella cartella
di python sotto windows.

l'altro errore è dato dalla web application e manca appunto un
template nella sezione WEB del tuo file. ms4w dovrebbe installare
pmapper con un map file di esempio da cui puoi copiare un template.

vado a memoria e sono da cell

dallo shapepath pare che il tuo shapefile è salvato in c:\
ne_10m_admin_0_countries.shp è corretto?

amefad

2015-10-29 19:02 GMT+01:00 Sandrus <sandro.picone a yahoo.it>:
> Scusate, adesso dovrei essere iscritto
>
> Salve a tutti,
> mi accingo adesso a lavorare con Mapserver, sono ancora parecchio inesperto
> su vari fronti, spero siate clementi.
> Ho vari problemi:
> 1) Non riesco ad usare il plugin di QGIS MapServer Exporter, il quale
> dovrebbe esportare in formato .map gli shape file creati con Qgis. L'errore
> risulta essere questo:
> Errore durante l'esecuzione di codice Python:
>
> Traceback (most recent call last):
> File "C:/Users/S/.qgis2/python/pluginsrt_mapserver_exporterplugin.py", line
> 65, in run
> from .mapfileexportdlg import MapfileExportDlg
> File "C:/PROGRA~1/QGISWI~1/apps/qgis/./pythonqgisutils.py", line 478, in
> _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File
> "C:/Users/S/.qgis2/python/pluginsrt_mapserver_exportermapfileexportdlg.py",
> line 30, in
> import mapscript
> File "C:/PROGRA~1/QGISWI~1/apps/qgis/./pythonqgisutils.py", line 478, in
> _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File "C:PROGRA~1QGISWI~1appsPython27libsite-packagesmapscript.py", line 25,
> in
> _mapscript = swig_import_helper()
> File "C:PROGRA~1QGISWI~1appsPython27libsite-packagesmapscript.py", line 17,
> in swig_import_helper
> import _mapscript
> File "C:/PROGRA~1/QGISWI~1/apps/qgis/./pythonqgisutils.py", line 478, in
> _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> ImportError: No module named _mapscript
>
> Versione Python:
> 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]
>
> Versione di QGIS:
> 2.8.1-Wien Wien, exported
>
> Percorso Python: ['C:/Users/S/.qgis2/python/pluginsprocessing',
> 'C:/PROGRA~1/QGISWI~1/apps/qgis/./python', u'C:/Users/S/.qgis2/python',
> u'C:/Users/S/.qgis2/python/plugins',
> 'C:/PROGRA~1/QGISWI~1/apps/qgis/./python/plugins',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagesmatplotlib-1.3.1-py2.7-win-amd64.egg',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagesnose-1.3.3-py2.7.egg',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagestornado-4.0.1-py2.7-win-amd64.egg',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagesbackports.ssl_match_hostname-3.4.0.2-
> py2.7.egg',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagescertifi-14.05.14-py2.7.egg',
> 'C:PROGRA~1QGISWI~1binpython27.zip', 'C:PROGRA~1QGISWI~1appsPython27DLLs',
> 'C:PROGRA~1QGISWI~1appsPython27lib',
> 'C:PROGRA~1QGISWI~1appsPython27libplat-win',
> 'C:PROGRA~1QGISWI~1appsPython27liblib-tk', 'C:PROGRA~1QGISWI~1bin',
> 'C:PROGRA~1QGISWI~1appsPython27',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packages',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagesPIL',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagesjinja2-2.7.2-py2.7.egg',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagesmarkupsafe-0.23-py2.7-win-amd64.egg',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagespytz-2012j-py2.7.egg',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packageswin32',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packageswin32lib',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagesPythonwin',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagesShapely-1.2.18-py2.7-win-amd64.egg',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagessix-1.3.0-py2.7.egg',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packageswx-2.8-msw-unicode',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagesxlrd-0.9.2-py2.7.egg',
> 'C:PROGRA~1QGISWI~1appsPython27libsite-packagesxlwt-0.7.5-py2.7.egg',
> u'C:/Users/S/.qgis2//python', 'C:UsersS.qgis2pythonpluginsmmqgis/forms',
> 'C:PROGRA~1QGISWI~1appsqgispythonpluginsfToolstools']
>
> Ho cercato nei forum di capire il perché di questo errore Python ma non ne
> sono venuto a capo, per questo chiedo a voi.
> In alternativa c'è un altro modo per creare dei file .map a partire da shape
> file già esistenti?
>
> 2)Ho scaricato, almeno credo, tutto quello che c'era da scaricare: ms4w,
> apache, ecc. Il test http://localhost/cgi-bin/mapserv.exe? dà esito
> positivo: No query information to decode. QUERY_STRING is set, but empty.
> Quando provo a visualizzare un file .map qualsiasi però non riesco a farlo,
> cioè il test "shp2img –m mappa.map –o immagine.png" non va (shp2img non
> riconosciuto), eppure c'è una cartella.
> Allo stesso modo se inserisco nel browser
> "http://localhost/cgi-bin/mapserv.exe?map=c:/mapserver_quickstart.map" la
> risposta è: mapserv(): Web application error. Traditional BROWSE mode
> requires a TEMPLATE in the WEB section, but none was provided.
>
> Il file .map che vorrei testare é:
> MAP
> NAME "MAPSERVER QUICKSTART"
> EXTENT -137 29 -53 88
> UNITS DD
> SHAPEPATH "c:/"
> SIZE 800 600
>
> IMAGETYPE PNG24
>
> PROJECTION
> "init=epsg:4326"
> END
>
> WEB
> METADATA
> ows_enable_request "*"
> END
> END
>
> LAYER
> NAME "Admin Countries"
> STATUS ON
> TYPE POLYGON
> DATA "ne_10m_admin_0_countries"
> CLASS
> STYLE
> COLOR 246 241 223
> OUTLINECOLOR 0 0 0
> END
> END
> END
>
> END
>
> Dove sbaglio?
> Probabilmente non sono stato chiaro perché non sono ancora del tutto chiari
> a me i vari passaggi svolti, grazie alle vostre eventuali risposte riuscirò
> sicuramente a ricostruire il tutto.
>
> Vi ringrazio,
>
> Sandro
>
>
>
> --
> View this message in context: http://gfoss-geographic-free-and-open-source-software-italian-mailing.3056002.n2.nabble.com/Problema-Mapserver-tp7594727p7594750.html
> Sent from the Gfoss -- Geographic Free and Open Source Software - Italian mailing list mailing list archive at Nabble.com.
> _______________________________________________
> Gfoss a lists.gfoss.it
> http://lists.gfoss.it/cgi-bin/mailman/listinfo/gfoss
> Questa e' una lista di discussione pubblica aperta a tutti.
> I messaggi di questa lista non hanno relazione diretta con le posizioni dell'Associazione GFOSS.it.
> 786 iscritti al 30.9.2015


Maggiori informazioni sulla lista Gfoss