Saturday, December 22, 2018

Install Third-party Python Modules in QGIS 3.x on Windows 10 platform

Here is how you can install third-party Python Modules in QGIS 3.x on Windows 10 platform. First let's see one very important module that is not installed with python setup that comes with QGIS. This module we will look at is "Pandas".

If you launch QGIS Python Console, and import 'pandas', you will get error



Steps to solving the problem

Step 1: Search for "OSGeo4W Shell"



Step 2: Right click on it and select "Run a s Administrator"



Step 3: Ensure you can run pip from the command line. You may encounter error that says: No module named pip

In my case I ran python -m ensurepip --default-pip to get pip working. You can learn more from the link above. The "-m" flag import the pip module or package and then run as a script (it ensures that module is ran as script on cmd).



Note: If you want to switch the shell from python 2.7 to python 3.x, simply enter this command: py3_env. I will advice you do that because that is what the QGIS 3.x python console is using by default. So, just enter py3_env to switch to python 3 shell, then install your third-party modules there.



Step 4: Run: python -m pip install pandas to get pandas module installed as seen above.
Now you can import and use pandas in QGIS Python Console for further data manipulation without any error as seen below. The "-m" flag import the pip module or package and then run as a script.



That is it!


A video explanation of the steps above is here below:-

Tuesday, December 11, 2018

How to save High Resolution Image from Google Earth Pro

I have seen many "Google Earth Pro" users taking screenshots of the images instead of saving it directly in high resolution, probably because the "Save Image" function is a little bit obscured. This post will guide you through saving a high resolution image from "Google Earth Pro" released in the year 2018.


At first when you click on the save button, nothing seems to happen aside the "Untitled Map", "Compass", "Scale" and empty "Legend" boxes that pop-up on the screen.



If you look closely, just under the "Untitled Map" box, there appear the "Save Image" tool bar. On that very tool bar, you will see the "Save Image" button. That is the button you actually needed to save the image.



But before you save your image, you will definitely like to update the map title and do other settings. This can be done from the "Map Options" button on the "Save Image" tool bar.



You could also select your preferred image resolution from the tool bar.

Thank you for reading.

Tuesday, December 4, 2018

An Atlas Map of Nigerian States - QGIS Map Report Tutorial

QGIS 3 comes with a nice feature for creating collection of maps (aka Atlas). This feature is called "Report" in QGIS 3, it works closely like the "Print Layout" (formerly know as "Print Composer" in QGIS 2).

You can access the "Report" window from the project menu as seen below...



In the next few lines, I will demonstrate how to generate a map report in QGIS using the Map of Nigerian States. See the document we want to produce at the end of this tutorial here...



Saturday, December 1, 2018

The Difference between the United Kingdom, Great Britain and England

Often people confuse these three: United Kingdom, Great Britain and England. As an example, in sports different names are used for Olympic games different from football World Cup game and many others.

Below is the map of the world and the area in question is this tiny mass of land within the red mark.


Lets zoom in and look at the map closer, the whole of that area is the "British Isles" consisting of five countries which is categorized into to named: Ireland and Great Britain.

Ireland consist of two countries "Republic of Ireland and Northern Ireland", while Great Britain consist of three countries "England, Scotland and Wales".

United Kingdom is made up off the whole of Great Britain and part of Ireland. That is all the countries in Great Britain ("England, Scotland and Wales") are in United Kingdom and in Ireland only Northern Ireland is part, Republic of Ireland isn't part of United Kingdom.

Hmm! This sounds complicated, right? Let clarify this by visualizing it on a map.


British Isles = Ireland + Great Britain

Here purple color for Ireland and blue color for Great Britain to clearly see to two different regions.



Ireland = "Republic of Ireland + Northern Ireland"
Great Britain = "England + Scotland + Wales"


United Kingdom =  "England + Scotland + Wales + Northern Ireland"


I hope that was clear and succinct.
Thank you for reading