Coder Social home page Coder Social logo

qgis / qgis-documentation Goto Github PK

View Code? Open in Web Editor NEW
443.0 44.0 670.0 1.29 GB

QGIS Documentation

Home Page: https://docs.qgis.org/latest

Makefile 8.56% Python 60.50% Shell 14.54% HTML 11.90% CSS 3.23% Dockerfile 0.28% Batchfile 0.99%
python qgis rst

qgis-documentation's Introduction

Our full logo

Docs Builds Doctest Build Read the documentation

This repository is meant to write and manage the Official Documentation of QGIS, a free and Open Source Geographic Information System (GIS) Software whose source code can be found in this repository. QGIS is part of the Open Source Geospatial (OSGeo) foundation, offering a range of complementary open-source GIS software projects.

The latest documentation of QGIS is available at https://docs.qgis.org/latest

Building the documentation

  1. If not provided by your OS, you need to install:

    You can install both in default places and with default options.

  2. Clone the repository

  3. Go into that directory and follow the next instructions depending on your OS.

The best way to build the documentation is within a Python Virtual Environment (venv).

Build on Linux or macOS

You can use your own virtual env by creating it first:

# you NEED python >=3.9. Depending on distro either use `python3` or `python`
# common name is 'venv' but call it whatever you like

python3 -m venv venv  # using the venv module, create a venv named 'venv'

Then activate the venv:

source ./venv/bin/activate

With 'activated' virtualenv, you should see 'venv' in the prompt. Install the requirements via the REQUIREMENTS.txt:

pip install -r REQUIREMENTS.txt

And run the build from within that venv:

make html

Want to build your own language? Note that you will use the translations from the po files from git! For example for 'nl' do:

make LANG=nl html
Tip: One-line command to create the venv and run the build in a row

The venv.mk file will create/update a virtual env (if not available) in current dir/venv AND run the html build in it.

make -f venv.mk html

If, for some reason, you want to (re)start from scratch:

make -f venv.mk cleanall

Build on Windows

Create a virtual environment called 'venv' in that directory (search the Internet for Python Virtual Env on Windows for more details), but in short: use the module 'venv' to create a virtual environment called 'venv'

# in dos box:
python -m venv venv

Then activate the venv:

venv\Scripts\activate.bat

With 'activated' virtualenv, you should see 'venv' in the prompt. Install the requirements via the REQUIREMENTS.txt:

pip install -r REQUIREMENTS.txt

And run the build from within that venv, using the make.bat script with the html argument to locally build the docs:

make.bat html

Want to build your own language? Note that you will use the translations from the po files from git! For example 'nl' do:

set SPHINXOPTS=-D language=nl
make.bat html

Build PDFs

In Linux, you can also build the PDF versions of the main documents.

make -f venv.mk pdf

Or after you enabled the venv:

make pdf

If you want to build PDFs in a language other than English, you can use a similar syntax:

make LANG=fr pdf

For building PDFs in English you will need to install the XeLaTex compiler package texlive-xetex and GNU Freefont.

sudo apt install texlive-xetex fonts-freefont-otf

For building translated PDFs, you may have to install the texlive extra package for your specific language (e.g. texlive-lang-french). For japanese, it's crucial to install texlive-lang-japanese, which will install the platex compiler. If you plan to build all languages, it might be easier to install all languages packages (texlive-lang-all), but it will use a considerable amount of disk space.

Some languages will also need specific fonts installed:

  • Korea (ko) - NanumMyeongjo from the fonts-nanum package
  • Hindi (hi) - Nakula from the fonts-nakula package

Translating

We rely on the Transifex platform to store and coordinate our translation efforts. To be part of the translation team, please follow becoming a translator.

The process is automated using the Transifex - GitHub integration system and some custom scripts:

  • The transifex.yml configuration file: provides way to retrieve the English source files and where to locate the translated ones.


    Note to Transifex administrators

    If after the integration system is setup for a new release, the translation strings fail to (fully) upload to Transifex:

    1. Run the create_transifex_resources script: creates/updates the .tx/config file with formatted references of the English source files and their translation in the GitHub repository and link them to the resources in Transifex.
    2. Force-push the translation files to Transifex
       tx push -f -t --no-interactive
      

  • The transifex integration bot: manages pulls and pushes of the strings, in other words:

    • Tracks any changes of the English *.po resource files in GitHub and automatically sends them to the Transifex platform
    • When a resource is 100% translated, automatically sends back the translated *.po file to GitHub, for build.
  • The pofiles action: creates/updates English *.po files with recent changes in the source *.rst files. Feeds the transifex bot.

  • For files that are not yet fully translated in Transifex, the pull_minimized_translations action periodically and automatically pulls them to the repository.

Based on the above, translated strings are automatically available in released branch so building the docs in any translated locale is possible following the instructions in earlier sections:

make html LANG=yourlanguage

Sometimes, you may want to build the docs with really new strings in a partially translated file and the above workflow may fail to work. In that case, you need to manually pull the translations from Transifex to your local repository:

  1. Checkout locally the repository and target branch in git

  2. Prepare the environment

    python3 -m venv venv
    source ./venv/bin/activate
    pip install -r REQUIREMENTS.txt
    
  3. Install Transifex command line client

    curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash
    
  4. Download the translated strings using the minimize_translation script. By default this pulls all the languages.

    ./scripts/minimize_translation.sh
    

    To pull a specific language (e.g. italian), do

    ./scripts/minimize_translation.sh -l it
    

    IMPORTANT: to be able to pull from transifex.com, you will need a credentials file. This file should be named: .transifexrc and easiest is to put it in your home dir. The file should contain this:

    [https://app.transifex.com]
    rest_hostname = https://rest.api.transifex.com
    token = yourtransifextoken
    
  5. Build the docs in your language

    make html LANG=yourlanguage
    
  6. Share the changes by opening a pull-request, allowing us to integrate the new strings for the pulled language(s)

Testing Python snippets

To test Python code snippets in the PyQGIS Cookbook, you need a QGIS installation. For this there are many options:

  • You can use your system QGIS installation with Sphinx from Python virtual environment:

    make -f venv.mk doctest
    
  • You can use a manually built installation of QGIS. To do so, you need to:

    1. Create a custom Makefile extension on top of the venv.mk file, for example a user.mk file with the following content:

      # Root installation folder
      QGIS_PREFIX_PATH = /home/user/apps/qgis-master
      
      # Or build output folder
      QGIS_PREFIX_PATH = /home/user/dev/QGIS-build-master/output
      
      include venv.mk
      
    2. Then use it to run target doctest:

      make -f user.mk doctest
      
  • Or you can run target doctest inside the official QGIS docker image:

    make -f docker.mk doctest
    

Note that only code blocks with directive testcode are tested and it is possible to run tests setup code which does not appear in documentation with directive testsetup, for example:

 .. testsetup::

     from qgis.core import QgsCoordinateReferenceSystem

 .. testcode::

     # SRID 4326 is allocated for WGS84
     crs = QgsCoordinateReferenceSystem("EPSG:4326")
     assert crs.isValid()

For more information see Sphinx doctest extension documentation: https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html

qgis-documentation's People

Contributors

agiudiceandrea avatar alexbruy avatar anitagraser avatar benoitdm-oslandia avatar capooti avatar dassau avatar delazj avatar dependabot[bot] avatar diethard2 avatar digro avatar dragons8mycat avatar elpaso avatar felixfeckler avatar ghtmtt avatar gustry avatar havatv avatar jean-roc avatar junek avatar m-kuhn avatar mach0 avatar pblottiere avatar pcav avatar rduivenvoorde avatar rosaguilar avatar selmavh1 avatar srnetochan avatar timlinux avatar tudorbarascu avatar yjacolin avatar yoichigmf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qgis-documentation's Issues

Web client better explained and updated

In chapter QGIS as OGC Data Server there is outdated part regarding web clients and plugin for web. Needs to be better explained maybe in separate chapter.

Rationalize section numbering system in training manual

Section numbers are a good idea, but something is up with the training manual, as section numbers change depending on what page you're looking at:

You can see this quickly from the main TOC, where Section 9 has subsections 9.1, 9.2, 9.3, but Section 10 only has 1,2,3.

So when you go to Section 10.1, it looks like Section 1 all over again. This is confusing.

9.1: http://docs.qgis.org/2.0/en/docs/training_manual/complete_analysis/raster_to_vector.html
10.1: http://docs.qgis.org/2.0/en/docs/training_manual/qgis_plugins/fetching_plugins.html

I can't build it myself to test (see #207), but as far as I am aware, a single use of :numbered: at the root of the doc build should cascade the numbering system all the way down. Perhaps the extra instances of :numbered: are messing with the counter?

10.2.2: OpenLayers Plugin

The section on OpenLayers plugin says that the plugin is accessible at:
Plugins -> OpenLayers plugin -> OpenLayers overview

It seems that the OpenLayers plugin menu is now under:
Web -> OpenLayers plugin ...

Missing file REQUIREMENTS.txt

The installation instructions say:

You can install all tools in one go via the REQUIREMENTS.txt here in the root of this repo:
pip install -r REQUIREMENTS.txt

There's no REQUIREMENTS.txt in the repository.

mentionning a second time that the « Add PostGIS Layer... » option is in the Layer menu

Re : mentionning a second time that the « Add PostGIS Layer... » option is in the Layer menu

Hello, Bonjour,

(I have 1 single comment about one page, and I do not know exactly where to contribute and I do not want to enthrall me into rst or GitHub for the time being.)

In the page « Supported Data Formats »
In chapter « PostGIS Layers »
in the section « Loading a PostGIS Layer »
http://www.qgis.org/en/docs/user_manual/working_with_vector/supported_data.html?#loading-a-postgis-layer

It would be good to add a wording that would be similar to the one in the previous section « Creating a stored Connection » *, to mention that the Add PostGIS Layer... option is in the Layer menu.

(I am not familiar with QGIS, so this summary would help me when I read only this section without reading again the first one...)


  • Creating a stored Connection

http://www.qgis.org/en/docs/user_manual/working_with_vector/supported_data.html?#creating-a-stored-connection

This sections states :
« The first time [...] »
« selecting the Add PostGIS Layer... option from the Layer menu »

Module 14: PostgreSQL - Update English Content

Task

We need to port Module 6 of the training manual to QGIS 2.0

Link to Current

http://manual.linfiniti.com/en/postgres/index.html

Subtasks

  • Lesson 1: Text
  • Lesson 1: Screenshots - @Erve1879
  • Lesson 2: Text
  • Lesson 2: Screenshots - @Erve1879
  • Lesson 3: Text
  • Lesson 3: Screenshots - @Erve1879
  • Lesson 4: Text
  • Lesson 4: Screenshots - @Erve1879
  • Lesson 5: Text
  • Lesson 5: Screenshots - @Erve1879
  • Lesson 6: Text
  • Lesson 6: Screenshots - @Erve1879

[Vector chapter] move symbol configuration out of renderers section

Currently symbol creation is inside the renderers subsubsection in the Style subsection (vector properties chapter).

Symbol creation is rather important and complex. We should move this part outside even in a specific chapter/setion or in a specific subsection in the working with vector file -> Properties Section.

This ticket is here to have a discussion and keep history. The code changes will be link to it if any.

APT key has expired

The QGIS documentation mentions an old key for the APT repository:

http://qgis.org/en/site/forusers/alldownloads.html#debian

It still mentions key 997D3880 for "Quantum GIS Archive Automatic Signing Key (2012) [email protected]".

It should mention the new key 47765B75 for "Quantum GIS Archive Automatic Signing Key (2013) [email protected]".

But when you add either of these keys, APT complains about expired keys:

W: GPG error: http://qgis.org sid Release: The following signatures were invalid: KEYEXPIRED 1376750759 KEYEXPIRED 1376750759 KEYEXPIRED 1376750759

Some dead links, one typo in QGis cookbook.

When reading the QGis cookbook, I found some dead links and typos, plus an error. Is this the right place to report them? I refer to the documentation: http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html

Dead links:

page: http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html
section: Intersection
dead links (marked with [link]) in sentence:
"There are some resources about programming with PyQGIS on [QGIS blog]. See [QGIS tutorial ported to Python] for some examples of simple 3rd party apps."

page: http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/canvas.html
section: Using Map Canvas
dead links (marked with [link]) in sentence:
If not, please make sure to read the [overview of the framework].

Errors in cookbook:

page: http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/intro.html
section: Python console
error: Command layer.getLayerID() (shown on screenshot) does not compile (AttributeError: 'QgsVectorLayer' object has no attribute 'getLayerID'). According to forum http://osgeo-org.1560.x6.nabble.com/How-get-the-ID-of-active-layer-in-python-td5095979.html, this method has been renamed to id().

page: http://docs.qgis.org/testing/en/docs/pyqgis_developer_cookbook/vector.html#modifying-vector-layers-with-an-editing-buffer
section: Modifying Vector Layers with an Editing Buffer
This sentence contains typo (marked as [typo]. Should be beginEditCommand() instead of beginEndCommand()):
The [beginEndCommand()] will create an internal “active” command and will record subsequent changes in vector layer.

Task: Update All Image Links

Problem

Links to screenshots currently point to e.g. _static/img.png. They should point to e.g. static/img.png.

Solution

As we update the manual content, we need to make sure all images point to the correct location.

Notes

During the build process, the relevant static files (relevant to build localisation) are copied into /static/.

Incremental compiling of documentation?

The instructions in the README suggest the following workflow:

  • run ./scripts/post_translate.sh en locally to build the english docs
  • edit/update the rst files with the english documentation from ./source/docs/user_manual/
  • run ./scripts/post_translate.sh en locally again to check your changes

However, the third step recompiles the entire documentation from scratch, not just the file that has been changed. This takes over 2 minutes on my laptop and makes it hard to check as I'm working.

Is there a way to do incremental updates when recompiling?

[training] Wrong path for the picture

File: source/docs/training_manual/processing/batch_modeler.rst
Two pictures are not found:

  • WARNING: image file not readable: docs/training_manual/processing/img/batch_modeler/dialog.png
  • WARNING: image file not readable: docs/training_manual/processing/img/batch_modeler/filled.png

such directory doesn't exist.

Task: Update Theme

Problem

The Training Manual has not properly inherited the qgis.org theme and the layout is consequently not perfect.

Solution

Ensure that all required CSS files are properly built with the training manual

Section 8.3.3: incorrect photo (slope settings not depicted)

The screen capture for the DEM (Terrain models) toolkit in section 8.3.3 does not depict the settings for Slope. Rather, Hillshade is still visible, perhaps from the previous section.

Please update the image for section 8.3.3 to display the settings for Slope.

Can't build project on Windows

Looks like the Makefile is Linux-specific. Creating a make.bat (or otherwise making the build platform-agnostic) would allow for Windows users to more effectively contribute to the documentation effort.

10.2.1: Raster Terrain Analysis Plugin - move to earlier in book

The chapter detailing plugin installation, specifically the Raster Terrain Analysis Plugin, is out of sequence with the tutorial that uses the Raster Terrain Analysis Plugin (chapter 8.3). It seems reasonable to cover plugins after covering core functionality, as is currently the case. Is there some way to reduce the duplication in the book regarding the Raster Terrain Analysis Plugin?

Update Training Manual Cadastrals

We need to update the training manual cadastrals so that they use OSM data sources and can be easily replaced with localised data sets

Should We Include Blank Space for Notes/Answers?

@jj0hns0n has included left in (in his excellent re-write of the database-related modules) blank space for end-users to hand-write solutions to questions: is this something we want to do throughout the docs? Or should we use the "Check Your Results" links to link to an explained answer on the answers page (as per current)?

My feeling is that this is a training rather than testing manual and that the white space impacts the layout and usability of the docs, especially when rendered in HTML.

However, a lot of the questions relate to structuring SQL queries and allowing the end-user to hand-write possible solutions could be very helpful.

CC

@timlinux @rduivenvoorde

Update

As pointed out by @jj0hns0n, the blank spaces were already there, so the proposition is that we remove them and replace with "Check Your Results" links.

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.