Coder Social home page Coder Social logo

qgs_creator_mock's Introduction

Utilized versions:

  • QGIS 2.18
  • Ubuntu 16.04
  • python 2.7

Prerequisites:

You need a local and valid shp file to add. Because adding a layer to QGIS project means the layer has to be valid. Therefor we need a dummy. To be flexible on input the appoach chosen is the simple one. Only rule: shp has to be named "input.shp".

Big picture:

Everything runs in an Docker container. QGIS is used blank. Means without gui components. Python is invoked to use QGIS libs. Simple QGIS is spawned, project loaded, layers added to QGIS-workspace and project, project is saved (to the same path where the input shp is stored).

Usage:

clone repository: https://github.com/simi-so/qgs_creator_mock.git

walk into folder: cd qgs_creator_mock

build image locally: docker build -t qgs_creator_mock:local_dev .

run image: docker run --rm -v <path_to_local_shp>:/data qgs_creator_mock:local_dev

where <path_to_local_shp> is the place where you keep your test shp.

Note:

Means path of shp needs to be writeable for anybody!

Benchmark:

For benchmarking on unix machines the simple to use GNU tool time can be utilized:

/usr/bin/time -f "time result\ncmd:%C\nreal %es\nuser %Us \nsys %Ss \nmemory:%MKB \ncpu %P" docker run --rm -v <path_to_local_shp>:/data qgs_creator_mock:local_dev

This results in the following for 1000 iterations:

time result
cmd:docker run --rm -v /home/crud3_rt/tmp/:/data qgs_creator_mock:local_dev
real 3.68s
user 0.04s 
sys  0.02s 
memory:58860KB 
cpu 1%

On a System with:

  • i7-8565U CPU (4 cores)
  • running on battery (not full power)
time result
cmd:docker run --rm -v /home/crud3_rt/tmp:/data qgs_creator_mock:local_dev
real 2.88s
user 0.04s 
sys  0.01s 
memory:58340KB 
cpu 2%

On a System with:

  • i7-8565U CPU (4 cores)
  • running on ac

Pro of this benchmark method is, that all process time and mem usage is measured. Including eventually existing docker bottle necks.

qgs_creator_mock's People

Contributors

vvmruder avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

vvmruder

qgs_creator_mock's Issues

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.