[Qgis-user] PyQgis MapServer Export with Mapserver 6.0.1

Richard Duivenvoorde rdmailings at duif.net
Mon Jan 30 05:51:28 PST 2012


Hi,

what exactly does not work? Do you see some message in the browser 
window if you use one of the url's that you see in the alert after 
creating a mapfile?

Two hints:
- either put a valid fonts.txt and symbols.sym in the fonts and symbols 
dir next to mapserv, OR put a # in front of those lines so they are ignored
- mapserver 6.x has some changes in STYLE-syntax, of which I'm not sure 
of the plugin is aware of that
- although the export plugin is only working with 'old symbology' in 
QGIS, you can always instruct QGIS to use 'old symbology' (in style dialog).

But please pass on the errors that you see in the browser window

Regards,

Richard Duivenvoorde

On 01/30/2012 01:37 PM, Francesc CaƱas wrote:
> Hi,
> I've created a map file with the PyQgis Mapserver export pluggin but it
> doesn't work. They tell me it's cause the plugguin it's for older versions
> of mapserver. (I have the 6.0.1)
> What changes I have to do in the .map file to makes it work?
>
> Thanks!
>
>
> Map code:
>
> # Map file created from QGIS project file
> C:/Users/Francesc/Documents/Projectes_CAT_wgs.qgs
> # Edit this file to customize for your map interface
> # (Created with PyQgis MapServer Export plugin)
> MAP
>    NAME "Projectes Auma UTM31"
>    # Map image size
>    SIZE 100 100
>    UNITS dd
>
>    EXTENT -9.569062 32.926808 6.763360 44.857479
>    FONTSET './fonts/fonts.txt'
>    SYMBOLSET './symbols/symbols.sym'
>    PROJECTION
>      'proj=longlat'
>      'datum=WGS84'
>      'no_defs'
>    END
>
>    # Background color for the map canvas -- change as desired
>    IMAGECOLOR 255 255 255
>    IMAGEQUALITY 95
>    IMAGETYPE png
>
>    OUTPUTFORMAT
>      NAME png
>      DRIVER 'GD/PNG'
>      MIMETYPE 'image/png'
>      IMAGEMODE RGBA
>      EXTENSION 'png'
>    END
>    # Legend
>    LEGEND
>        IMAGECOLOR 255 255 255
>      STATUS ON
>      KEYSIZE 18 12
>      LABEL
>        TYPE BITMAP
>        SIZE MEDIUM
>        COLOR 0 0 89
>      END
>    END
>
>    # Web interface definition. Only the template parameter
>    # is required to display a map. See MapServer documentation
>    WEB
>      # Set IMAGEPATH to the path where MapServer should
>      # write its output.
>      IMAGEPATH 'C:/Users/Francesc/Documents/temp/'
>
>      # Set IMAGEURL to the url that points to IMAGEPATH
>      # as defined in your web server configuration
>      IMAGEURL '/C:/Users/Francesc/Documents/temp/'
>
>      # WMS server settings
>      METADATA
>        'ows_title'           'Projectes Auma UTM31'
>        'ows_onlineresource'
> 'http://localhost/cgi-bin/mapserv.exe?map=C:/Users/Francesc/Documents/Projectes_wgs84_v7.map'
>        'ows_srs'             'EPSG:4326'
>      END
>
>      #Scale range at which web interface will operate
>      # Template and header/footer settings
>      # Only the template parameter is required to display a map. See
> MapServer documentation
>      TEMPLATE 'fooOnlyForWMSGetFeatureInfo'
>    END
>
>    LAYER
>      NAME 'Provincias_wgs84'
>      TYPE POLYGON
>      DUMP true
>      TEMPLATE fooOnlyForWMSGetFeatureInfo
>    EXTENT -9.569062 32.926808 6.763360 44.857479
>      DATA 'C:/Users/Francesc/Documents/SHP/Provincias_wgs84.shp'
>      METADATA
>        'ows_title' 'Provincias_wgs84'
>      END
>      STATUS OFF
>      TRANSPARENCY 100
>      PROJECTION
>      'proj=longlat'
>      'datum=WGS84'
>      'no_defs'
>      END
>      CLASS
>         NAME 'Provincias_wgs84'
>         STYLE
>           WIDTH 0.35
>           OUTLINECOLOR 0 0 0
>         END
>      END
>    END
>
>    LAYER
>      NAME 'Projectes_UTM31_wgs84'
>      TYPE POINT
>      DUMP true
>      TEMPLATE fooOnlyForWMSGetFeatureInfo
>    EXTENT -9.569062 32.926808 6.763360 44.857479
>      DATA 'C:/Users/Francesc/Documents/SHP/Projectes_UTM31_wgs84.shp'
>      METADATA
>        'ows_title' 'Projectes_UTM31_wgs84'
>      END
>      STATUS OFF
>      TRANSPARENCY 100
>      PROJECTION
>      'proj=longlat'
>      'datum=WGS84'
>      'no_defs'
>      END
>      CLASS
>         NAME 'Projectes_UTM31_wgs84'
>         STYLE
>           SYMBOL "circle"
>           SIZE 7.0
>           OUTLINECOLOR 0 0 0
>           COLOR 103 132 169
>         END
>      END
>    END
>
> END
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/PyQgis-MapServer-Export-with-Mapserver-6-0-1-tp4350528p4350528.html
> Sent from the Quantum GIS - User mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user




More information about the Qgis-user mailing list