2011-07-06 00:26:15 +02:00
|
|
|
==================================================
|
2015-03-09 08:42:47 +01:00
|
|
|
QGIS server
|
2011-07-06 00:26:15 +02:00
|
|
|
==================================================
|
2011-06-26 23:42:43 +02:00
|
|
|
|
2015-03-09 08:42:47 +01:00
|
|
|
QGIS server allows you to publish your QGIS projects as Web Map
|
2011-07-06 00:26:15 +02:00
|
|
|
Services (WMS). Simply layout your map in QGIS. The WMS will look
|
2015-03-09 08:42:47 +01:00
|
|
|
exactly the same, because QGIS server uses the same libraries for
|
2011-07-06 00:26:15 +02:00
|
|
|
rendering, as the desktop application does.
|
2011-06-26 23:42:43 +02:00
|
|
|
|
2011-07-06 00:26:15 +02:00
|
|
|
A sample configuration file for Httpd is installed under
|
2015-03-09 08:42:47 +01:00
|
|
|
/etc/httpd/conf.d/qgis-server.conf.
|
2011-06-26 23:42:43 +02:00
|
|
|
|
2011-07-06 00:26:15 +02:00
|
|
|
This configuration expects QGIS project files under /var/www/wms. To
|
|
|
|
use it, reload the Httpd configuration and place the files you want to
|
|
|
|
publish in this directory.
|
|
|
|
|
|
|
|
A getCapabilities request looks like this:
|
|
|
|
|
|
|
|
http://localhost/wms/my_qgis_project?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0
|
|
|
|
|
|
|
|
QGIS project is "/var/www/wms/my_qgis_project.qgs". The sample
|
|
|
|
configuration automatically adds the project file extension for you.
|
|
|
|
|
2015-03-09 08:42:47 +01:00
|
|
|
The actual data can stay where it is. Make sure QGIS server can
|
|
|
|
access the project file and don't forget to let Httpd reload its
|
2011-07-06 00:26:15 +02:00
|
|
|
configuration before sending your requests!
|
|
|
|
|
|
|
|
Please fill in the metadata tab for your QGIS project.
|
2011-06-26 23:42:43 +02:00
|
|
|
|
2011-07-06 00:26:15 +02:00
|
|
|
You can easily test your WMS by adding it as a WMS layer in QGIS.
|
2011-06-26 23:42:43 +02:00
|
|
|
|
2011-07-06 00:26:15 +02:00
|
|
|
==================================================
|
2011-06-26 23:42:43 +02:00
|
|
|
|
2015-03-09 08:42:47 +01:00
|
|
|
The traditional QGIS server configuration is less comfortable and
|
2011-07-06 00:26:15 +02:00
|
|
|
I don't encourage it, unless you have a good reason to use it:
|
2011-06-26 23:42:43 +02:00
|
|
|
|
2011-07-06 00:26:15 +02:00
|
|
|
This approach only allows for a single map service.
|
|
|
|
|
|
|
|
It uses two configuration files, that must be located in the same
|
|
|
|
directory as the FCGI binary:
|
|
|
|
|
|
|
|
- admin.sld
|
|
|
|
- wms_metadata.xml
|
|
|
|
|
|
|
|
"admin.sld" uses extended SLD syntax (Style Layer Descriptor) to
|
2015-03-09 08:42:47 +01:00
|
|
|
describe symbolization of data.
|
2011-07-06 00:26:15 +02:00
|
|
|
|
|
|
|
"wms_metadata.xml" supplies metadata for your WMS. You may also use this
|
|
|
|
file with the kind of configuration mentioned on top. But if you want to
|
|
|
|
serve different projects, and metadata varies between them, that file
|
|
|
|
won't work for you. Please see above for how to define project specific
|
|
|
|
metadata!
|
2011-06-26 23:42:43 +02:00
|
|
|
|
|
|
|
Both configuration files are included as documentation.
|
|
|
|
|
2011-07-06 00:26:15 +02:00
|
|
|
==================================================
|
|
|
|
|
2011-06-26 23:42:43 +02:00
|
|
|
Further information: http://karlinapp.ethz.ch/qgis_wms
|
|
|
|
|
|
|
|
Volker Fröhlich
|
|
|
|
volker27@gmx.at
|