Saturday, July 28, 2018

How to Extract Accurate Point Coordinates and Heights from Google Earth

In this post, we will use free software to extract height/elevation/altitude of points above sea level for any location in the world from DEM (digital elevation model) databases. This is fairly good data for drawing contour maps, draw a profile of a track or to colorize points by height above sea level.

The sources of the elevation data is from a DEM (digital elevation model) databases as explained below:-

DEM data sources
USGS: NED The U.S. Geological Survey's excellent National Elevation Dataset covers the United States, Canada, and Mexico. 1 arc-second (~30-meter) horizontal resolution is available in most areas (NED1). For Alaska, 60-meter data is also available (NED2). 
NASA: SRTM1 NASA's SRTM1 database (from the Space Shuttle Radar Topography Mission) has a resolution of about 30 meters. Previously, SRTM1 data was only available for the United States (and was not very useful because NED1 is generally better), but recently NASA has released SRTM1 tiles for the entire world. GPS Visualizer's server does not contain the full global dataset, but it does contain all of Europe, Japan, South Korea, and Taiwan, as well as parts of Australia, New Zealand, and South Africa. Additional locations will be installed upon request. 
ASTER: The ASTER GDEM is a joint product of NASA and the Japanese Ministry of Economy, Trade, and Industry (METI). ASTER has very good 30-meter coverage of the entire world, but the awkward download process and the massive size of the database make it impractical to store all of it on GPSVisualizer.com. ASTER files for Iceland are available, however, since none of the other 30-meter databases cover that area. (As with SRTM1 data, additional files can be added upon request.) 
NASA: SRTM3 NASA's SRTM3 dataset includes 90-meter resolution for the entire world.

Monday, July 23, 2018

GIS Base map with Web Map Service (WMS)


Web Map Service (WMS) is a convenient way for an organization to publish or share spatial datasets online that can be readily used in GIS. WMS is a popular standard for publishing maps on the internet.

WMS is hosted on a remote server. Similar to a website, you can access it as long as you have a connection to the server. WMS is a standard protocol that serves geo-referenced map images using data from a GIS database.

With WMS you have access to a live service that will automatically refresh its view if you pan or zoom on the map. So, you always have access to the latest and upto date published data.

WMS are perfectly use as background maps for GIS project. It can be used on web, mobile and desktop GIS applications. All you need is the WMS getURL (GetMap or GetCapabilities) from any of the organizations that publish or share spatial datasets online.

Some WMS organizations are:-
1~ USGS: https://mrdata.usgs.gov/wms.html
2~ Boundless Geo: https://demo.boundlessgeo.com/geoserver/web/
3~ Mundialis: https://www.mundialis.de/en/ows-mundialis/
4~ Terrestris: http://ows.terrestris.de/dienste.html#wms
5~ Geofabrik: http://wms.geofabrik.de/
6~ The Hug: https://www.the-hug.co.uk/mapping/tileserver.html
7~ Omniscale: https://maps.omniscale.com/en/
8~ WhereGroup: https://www.wheregroup.com/de/osmwms
9~ Sinica: http://gis.sinica.edu.tw/worldmap/wmts

Friday, July 20, 2018

Difference between GeoJSON and TopoJSON

In the Geospatial industry, data handling and conversion is a vital skill especially when data are been moved from on platform to another.

Some data formats work better on one platform than another. For example, data in shapefile format are more flexible on desktop apps than on web apps. If you are looking for an excellent data format to use on the web, then "GeoJSON and TopoJSON" data formats are your best option. But what is the difference between "GeoJSON and TopoJSON"?

In this post, I will attempt to differentiate the two powerful web based geospatial data formats (GeoJSON and TopoJSON).

GeoJSON is an open standard format designed for representing simple geographical features, along with their non-spatial attributes. Both GeoJSON and TopoJSON are based on JSON, the JavaScript Object Notation.



As extracts from Noah Veltman of mapstarter.com and Mike Bostock (and other contributors to the TopoJSON extension) repectively:-

GeoJSON and TopoJSON are two web-friendly file formats for geographic data.
A GeoJSON file is a text file with a list of features and, for each one, a bunch of latitudes and longitudes describing its geometry.
A TopoJSON file is similar, but instead of storing the latitudes and longitudes directly, it describes the topology (geometrical properties and spatial relations of figures) of a group of features, meaning the borders between them. TopoJSON files are usually much smaller, but require a little bit of extra processing in the browser when you want to display one on a map, and can potentially lose details from the original latitudes/longitudes.

TopoJSON is an extension of GeoJSON that encodes topology. Rather than representing geometries discretely, geometries in TopoJSON files are stitched together from shared line segments called arcs. TopoJSON eliminates redundancy, offering much more compact representations of geometry than with GeoJSON; typical TopoJSON files are 80% smaller than their GeoJSON equivalents. In addition, TopoJSON facilitates applications that use topology, such as topology-preserving shape simplification, automatic map coloring, and cartograms.

The advantage of TopoJSON over GeoJSON is size and encoding of topology. So, if the file size or topology of feature is paramount to you, use TopoJSON instead of GeoJSON.

Monday, July 16, 2018

Map of 2018 Ekiti State Gubernatorial Election Final Result


The much anticipated 2018 Ekiti state gubernatorial election has come to pass and 24 hours after the result has been announced by INEC, Nigeria social and news medias are flooded with the result.



Unfortunately, non has analysed the result on a map. In this post, I will related the result to map of Ekiti state so we can see the spatial relationship in the result.

Ekiti state has 16 local governments and 177 electoral wards.



Thursday, July 12, 2018

Geo-visualization of FIFA 2018 World Cup

As stated on Wikipedia page: The 2018 FIFA World Cup is the 21st FIFA World Cup, a quadrennial international football tournament contested by the men's national teams of the member associations of FIFA. It is currently ongoing in Russia starting from 14 June and will end with the final match on 15 July 2018.




In this post, I will attempt to visualize the participants on a world map starting from qualifying countries, group stage, round of 16, quarter finals, semi finals etc.


Let's get started....

Saturday, July 7, 2018

Python and Data Science Blogs

The list below are some of my favorite blogs I have followed and gained alot of from over the years. I hope you will also like them.

Some useful blogs for python and data science enthusiasts:-

~ dataquest.io

~ datasciencelearner.com

~ datacamp.com

~ dataschool.io

~ medium.com

~ dataelixir.com

~ towardsdatascience.com

~ stackabuse.com

~ ImportPython.com

~ pyimagesearch.com

~ elitedatascience.com

~ pythonforengineers.com

~ flowingdata.com

~ kdnuggets.com

~ quora.com

~ datatofish.com

Wednesday, July 4, 2018

Geo-spatial Professional Areas of Interests

The Geospatial industry is quite a vast industry that encompasses many areas of interest. In this article, I will briefly take a look at the most common areas.

As someone who works in the Geospatial industry, you will find yourself doing one or more combinations of this areas of interests:-


Tuesday, June 12, 2018

Modern Map of Ancient Kano City Gates (Kofa)

Kano City Gates - Kofofin Garin Kano

The amazing structure (the ancient walls of Kano city, Nigeria) was built during the reign of King Kijimazu (Sarki Gijimasu) between 1095 through 1134 and completed in the middle of the 14th century. They are ancient defensive walls built to protect the inhabitants of the ancient city of Kano and were described as "'the most impressive monument in West Africa".

Below is a copy of a Map produce in 2004 by 'Geography Dept, Bayero University, Kano (BUK)' showing the accient Wall and Gates.



The ancient wall is a 14km radius earth structure that surrounds the Dala Hills, Kurmi Market and Emir's Palace located in the heart of the modern day city of Kano as seen as the darkest spot on the map below.


The Ancient Kano City Walls originally had an estimated height of 30 to 50ft and about 40ft thick at the base with 15 gates (kofa) around it.

The names of the gates are:-
1~ Kofar Kansakali
2~ Kofar Kabuga
3~ Kofar Gadonkaya
4~ Kofar Dukawuya
5~ Kofar Waika/Adama
6~ Kofar Wambai
7~ Kofar Mazugal
8~ Kofar Mata
9~ Kofar Nassrawa
10~ Kofar Dan Agundi
11~ Kofar Na'isa
12~ Kofar Ruwa
13~ Kofar Fampo
14~ Sabuwar Kofa
15~ Kofar Dawanau

In todays modern Kano city, the gates are all that is left. Ninety percent of the walls have since disappeared, they are either gone or crumbling, very soon there will be nothing left of it and history of the walls would be erased completely.

Most of the gates have been rehabilitated and rebuild by the past Kano state government.

Adeyemi and Bappah coducted field survey in 2010 and obtained the following "Summary of Wall Measurements and Observations" below as published in their research paper.

Source: Conservation of Kano Ancient City Wall and Gates: Problems and Prospects in Nigeria, (2010)

Saturday, June 9, 2018

Street-level Map of Nigeria Cities

Most at time it is almost impossible to find an updated and editable version of Nigeria city map at street-level that shows details such: Buildings, Landuse, Natural features, Places, Places of worships, Railways, Roads/Streets, Traffic, Transport stations, Waterways etc.

Such detailed maps are great for many task including for city planning. In this post, I present to you a street-level map data at scale for all major cities in the country.



Lagos City, Lagos (State) - Badagry, Epe, Ikeja, Ikorodu, Lagos, Mushin, Shomolu




Eastern Cities, Enugu (State) - Enugu, Nsukka | Anambra (State) - Awka, Onitsha | Imo (State) - Owerri | Abia (State) - Aba, Arochukwu, Umuahia



Friday, June 8, 2018

Unable to parse KML file in python 3 with PyKML module

Introduction

Recently, I picked up a project where I had to read/parse in a point KML file and do reverse geocoding on the latitudes and longitudes coordinates of the points. So, I found a nice python module that will help me accomplish this. But I found out that it doesn't work fine on python 3 installation but works great on python 2.

When I import pyKML as follow "from pykml import parser" in python3, it returns the error as thus: ModuleNotFoundError: No module named 'urllib2'

I knew the pyKML module was trying to work with 'urllib2' module which has changed in python3. Since python2 will soon be discontinued, I have to find a solution for it to work on python3.

Ok, just in case you don't know pyKML, according to the documentation, pyKML is a Python package for creating, parsing, manipulating, and validating KML documents/files. A KML is language for encoding and annotating geographic data used by Google Earth, Google Maps and a number of other GIS platforms.