Friday, May 26, 2017

Elshayal Smart GIS and Google Earth Compatibility Error [FIXED]

There has been serious complains on this error: *** Please be sure that Elshayal Smart GIS and Google Earth are opened and running as the same, either as adminstrators or as not adminstrators. ***

With this error, there are fear that the Elshayal software is not longer useful for downloading of free images from Google Earth. That is wrong, and here I am going to share with you the solution to fix this error.


This error is largely due to the usage of non-compatible versions of Elshayal Smart GIS and Google Earth.

At the moment of writing this post, the latest compatible versions of the software are:
Elshayal Smart GIS = 17.011
Google Earth = 7.1.7.2606








You can get the latest compatible versions from the official blog here.


Are you still having troubles? Feel free to let me know. I will help you download your images, contact me by email or phone: umaryusuf49@gmail.com or +2348039508010


Thanks for following

Sunday, May 14, 2017

How to setup a Geospatial Programming Blog - Served with "Static Website Generators"

How to setup a Geo-spatial Programming portfolio Blog that scales better than the traditional blogs

Blogging is one of the most important things that any aspiring GIS programmer or Geo-data scientist should be doing on a regular basis. It can be a fantastic way to demonstrate once skills and learn topics in more depth.

There are various software for creating your Geo-Data Science blog. The software that helps you create and publish your blog is called a Content Management System (CMS), Some are free and some cost money.

One common thing with CMS is that, they heavily depend on server to deliver contents. That is a request has to be sent to a database and responses are sent in return each time a use perform an action on the blog. This can be time consuming and over killing for a static geo-data content blog.

As a Geospatial programmer, if you really want to setup a GIS scripting oriented blog that scales very well. Then look beyond server centric CMS blog engines such as Blogger, Joomla, WordPress, Drupal etc. Instead choose a "Static Website Generators" that gives room for increasing both speed and uptime, and managing static sites with version control systems like Git means the process of creating and updating sites is highly efficient.

Static site generators allow a user to create HTML files by writing in a markup language and coding template files. A static website generator combines a markup language, such as Markdown or reStructuredText, with a templating engine such as Jinja, to produce HTML files.



Open-Source Static Site Generators

There are several of them, a comprehensive list is available at: www.staticgen.com

Since this blog is about python Programming, I will list those static site generators written in Python programming language below. Later on, I will cover how to create a blog using Python, how to create posts using Jupyter notebook, and how to deploy the blog live using Github Pages.


List of Python powered static site generators

1. Pelican - www.blog.getpelican.com/
2. MkDocs - www.mkdocs.org/
3. Cactus - www.github.com/koenbok/Cactus/
4. Lektor - www.getlektor.com/
5. Hyde - www.hyde.github.io/
6. Nikola - www.getnikola.com
7. Sphinx - www.sphinx-doc.org/
8. Frozen-Flask - www.pythonhosted.org/Frozen-Flask/
9. Blogofile - www.blogofile.com
10. Acrylamid - www.posativ.org/acrylamid/
11. Tinkerer - www.tinkerer.me
12. Tags - www.tags.brace.io/
13. staticjinja - www.staticjinja.readthedocs.org/en/latest/
14. Urubu - www.urubu.jandecaluwe.com
15. Grow - www.grow.io/
16. Tarbell - www.tarbell.io
17. wok - www.wok.mythmon.com/
18. Statik - www.getstatik.com/
19. QPage - www.qpage.ir
20. drupan - www.github.com/fallenhitokiri/drupan
21. Prosopopee - www.github.com/Psycojoker/prosopopee
22. PyKwiki - www.pykwiki.nullism.com
23. PieCrust2 - www.bolt80.com/piecrust
24. Poole - www.bitbucket.org/obensonne/poole/
25. Pagegen - www.pagegen.phnd.net
26. django-distill - www.github.com/mgrp/django-distill
27. Halwa - www.github.com/mhlakhani/halwa
28. Blended - www.jmroper.com/blended/
29. Blo - www.github.com/savuir/blo
30. YASBE - www.github.com/underr/yasbe
31. Bang - www.github.com/squdle/Bang
32. Rocadocs - www.rocadocs.com
33. BootDown - www.project.geekweaver.com/



Creating a Geo-Data Science portfolio blog will improved your career more than anything else and land you your dream job while doing the work you love.


Thanks for following.

Saturday, April 29, 2017

How do I do that in ArcGIS and QGIS - Learn both ArcGIS and QGIS Simultaneously

According to WikiPedia, there are two major categorization of Desktop GIS software namely:-
1- Commercial or Proprietary GIS software
2- Open Source GIS software

Over the years, the leading Desktop GIS software for the two categories above are ESRI ArcGIS and QGIS.

In this blog post, I will show you how to do basic GIS operations in both ArcGIS and QGIS. If you are interested in knowing the difference between the two software, here are some interesting articles on the internet I have found:-
a) QGIS v ArcGIS
b) 27 Differences Between ArcGIS and QGIS – The Most Epic GIS Software Battle in GIS History
c) ArcGIS vs QGIS – 10 Most Important Differences Between ArcGIS and QGIS
d) How does ESRI ArcGIS (proprietary) compare with Quantum GIS (QGIS) (open source)?
e) GIS lounge - QGIS versus ArcGIS

So, this post isn't about which is the best GIS software, instead it will address common questions in the form of "How do I do that in ArcGIS and QGIS". I will go over how you can perform some of the very basic GIS tasks in both ArcGIS and QGIS, and you will decide at the end which software approach is easier and better for you.

Along the way, you will be learning both ArcGIS and QGIS software simultaneously.

Lets get started...




Sunday, April 23, 2017

Installing wxPython on Python 3.x

Few years ago I wrote this blog post on "How to install wxPython (Phoenix) on Python 3.x". Since then, a lot has happened including the release of "wxPython 4.0.0a1"


So, today I decided to install the latest alfa release on my python 3 anaconda setup. I went to wx PyPi url downloaded the wheel file locally and ran: pip install wheel_file_name to install successfully as seen below.



I tested the installation, by importing wx and it work perfectly.



Congrats WX is now officially on python 3

Monday, April 10, 2017

Cleaning big data CSV file with Python

Hello there,

I know I can open a CSV file in a spreadsheet software like MS Excel or a text editor like NotePad++ and edit/clean its contents (by removing unwanted contents).

In a situation where by the CSV file is very big (big data - it contains millions of rows and columns), if you try to open such file in a spreadsheet software or a text editor there is possibility of memory error from the software you are using as seen in the image below. This excel error says: "File not loaded completely", the file appeared to be beyond MS excel capabilities.



This is where using a data oriented language such as Python comes in handy. Python pandas module can efficiently load/open and process such heavy duty big data files without much difficulties.

Saturday, April 1, 2017

Windows PostgreSQL installation Error - Unable to write inside TEMP environment variable path

Here is the solution to the "PostgreSQL installation Error - Unable to write inside TEMP environment variable path" on windows PC.

I downloaded the latest version of PgAdmin4 for PostgreSQL 9.6 from EnterpriseBD. When I tried to install it, I got this error massage: There has been an error, Unable to write inside TEMP environment variable path.




Solution to the Error


Now, to solve this error on your windows machine proceed as follow:-
1- Locate your windows sytem32 folder at: C:\Windows\System32



2- Inside the folder, find regedt32.exe file and run/open it


3- Navigate to this folder: HKEY_CURRENT_USER >> Software >> Microsoft >> Windows Script Host >> Settings



4- Right click on the "Enable" icon and select "Modify"



5- Change"Value Data" from 0 to 1 and click on "OK"



6- Close the Registry Editor and you are done.



Thanks for following.

Python break, continue and pass within Try... Except block

Hello there,

When using loops in python, there are situations when an external factor may influence the way your program runs.  You may want your program to exit a loop completely, skip part of a loop before continuing, or ignore that external factor. You can do these actions with break, continue, and pass statements respectively.

The "pass" statement is a no-operation (meaning that it doesn't do anything). The program just continues to the next statement, which is why you get an error.

The "break" statement exits the loops and continues running from the next statement immediately after the loop. In this case, there are no more statements, which is why your program terminates.

The "continue" statement restarts the loop but with the next item.

Sample Code

for letter in 'Python':
   if letter == 'h':
      break # continue pass
   print ('Current Letter :', letter)


Testing the above code for: break, continue and pass will yield different results as seen below:-





If we introduce a "Try ... Except" block and intentionally call an error, only pass will print the error statement at the end of the block statement.




Thanks for reading.

Sunday, March 26, 2017

Assigning single attribute to multi geometric features in QGIS

There are situations when you will want as many as possible geometric features within a shapefile layer to share the same attribute information within the attribute table.

This kind of scenario is commonly seen when representing Islands. The attribute data is the same, but the geometric representation of the Islands (in polygon) will be separated from each other to give way too water bodies.

As an example, am going to use a Nigerian state the has Islands (Bayelsa state). So, to digitize Bayelsa into wards polygons we have to deal with Islands. And here I have three polygons representing the same ward with ward_code 12 as seen below.

So, the task here is to merge or combine these same attributes into one and all the three polygons will share that same attribute information/row.



In QGIS, to make multiple polygons share the same attribute proceed like thus:-
1) First digitize the Islands polygons and assign the same attributes as usual
2) Go to Vector Menu >> Geometry Tools >> Singleparts to Multiparts


3) The next window will prompt you for the input layer (from a drop-down list) and the Unique ID field (Ward_Code) and you can specify an output file name. Select the appropriate information and click on run.


4) You should now have multi polygons sharing one row of your attribute table


Alternative method


Alternatively, you could use the "Merge Selected Features" command available in the Advanced Digitizing Toolbar as seen below:-


Select the polygons you want to merge there attributes and click on "Merge Selected Features" within the "Advanced Digitizing Toolbar", configure the attributes accordingly and click on "Ok".


That is it.
Thanks for following.

Wednesday, March 22, 2017

Using Python OpenCV to detect human face on Nigeria currency notes

Hello,

Below is a short video clip of a project am working on. It shows you about: Using Python OpenCV and Haar Cascade for Detecting human face on Nigeria currency notes




Happy viewing!

Saturday, March 11, 2017

How to merge multiple shapefile layers into one big shapefile layer

In QGIS, there are two common ways to merge multiple vector layers into one big vector shapefile layer. Namely:-

1) Using "Merge Vector Layers"
2) Using MMQGIS Plugin

I will only talk about the first option, since it is the default option made available in QGIS. For the second option, you will have to install the MMQGIS Plugin accordingly.


Merging multiple vector layers using "Merge Vector Layers"


This function is available under the menu Vector | Data management tool. You can merge all files in the input directory or select specific files in the input directory.






This algorithm combines two vector layer of the same geometry type into a single one. If attributes tables are different, the attribute table of the resulting layer will contain the attributes from both input layers.

The same applies as for MMQGIS Plugin: merged layers must all be of the same geometry type. Also, if the source layers have different attributes fields, the merged file will contain all fields, but with NULL values inserted when a source layer does not have a specific field.


Thanks for following.