[mapserver-users] Is there a way to convert a QGIS layout

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Thu Mar 19 09:31:47 PDT 2015


Hi,

>Not sure if this is what you meant though?

I meant that I did not know if these two things can be done:

1) I did not know if I can create styles for a layer with QGIS, save style as SLD and that SLD without any further modification with Mapserver.  So I had to test it and it seems to work at least with a rather simple SLD . I used the Geoserver demo data "states.shp" as data and the SLD that I made with QGIS is here http://latuviitta.org/documents/states_qgis.sld

2) I did not know if it is possible to convert styles from SLD into CLASSes and STYLEs as they are used in mapfiles but deduikertjes wrote "You can do this conversion by python-mapscript". Well, "you" there does not mean me because I can't do anything with python-mapscript but if QGIS exporter is using that under the hood then the answer is Yes also for this question.


-Jukka Rahkonen-

Passmore, James H. wrote:

Message: 4
Date: Thu, 19 Mar 2015 08:32:34 +0000
From: "Rahkonen Jukka (MML)" <jukka.rahkonen at maanmittauslaitos.fi>
To: "b.j.kobben at utwente.nl" <b.j.kobben at utwente.nl>,
        "mapserver-users at lists.osgeo.org" <mapserver-users at lists.osgeo.org>
Subject: Re: [mapserver-users] Is there a way to convert a QGIS layout
        into a ".map" file?
Message-ID:
        <d2d80a25ab9a410ba05a8835e2c1a07f at C119S212VM022.msvyvi.vaha.local>

The SLD output of QGIS can be good but I am not so sure how good Mapserver is with importing SLD. That could be tested through WMS GetMap and &SLD= or with &SLD_BODY= but there is no tool for converting SLD into layer styles as text which could be saved and used in static mapfiles, or is there?

MapServer handles application of external SLD just fine.

Original styling:

http://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:4326&BBOX=49.8639,-9.80586479568672,60.8622,2.92769479568672&WIDTH=1020&HEIGHT=881&LAYERS=UKCoShelf_BGS_1M_SBS&

External SLD styling:

http://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&CRS=EPSG:4326&BBOX=49.8639,-9.80586479568672,60.8622,2.92769479568672&WIDTH=1020&HEIGHT=881&SLD=http%3A%2F%2Fogc.bgs.ac.uk%2Fsld%2FUKCoShelf_BGS_1M_SBS-original-mod3a.sld

Not sure if this is what you meant though?

James

This message (and any attachments) is for the recipient only. NERC is subject to the Freedom of Information Act 2000 and the contents of this email and any reply you make may be disclosed by NERC unless it is exempt from release under the Act. Any material supplied to NERC may be stored in an electronic records management system.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list