Sunday, November 6, 2022

How to do projection in QGIS?


Projection is the transformation of curved surface (latitude, longitude) of the earth to the flat/plane surface (XY). 
This allows to make a map with correct distance, area or direction. There are many different types of projection and which to use all depends on purpose of your analysis.

In this tutorial I'm going to show how projection is done in QGIS. 

For this, I will be using a boundary data of 'Siyari' VDC which is in WGS 84 (Geographic Coordinate system) and will convert it to WGS 84/ 44N (Projected Coordinate system).

Step1: Load the vector data ‘Siyari’ in Layers panel.


Step2: Double left click ‘Siyari’ layer -> Information -> under Coordinate Reference System you will see Name: EPSG:4326 - WGS 84 .


It means our data is in WGS 84 Geographic Coordinate System and we need to convert this to Projected Coordinate system. 

Converting data from Geographic Coordinate System to Projected Coordinate system

Step1: Click on Vector -> Data Management Tools -> Reproject Layer

A new window will appear where you have to  adjust some settings.

Step2: Keep Input layer as default-> click on earth icon in Target CRS


Step3: Search for 32644 in Filter menu -> click on WGS 84/ UTM zone 44 N -> click ok


Now your Target CRS will be seen as WGS 84/ UTM zone 44 N

Step4: Save it as ‘Siyari_44N’ to your desired location by clicking three dots icon in ‘Reprojected’ menu -> click Run


If everything goes fine you will get following output.

 


Now if you see its Coordinate Reference System. Now it has been changed to WGS 84/ UTM zone 44 N.

Finally, a new projected data has been obtained.

Wanna Watch video?


Friday, October 21, 2022

How to do Proximity analysis in QGIS?




Proximity is a neighbourhood function of GIS. It is similar to buffer analysis that we do for Vector but if it’s done for Raster then it is called proximity in GIS. 

In this article I’m going to show how it’s done in QGIS.

Since, there will be distance measurement make sure you u
se Projected coordinate system which has unit meters instead of Geographic coordinate system. Here I will be using WGS84 44N.

Follow the following steps:
Step 1: Loading data
Load your raster data ‘Raster_road’ in QGIS simply by dragging it to layer panel.

Step 2: Processing Toolbox
Go to Processing toolbox search for ‘Proximity’ under Raster analysis of GDAL section you will get ‘Proximity (raster distance)’ double left click it to get below interface.


Step 3: Parameters settings
Give input layer ‘Raster_road’, distance units ‘Georeferenced coordinates’, Max distance to generate ‘1500’, No data value to use as ‘Not Set’ and save it to as file ‘Proximity_road’ and run it.


Here we used Georeferenced unit as distance units so that output raster will have cell values representing no. of units in the current Coordinate Reference System(CRS), with each cell from Raster_road.
On successful run you will get following output.


Step 4: Symbology
Double left click ‘Proximity_road’ layer -> Symbology -> Make max value as ‘1500’(since we want range of buffer to 1500 only) -> click apply


Finally, you will see following output.


So, that’s all from us for today.

Happy analysis!


Saturday, October 15, 2022

How to convert vector to raster in QGIS?


Converting a vector to a raster is a very common process in GIS. In this tutorial I’m going to show how it’s done in QGIS in detail.
Follow the following steps:

Step1: Load your desired vectors in layer panel like shown below. Here I will rasterize ‘clipped_building’ vector.

Step2: Processsing Toolbox panel

Go to Processing Toolbox panel -> search ‘vector to raster’, -> under Vector conversion of GDAL section you will get Rasterize(vector to raster).


Step3: Choosing parameters

In input layer select vector that you want to rasterize, choose 1 as fixed value to burn, Georeference units as output raster size units, 15 as Width/Horizontal and Vertical/Height, Output extent as butwal_44N, Assign no data value as Not set. At last save it to a file as ‘Rasterized’.



Remember values you choose depends on for what purpose you are going to use the raster.

If everything is fine you will see output like this.


Definitions

Burn in value: pixel value that represents data(if set to 1 then your data will be white and rest all black).

No data value: invisible region outside the main data.

Vertical/Horizontal resolution: Determines no. of cells/pixels your raster will be formed. If you will give high resolution value then no of cells will be reduced and output raster resolution will be reduced and vice-versa for Georeferenced units.

Output raster size units:

Pixel units: Suppose if you set Vertical/Height resolution and  Horizontal/Width resolution as 5 then output raster will have pixels of 5 rows and 5 columns imagining raster as a matrix. This decides spatial resolution of raster.

Georeferenced units: Suppose if you set Vertical/Height resolution and  Horizontal/Width resolution as 5 then spatial resolution of each pixel will be 5*5(meaning height and width is 5) and it decides rows and columns of raster matrix.

Output extent: border of raster.

So, that’s all for today we will meet soon in next article.

References:

https://gis.stackexchange.com/questions/379889/qgis-3-16-rasterize-vector-to-raster-parameters

Pirotti, P. F. (n.d.). Multi Criteria Analysis ( MCA ) with GIS Find the best land for growing Mangoes in Madagascar using MCA !

https://www.qgistutorials.com/en/docs/3/multi_criteria_overlay.html




Thursday, October 13, 2022

How to log data in Madoca?


What is Madoca?
Madoca is a low cost GNSS receiver that uses QZSS signals to locate position. The whole instrument  consists of a dome shaped antenna, a receiver, a cable connecting antenna and receiver and a USB cable connecting laptop and receiver. Data is collected by precise point positioning method. The errors are automatically corrected by CORS stations and error free data is received by the receiver.

The best thing about Madoca is it is smaller in size, quite cheaper than survey grade receivers and give cm level of accuracy.

Logging data in Madoca
For logging data with Madoca receiver we need to have a desktop application called ‘Madoca Win’ installed on your laptop.

First of all open the ‘Madoca Win’  application. Once the application is opened there are some settings that  are to be adjusted. By default Rover is set to Online, Correction to Online and Processing mode to PPP-Kinematic. Configure  Rover as RX, Correction as DX and Processing mode as PPP-static in the application like shown below.

Fig1:  showing connection setup in MADOCA

Remember if the cables to the antenna or laptop is not connected properly or you don’t have them you won’t see the green loading symbol and values below ROVER, MADOCA and NMEA.

Now we will configure Setup for Rover and Correction

Rover setting
Click on Setup present on the right side of  Rover section. Keep Port and Baud rate value as  COM7 and 115200 respectively. Keep output data in .ubx format which will be later processed in RTKLIB.


Fig2: showing Rover setup setting of MADOCA

Correction settings
Click on Setup present on the right side of  Correction section. Keep Port and Baud rate value as  COM6 and 57600 respectively. Similarly, keep output data in .ubxformat.

Fig 3: showing Correction setup setting of MADOCA

Once all parameters are set data collection is started by clicking start/stop button. 
On successful parameter settingsyou will see the status screen like this.

Fig 4: showing status interface during data collection

You can wait for 30mins or more to log data. Lat/Lon Error goes on decreasing as more log time increases and more error free data can be obtained. You may also need to keep antenna on a tripod as it has better chances of getting QZSS signals quickly specially in crowded areas.

After Lat/Lon error are reduced significantly data log is stopped. Before stopping data log take screenshot of status menu and note down Latitude and Longitude. All logged data are stored in a folder MadocaLog in drive C. Inside MadocaLog folder you will see three folders ‘Correction’, ‘NMEA’ and ‘Rover’ and respective data inside them.

Further you can visualize collected Rover data in ‘RTKLIB’.



Friday, February 18, 2022

30DayMapChallenge

30DayMapChallenge is daily mapping/cartography/data visualization challenge  for the spatial community.  It is held every year in the month of November on Twitter. There are different themes of map making  for  30 days. Participants are expected to post their prepared  map each day  on Twitter based on a particular theme of that day with #30DayMapChallenge. Hundreds of people from different part of world participate in this event. It is not a competition but just a way to learn map making skill.

My experience

I had participated 30DayMapChallenge of last year. It was a beautiful  experience and a great way to learn and improve cartography skill. Those themes of map were not familiar to me before and instantly preparing a map takes time. Everyday we were supposed to prepare and post a map which  is challenging. Though I had prepared some  maps  in advance but it takes  time and effort to make a creative map. I was able to post only six maps in that month. 


Fig1: Map showing population density of Nepal 2020

It is among my  favourite map that I had prepared. Raster data was used and imported in Aerialod, an open source software for visualizing elevation data. With some settings configuration and in short time map was prepared and later exported to .jpg format.

This map simply shows the population with respect to height. Greater the height of those lines greater the population. Some other maps that I had prepared in that map challenge and their guidelines of making can also be viewed from here.


Fig2: Figure with different themes of map, Source: https://github.com/tjukanovt/30DayMapChallenge


Learnings

Whenever you get involved somewhere you get to learn something out of it. Some thing that I was able to learn through that event are listed below:

  1. Map making is not just limited to some GIS softwares like QGIS or ArcGIS. It can be done through R studio, Aerialod, web based platform like kepler.gl, python codes and in  many other ways.

  2. Map doesn't mean only as one generated through computers. A hand drawn sketch on paper, paintings on wall or cloths all with some spatial information and shape can be considered as map.

  3. Modern maps are shifting towards graphics/ visualization. One with some good sense and skill of graphics designing can get edge over the rest.

  4. Though webmaps are in trend these day but paper maps or one that doesn’t need coding still has a long stay.


Conclusion and Recommendation

Participating in these sort of event undoubtly helps to increase your skills. Beyond this there are also other things like #100DaysOfCode for improving coding skills. You can get engage there and work on the skill you want to improve.

I hope next time you will participate and prepare more maps than mine. 

Happy mapping!