Thursday, March 22, 2018

How to Obtain Location's Address From Google Maps using QGIS (Reverse GeoCode)

Easiest way to obtain location's address is using base maps such as Google, Openstreet etc...  In this post you will learn how to obtain location's address and store in ESRI shapefile using QGIS.

Step 1,


Install OpenLayers Plugin

Step 2,

Install GeoCode Plugin


Step 3,


Add layer group by right click on the layer panel

Step 4,




Set CRS (Coordinate system) to WGS 84

Step 5,



Open OpenLayers Plugin and select Google - Satellite map

Step 6,


Open GeoCode Plugin --> Select Setting 

Step 7,


To obtain addresses through Google we have to get the API Key. You can only get 2500 address per day free of charge and can depend on the API Key.

Step 8,


Zoom to the area of interest, Open GeoCode plugin and select Reverse GeoCode, and click on the building or the location,



New layer will be created in the layer panel and all the address will be recorded in that layer.


Step 9,


Open attribute tables to view the addresses



Step 10,



We can export this layer as ESRI shapefile


Further if you need to get the X,Y coordinate of a address you can select GeoCode option and type the address.  

Tuesday, January 23, 2018

Make DEM and Contours From Google Earth using QGIS

Digital Elevation Models (DEM) and Contours are always important for spatial analysis and difficult to obtain always as required. In this post we will use Google Earth to download Elevation data and QGIS to develop DEM and Contours.


Step 1,



Open Google Earth and Select "Add Path" tool


Step 2,


Draw point cloud as shown in the image.. Add much as possible to get higher accurate DEM. 


Step 3,



Once finished drawing point cloud change the name as you required and hit ok.



Save the file as Kml.




Step 4, 

We have to convert KML to CSV file format and have to update the altitude values of the KML. here I am using open source software "TCX converter" which is freely available to download, 


Download the .exe file which is supported to your operating system, 



Open TCX converter and default language will be "Dutch",




Change the language to English and the Select "Open File"option to open KML file,


Add ML file to the TCX converter,


Once KML uploaded to the TCX converter you can see Altitude field is containing "0" values. Hence we have to update the Altitude field and user must have internet connection for this.  


Select "Track Modify" tab and then select "Update Altitude" tab,


Now you can see updated Altitude field, Now we have to extract these data as CSV file, Select "Export"Tab and then Select "Save CSV File".


If you are using Ms Excel 2013 or a higher version select "No" option or else select "Yes",


Now all the data has been saved in to Excel as CSV file and we can delete unnecessary fields and must keep Lat, Long and Altitude  fields.


Step 5,

Launch QGIS  and select "Add Delimited Text Layer" option,


Browse for the CSV file created and select "CSV" option, the select "First record has field names" option and select X field as "LONG" and Y field as "LAT"


Press "OK" to add data to the QGIS


Step 6,


Your point cloud data will display in QGIS, now we have to assign the coordinate system,


Right Click on the layer and select "General" tab and the select required coordinate system (WGS 84 might be selected as default coordinate system)


Step 6,

Then we have to convert this vector layer into ESRI shape file,


Right click on the vector layer and select "save as" option,



Press "OK" and ESRI shapefile will create and automatically displays in the QGIS, remove the vector layer which we used to develop shapefile which no longer required,


Step 7,

Now we have to create Digital Elevation Model (DEM) using created ESRI Shapefile,
 Select SAGA (geoalgorithms) --> Natural Neighbour



Select  output extent as "Use layer/Canvas extent"


Select your shapefile as layer extent,


Set the cell size as 0,0005. the unit is degree due to layer coordinate been assigned as WGS 84.
Then set output path for DEM.


DEM will create and added to the QGIS,


You can reclassify the raster,  


Right click on the raster and select properties, Select "Single pseudocolor" as render type, X in Invert box and select number of classes you required and hit "Classify" button.

Step 8,

Now we have to extract contours from developed DEM, select "Raster" tab --> Extraction --> Contour


Set output file path and set the contour intervals as required and X attribute name and type the field name for the elevation attribute.



We can add labels to contour lines, Right click on the contour shapefile and select "label" tab, select "Show labels for this layer" option and select your elevation field as "label with" option.





Thursday, December 7, 2017

How to Develop Interactive WebGIS system in 5 mins

WebGIS is one of the latest technologies in GIS to publish data, Due to complexity and and lack of knowledge about Web Programming always a difficult barrier for GIS personals.  With QGIS2Web plugin anyone can easily develop attractive Web page.


Step 1,

Open QGIS --> Plugin and then Install QGIS2Web



Step 2,

Add required layers to the QGIS



Step 3,

Go to Web in the Toolbar and select QGIS2Web



Step 4,

X on the required layers to be displayed  


Step 5,

Set Zoom level to the layers, make sure to keep minimum  zoom level at 1.   



Step 6,

This Web page allow users to perform address search, Hence X on Address search and, Appearance in important in Web Pages, Therefore select Collapsed or extended option to display layers. 


Step 7,

This Web page allows users to Geolocate their locations for that X on the Geolocate user, and X on the Highlight on hover and Select required attribute to be search in layer search. Example : District 



Step 8,

X on measure Tool to add measure tool to web page and select other required options.  


Step 9,

Select required folder to export web page and users can always view the preview of the web page by pressing update Preview button. 


Step 10,

Select export button to Export your web system,


Select required background map, Such as OSM, Thunderforest etc...




Your exported web page will automatically open in the default web browser or you can open it later by browsing to given folder. 



Step 11,

Once you open your web system in the browser, you have to allow your location (only if you selected Geolocate user option)




Select location option to check your location,





Step 12,

Users can On and Off layers and possible to search for the layers, (According to given layers search option, In this example I have given District name to be searched) 




Step 13,

You can user measure tool to measure distance,