Code Monkey home page Code Monkey logo

otf-project's Introduction

Create a QGIS project on the fly on the server

  • Supported raster formats : asc, tif, tiff
  • Supported vector formats : shp, geojson

This project is still in development, the API may change.

Map composition service:

  • This service will create a QGIS project using one or many layers existing on the file system.
  • Parameters :
    • SERVICE=MAPCOMPOSITION
    • PROJECT, path where the project will be written on the file system.
    • OVERWRITE, optional, false by default. Boolean if we can overwrite the existing PROJECT above. Values can be '1', 'YES', 'TRUE', 'yes', 'true'.
    • FILES is a list of files on the filesystem, separated by a semicolon.
    • NAMES is a list of names, separated by a semicolon. It will be used for the legend. Items in this list should match layers in the FILES list.

Layers need to be stored on the server's filesystem. The project will be created at the specified path above, on the server's filesystem too.

  • For the answer you should get OK or you will get the error message.

  • Example :

http://localhost:81/qgis?
SERVICE=MAPCOMPOSITION&
PROJECT=/destination/project.qgs&
FILES=/path/1.shp;/path/2.geojson;/path/3.asc&
NAMES=My layer 1;MyLayer 2;Layer 3&
OVERWRITE=true
  • This service will trigger the project creation. Then you can use the normal WMS/WFS service:
http://localhost:81/qgis?
SERVICE=WMS&
MAP=/destination/project.qgs&
REQUEST=GetCapabilities

WMS and WFS services:

This service is disabled by default. You need to enable it in otf_project.py. I prefer you to use the MAPCOMPOSITION service to create the project first.

  • For the MAP parameter, if we use a qgs file, the request will be forwarded to QGIS Server. However, if the MAP parameter is one of the supported formats, the plugin will create the project on the fly and then the request will be forwarded to QGIS Server.

  • Vector example : http://localhost:81/qgis?MAP=/path/to/shapefile.shp&SERVICE=WMS&REQUEST=GetCapabilities This request will create a WMS/WFS project /path/to/shapefile.qgs

  • Raster example : http://localhost:81/qgis?MAP=/path/to/raster.asc&SERVICE=WMS&REQUEST=GetCapabilities This request will create a WMS project /path/to/raster.qgs

Todo

  • Add WCS
  • Add tests

otf-project's People

Contributors

gustry avatar lucernae avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.