#
Pozi Publisher
Pozi Publisher standardises a wide range of spatial information from inside and outside your organisation into easily digestible map catalogues that integrate seamlessly into Pozi Web GIS.
#
Working with Catalogues
A map catalogue is a collection of map layers, typically in XML format generated by a WFS or WMS GetCapabilities
, or a QGIS GetProjectSettings
service call.
The catalogue is the unit around which the Pozi Publisher workflow is based, either generating catalogues from various sources, modifying catalogues for specific use cases, or extracting information from catalogues.
#
Configuration
Configuration of Pozi Publisher tasks is set up in custom .INI
files. These files detail where the source files can be found, where the resulting data will be saved and what format it will take, where to locate the QGIS Server instance, and more. A simple example of this .INI
file is provided further down the page.
#
Examples
#
Generate map catalogues from QGIS projects
Generate production-ready OGC-compliant map catalogues from QGIS projects.
- Improve load times in web map applications by pre-generating catalogues from internal and external web map servers into static XML files
- Version control of QGIS projects
[Input]
folder=\\cscgisweb02\d$\Pozi
[Output]
folder=C:\Pozi\Cache
[QGIS_Server]
url=http://localhost/pozi/qgisserver
#
Generate map catalogues from external sources
Save local versions of catalogues from external providers.
#
Customise catalogues
Generate custom catalogues from external web servers.
- Search and replace text
- Filter layers
- Embed custom metadata
#
Bulk data generation/extraction
Export GeoJSON and SLD files for all layers in a catalogue.
- Bulk download map data from external catalogues on a routine schedule
#
Sync to cloud
Sync data generated from local sources up to S3.
- Publish layers to the public from QGIS projects
#
Build search indexes
Compile index of features and attributes for fast searching.
- Search index generator
#
Running Publisher
#
In Powershell
- Open Powershell
- Navigate to the Pozi Publisher folder
cd C:\Pozi\Publisher
- Run Pozi Publisher adding the
ini
settings file as a parameter..\PoziPublisher.ps1 "C:\Pozi\Publisher\deeca-iws-wms-northerngrampians-lga.ini"
#
As a batch file
- Create a new empty batch file. This file can be located in whatever folder suits, e.g.
C:\Pozi\Publisher\PoziPublisherRun.bat
. If it will frequently be run manually, a shortcut to this file can be created on the user's desktop. - Edit this file, by adding a line similar to the following.
powershell.exe "C:\Pozi\Publisher\PoziPublisher.ps1" -iniFiles "C:\Pozi\Publisher\deeca-iws-wms-northerngrampians-lga.ini" > "C:\Pozi\Publisher\deeca-iws-wms-northerngrampians-lga.log" 2>&1
- Replace the ini file (
C:\Pozi\Publisher\deeca-iws-wms-northerngrampians-lga.ini
) and generated log file (C:\Pozi\Publisher\deeca-iws-wms-northerngrampians-lga.log
) entries in this line to reflect the desired file locations. - Save this file.
- To run, simply double-click the file.
- Multiple ini files can be run from the one batch file by duplicating the line, and updating the ini and log file locations.
#
As a scheduled task
- Open
Task Scheduler
in Windows. - Create a new scheduled task using
Create Task...
. - Name the new scheduled task something meaningful like
Pozi Publisher Sync
. - In most cases these tasks will need to be
Run whether user is logged in or not
, possibly with an administrator login, to ensure it can be run at any time. - Under
Triggers
set up the frequency the task should be run. Generally this will be either Daily or Weekly. - In the
Actions
tab, create a new action.- The action should be
Start a program
. - In the
Program/script
dialog box type the full location of your batch file created in the previous section e.g.C:\Pozi\Publisher\PoziPublisherRun.bat
, or use the Browse button to locate this file.
- The action should be
- Customise any further settings in the scheduled task.
#
Troubleshooting
- ensure that the WFS Output Extension is installed. See WFS Output Extension
- add
export=true
as a keyword in the project's QGIS Server 'Service Capabilities' or as a keyword for individual layers that need to be exported - make sure any layers to be exported are published as a WFS service in the project settings
Ensure that AWS Tools for Powershell is installed. See