#
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.
#
Installation
#
Install Pozi Publisher
- Create folder
C:\Pozi\Publisher
- Obtain Publisher from Pozi Support, and extract to/past e to the new folder
#
Installing AWS Tools for Powershell
- Type
Install-Module -Name AWS.Tools.Installer
- Answer 'Y' to the various security prompts
Warning
If the Install-Module
command fails with the following:
WARNING: Unable to download from URI 'https://go.microsoft.com...
It may be necessary to change the protocol that Powershell uses to access the Internet. Entering the following command:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Then re-try the Install-Module
command.
- Download AWS Tools.
- Type
$Env:PSModulePath
on a PowerShell command line. This will provide a list of possible folders that the module zip file can be extracted in. It needs to be one that the application can access when running as a task or service. - Extract the zip file into the chosen folder.
#
Install AWS Tools Modules
- Extra modules are required for authentication and using S3 buckets.
- Type
Install-AWSToolsModule AWS.Tools.EC2,AWS.Tools.S3 -CleanUp -Scope AllUsers
#
Configuration
#
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