QGIS Tutorial for Beginners
In this QGIS Tutorial Learn image to image Georeferencing. First, open two Raster images (a) Referenced image, and (b) Unreferenced image.
2. Georeferencing in QGIS is done via the ‘Geereferencer GDAL’ plugin. This is a core plugin- that means it is already part of your QGIS installation, You just need to enable it.
4. Now open the Unreferenced image in georeferencer plugin window.
Go to File > Open Raster, browse to your folder, select an unreferenced image, and click open.
5. In the next screen, you will be asked to choose the raster’s coordinate reference system (CRS). This is to specify the projection and datum of your control points.
Since WGS 84 (EPSG: 4326) is the most accurate CRS, select it and click the OK button.
6. The image is loaded on the top section of the georeferencer window. You can use the zoom/pan controls in the toolbar to learn more about the unreferenced image.
Now you need to assign a control point somewhere on the unreferenced image and also in the same location of the referenced image. Click on Add Point in the toolbar.
7. Using the Add Point tool click on this point on the unreferenced image, then from the Enter Map coordinates window. Click From Map Canvas button and click the same point on the referenced image.
8. You notice the GCP table now has a row with details of your first GCP.
Similarly, add another 3 GCPs covering the entire image. The more points you have, the more accurate your image is registered to the target coordinates.
9. Once you have enough points, go to Settings > Transformation settings.
In the transformation settings dialog open, choose the Transformation type > Thin Plate Spline, Resampling method >Nearest Neighbour, Target SRS >choose WGS 84 EPSG:4326, so the resulting image is in a widely compatible datum, Name your output raster. Make sure the Load QGIS when the done option is checked. Click OK.
10. Click the Start Georeferencing tool to finish the Georeferencing process.
11. Close the georeference plugin window, this now asked you to save GCP points. Click the save button to save the GCP points.
12. In the QGIS main interface, change the order of the layers in the Layers panel. An Unreferenced image should be placed on top of the Referenced image.
In the Layer Properties window, click the transparency menu and set global transparency 30%. Using zoom in and pan Tool check how the referenced .tif image matches with the unreferenced image.
13. Save the project as georeferencing.assignment.
Perform Ground to Image Georeferencing in QGIS Tutorial
In this QGIS Tutorial Learn ground to image Georeferencing.
1. Open QGIS Software, if it was not already opened.
2. Click on Raster > Georeferencer > Georeferencer to open the plugin. The plugin window is divided into 2 sections. The top section where the raster will be displayed and the bottom section where a table showing your GCP values.
3. Now open the Unreferenced image in georeferencer window. Go to File > Open Raster, browse to your folder, select the unreferenced image, and click open.
In the next screen, you will be asked to choose the raster’s coordinate reference system (CRS). This is to specify the projection and datum of your control points. If you are georeferencing a scanned map like this, you can obtain the- CRS information from the map itself.
Looking at our map image, the coordinates are in Lat/Long. There is no datum information given, so we have to assume an appropriate one. Since it is Asia and the map is quite odd, we can bet the Everest 1830 datum (1975 definition) would give us good results. In the Filter box, write down the word Everest: then all the CRSs related to Everest ellipsoid appear in the list. Select Unknown datum based upon the Everest 1830 (1975 Definition) ellipsoid (its EPGS code is 4045).
4. Now you need to assign coordinates to some points on this map.
Zoom to this area of the image shown in the two cross-line sections > Click add point> and click the cross two-line middle point > in the pop-up window, enter the coordinates, remember that x=Longitude and Y=Latitude.
5. Similarly, at least 4 GCPs covering the entire image. The more points you have, the more accurate your image is registered to the target coordinates. You will notice the GCP table now has rows with details.
6. Once you have enough points, go to Settings Transformation settings.
In the transformation settings dialog, choose the Transformation type > Thin Plate Spline, Resampling method >Nearest Neighbour, Target SRS >choose WGS 84 EPSG:4326.
The resulting image is in a widely compatible datum, Name your output raster. Make sure the Load QGIS when a done option is checked, Click OK.
7. Back in the Georeferencer window: go to File> Start Georeferencing. This will start the process of warping the image using the GCPs and creating the target raster.
Once the process finishes, you will see the georeferenced raster layer loaded in QGIS.
Change Projection (GCS to PCS)
2. In the Save vector layer as a window, choose Format ‘ESRI Shapefile”(i) > in the Save as a section.
Click the browse button (ii) and go to your folder.
Write down the file name and click Save button > in select CRS section (iii).
Select your map or area which (ex. goa zone is- WGS 84 / UTM zone 43N) projection coordinate system Zone (PCS).
If you do not found the above-mentioned coordinate system in the CRS window, then in the filter box write down EPGS: WGS 84 / UTM zone 43N. QGIS find the desired coordinate system and show the bottom section of the CRS window.
3. Uncheck Add saved file to map checkbox (iv) >Click Ok button to close the Save vector layer as Window.
Notice change the coordinates – Move the cursor around the map. In the Status Bar, see how the coordinates change; coordinates for the map are provided based on the position of the cursor.
Create a New Vector in QGIS Tutorial
In this QGIS Tutorial Learn How to create Vector Data or Shapefile.
Before you can add new vector data, you need a vector dataset to add it to. In our case, you’ll begin by creating new data entirely, rather than editing an existing dataset. Therefore, you’ll need to define your new dataset first.
You’ll need to open the New Vector Layer diulog thnt will allow you to define a new layer.
3. Click Polygon ratio button >Coordinate Reference System, or CRS.
The next field allows you to specify the specifies how to describe a point on Earth in terms of coordinates, there are many different CRSs. The CRS of this project is WGS84.
It’s already correct by default > click ok a save dialog will appear > go to your destination folder > write name >click OK
Set Snapping Option
Go to setting menu > Snapping option. In the snapping Options window open > snapping mode- Advance > check on Layer > mode- to vartex and segment > Tolerance- 10.00000 > Unites -pixels > check on Avoid intersection
Raster 2 Vector Conversion (screen Digitization)
1. To start digitization (mexico boundary), click the Toggle Editing tool. on the Digitizing toolbar.
2. click Add Feature tool on the Digitizing Toolbar and to begin digitizing right away.
You will notice that your mouse cursor has become a crosshair. This allows you to more accurately place the points you’ll be digitizing.
3. Start digitizing by clicking on a point somewhere along the edge of the boundary.
4. Place more points by clicking further along the edge, until the shape you’re drawing completely covers the first boundary
5. To place your last point, right-click where you want it to be. This will finalize the feature and show you the Attributes. Fill in the values as below and Click OK, and you have created a new feature
6. Click Save Layer edit tool to save the feature that you digitized.
Manipulate Features using Node tool
For shapefile, the Node Tool provides manipulation capabilities of a feature similar to CAD programs. It is possible to simply select multiple vertices at once and to move, add or delete them altogether.
Start by activating the Node Tool and selecting a feature by clicking on it. Red boxes will appear at each vertex of this feature.
- Selecting vertices: You can select vertices by clicking on them one at a When a vertex is selected, its color changes to blue.
- Adding vertices: To add a vertex. simply double click near an edge and a new vertex will appear on the edge near to the cursor.
- Deleting vertices: Select the vertices and click the Delete key. To delete a complete feature use the Delete Selected tool.
- Moving vertices: Select all the vertices you want to move, click on a selected vertex or edge and drag in the direction you wish to move. All the selected vertices will move If snapping is enabled, the whole selection can jump to the reset vertex or line.
Change style and Transparency using Layer Properties
In this QGIS Tutorial Learn How to change the style of Layer Properties.
The Layer Properties dialog for a vector layer provides general settings to manage the appearance of layer features in the map (symbology, labeling, diagrams, etc.). It also provides information about the layer.
1. Double-click you create a layer (Mexico boundary) in the Layers Panel or right-click > Properties, open layer properties window.
2. In Layer Properties window (see below figure), Click Style menu (i) from the left side panel, Click Simple fill option (ii). Then choose to fill color (iii) and Border color (iv) dropdown menu and select your preferred color, Border style(v) change Border width, and (vi) Set Layer transparency (vii).
3. Click Apply and ok button to close the layer properties window.
QGIS can save the state of your workspace into a project file using.
Project menu > save or Save As… and go to your folder, save the project name. Whenever you save a project in QG1S, the project file is made with the extension .qgs.
Create Line and Point shapefile
1. Navigate to and click on the menu entry Laye> Create Layer> New Shapefile layer.
2. Choose types, what you want, Point(i), or Line(ii) > Specify the CRS WGS84, WGS 84 is the default CRS(iii).
By default, a new layer has only one attribute, the id field (which you should see in the Attributes list)(iv) > Click OK, go your folder, require one name and save.
3. Go to setting menu > Snapping option.
In the snapping Options window open > snapping mode- Advance > check on Layer > mode- to vartex and segment > Tolerance- 10.00000 > Unites- pixels > check on avoid intersection.
Perform Road Feature Digitization
Before start digitization of Road features, if you see carefully the image then you realize that some road features are adjacent to country boundaries.
So, how shall we digitize such features? The answer is using an enable tracing option present in Advanced Digitizing Toolbar.
2. To start digitization of Road features, select the road_map layer from the Layers panel.
3. Click the Toggle Editing button on the Digitizing Toolbar > Click Enable Tracing > Click Add Feature button on the Digitizing Toolbar and to begin digitizing right away.
4. Trace boundary, digitize individual road segment, and input id.
5. Road features that are not adjacent to the boundary to be digitized in a normal way (click Enable tracing tool to make it off).
6. Click the Seve Layer Edits tool to save the feature that you digitized. Click the Toggle Editing tool, stop the edit session.
View attributes and changes feature a style of the road layer if you want in the same way mentioned earlier. Also, Save the project.
Perform Point Feature Digitization
1. To start digitization of point feature, select point layer from the Layers panel.
Click Toggle Editing button on the Digitizing Toolbar > click Add Feature button on the Digitizing Toolbar and to begin digitizing right away. Digitize all the point features and input their respective IDs.
2. Click Save layer edit tool to save the feature that you digitized. Click the Toggle editing tool to stop the edit session.
Convert Excel to GIS data using Spreadsheet Layers plugin
Installation of Spreadsheet Layers Plugin-
1. Click on Plugins menu, then Manage an Install Plugins.
2. In the Plugins window, click All(i) in the left panel > Type “Spreadsheet” in the search box (ii)> then select Spreadsheet Layers plugin (iii) from the below window and click Install plugin button (iv) > click the close button to the close window.
4. Click Browse button (i) > Go to your folder, select and open .xlsx file(EXCEL FILE) > have multiple sheets. Select sheet (ii) > write down Layer name(iii).
Finally, click the Ok button to close the Create a layer from a spreadsheet file window.
5. Now see add to Excel data file your QGIS layer panel.
Join Data with Shapefile
1. Select layer from the Layers panel, click the right button, choose Properties.
2. In the Layer Properties window, from the left-hand side panel click Joins(i) > Click Add vector join button(ii).
Then Add vector join window appears > in the Add vector join window, choose Join layer “goa_district”(iii), Join field “goa-id”(iv) and Target field “id”(v).
Check Custom field name prefix box and make empty the below text box(vi), > Click Ok button to close the Add vector join window.
Click Apply and Ok button to close the Layer Properties window.
The Open attribute table for a layer to see the appended fields of a table with the help of two common fields. Such as ‘id’ and ‘Goa-id’, present in .xlsx and goa shapefile respectively.
Remember that table join is not permanent, only saved temporarily within the project (.qgs) file. Now save your project immediately.
This reveals the select, you’ve selected in the Map View. These two steps demonstrate that the table and feature are linked, and you can select features in one or display than in the other.
Click the Deselect feature, unselect or clear all features.
Lebel and style for Vector Layer(Shapefile)
Labeling is an easy way to add descriptive text to point, line, and polygon features on your map. Labels are dynamically placed, and label text strings are based on feature attributes.
1. Add Label Toolbar (if not already visible in your QGIS application) by going to View menu> Toolbars > Label Toolbar.
2. Select the layer from the Layers Panel >right click >properties >Click Labels options tool > Label settings window open>place no labels dropdown, select-Show labels for this layer(i)> select Label with (ii)> and all settings as for you choose(font,style,size,etc(iii). All settings is complited click Apply and Ok.
Style for Vector Layer
The Style feature in QGIS provides you with a comprehensive tool for rendering a symbolizing your vector data. You can use tools that are common to all vector data. Special symbolizing tools that were designed for the different kinds of vector data.
1. Select the layer from the Layers Panel, right-click, and select In the Layer Properties window, select the style menu from the left side. 3 types of symbols used to Vector layer (i) single symbol (use to the normal background color in features), (ii) Categorized (use to multiple colors in features), (iii) Graduate (use to show low to a high value in the same color, for ex. Population Density).
Layout (Print composer)
In this QGIS Tutorial Learn How to Layout in QGIS.
The Print Composer provides growing layout and printing capabilities. It allows you to add elements such as the QGIS map canvas.
Text labels, images, legends, scale bars, basic shapes, arrows, attribute tables, and HTML frames. You can size, group, align, position, and rotate each element and adjust their properties to create your layout.
The layout can be printed or exported to image formats, Postscript, PDF, or SVG format. You can save the layout as a template and load it again in another session.
Now we can start to assemble our map. Go to Project > new Print Composer> composer title, then click OK. In the Print Composer window open, click on Zoom full to display the full extent of the Layout. Now we would have to bring the map view that we see in the QGIS Canvas.
Uses Item properties to proper Text, Font, Size, Symbol, Color, Broder, Background, Rotation, etc.
Add Coordinate value (Latitude & Longitude)- go to item properties > select Grids > + >choose Grid Type > changr CRS(WGS 84 EPGS 4326) > select the Interval value X & Y (it is varies to map scale) > choose Grid frame style > select Draw Coordinate check box > settings Format, left, right, top, button, font etc.