Select and calculate area, length and perimeters of features in QGIS

Select and calculate features according to area, length and perimeters in QGIS. Let us explore some selection technique and also how to use calculation in QGIS. To calculate these parameters we have to change the unit of the calculation to meters. If the layers are in WGS84 CRS we will get measurement in degrees, so first we have to change the CRS of our layers as well as our project. You can also look over other tutorials in QGIS.

To do this, we will import the vector layers which are in projected CRS and change the project CRS by changing project properties. For this map we have selected WGS 84/ UTM Zone 43N CRS you can select zone as per your region.

Select and calculate area, length and perimeters of features

Let us select the features which have area greater than 1000 meter square and save these features into different layer. To complete this task we need to implement following steps:

1.) Open QGIS and open a polygon shapefile layer in QGIS. Select the opened layer for which you want to calculate area.

Select and calculate area, length and perimeters of features 2.) Now click select feature using expression, from the tool box.  This will open up one window as shown below.

Select and calculate area, length and perimeters of features

3.)Find $area by going into geometry and select it by double clicking on it.

Select and calculate area, length and perimeters of features
Select and calculate area, length and perimeters of features

4.) Set the query as shown in image. Click select and then close.

Select and calculate area, length and perimeters of features5.) Feature which have area > 1000 have been selected and highlighted as yellow color.

Select and calculate area, length and perimeters of features

Select Within Selection Filter

1.) Now we want our selection to be more specific. We don’t want grounds in our selection but only buildings specifically which are university teaching department. To do this, lets implement steps.

2.) Again open select feature using expression tool. We will go to fields and values and select amenity. On clicking it we will get all unique values in the amenity field. We set the query as shown in the image.

Select and calculate area, length and perimeters of features
Select and calculate area, length and perimeters of features

3.) Don’t click on select instead click on drop-down near it and click select within selection and then close.

Select and calculate area, length and perimeters of features4.) Look at the results.

Select and calculate area, length and perimeters of features

5.) This selected layer can be saved as another file by just Right click on the layer and click save as.

Select and calculate area, length and perimeters of features6.) Click on the option save only selected features. Click on browse button and save the layer to the desired destination. The layer will be saved and added to your canvas.

Select and calculate area, length and perimeters of features
Select and calculate area, length and perimeters of features

Calculate Length of features

There are many ways to calculate these Length, area, perimeter etc parameters. It depend on us which way we select. The result will be the same all the time. Let us check them one by one.

1.) Open the attribute table of the roads layer and then Click on the field calculator.

Select and calculate area, length and perimeters of features

Select and calculate area, length and perimeters of features

2.) You will find three options to calculate and take a look on values, as follows:

  • Create a new field: A new field will be created and editing will be automatically enabled so that you can save the new field.
  • Create a virtual field: A new field will be created and editing will be automatically enabled so that you can save the new field, and if you don’t want to save it will automatically delete the column when you close the attribute table.
  • Update existing field: This will update the existing field with the new data.

3.) Set the calculator as shown in image. Click OK and take a look at the attribute table.

Select and calculate area, length and perimeters of features
Select and calculate area, length and perimeters of features

Select and calculate area, length and perimeters of features4.) You can see that the toggle editing tool has been activated automatically. Save edits. And close the attribute table.

5.) Now let’s calculate length with another method. Click on toggle editing tool in the attribute table. Then click on new column.

Select and calculate area, length and perimeters of features

Select and calculate area, length and perimeters of features

Select and calculate area, length and perimeters of features6.) Fill the text boxes and click ok. And then click save edits.

7.) Now again click on the field calculator and click on the update existing field, select length from the Drop-down menu.

Select and calculate area, length and perimeters of features8.) Calculate the length as above and click ok.

Select and calculate area, length and perimeters of features9.) The field is updated. Click on save edits and then click toggle editing to disable editing. You can also delete a column or two by going into editing mode and click delete column.

Select and calculate area, length and perimeters of features10.) Now let’s take a look at another method. We can calculate length without going into field calculator also. Create a new column as shown above and then select the column here as shown in image.

Select and calculate area, length and perimeters of features11.) Click on the expression dialogue sign in front of the column name.

Select and calculate area, length and perimeters of features
Select and calculate area, length and perimeters of features

12.) Now you can calculate the length by selecting $length. Click ok. You will see the column is not updated.

Select and calculate area, length and perimeters of features13.) Click on update all button.

Select and calculate area, length and perimeters of features14.) Now the column will be updated. Click on save edits. Then disable editing.

15.) If you want to calculate length for a particular feature only for example length of primary roads only so first select the row which contains primary roads and then calculate length and then click on the button update selected.

Similarly you can select filter features and also calculate length, area, perimeter etc in QGIS. If you are getting any problem in following the steps provided, do comment below with the problem statement. This will let us to discuss over it.

Measure Straight line distance in Google Map

Measure Straight line distance in Google Map between two points. Straight line distance can be calculated with Haversine distance formula or Great circle distance formula. Google Map, a web mapping service application and technology, which provides and enrich a common user experience for free, like, Route planner for traveling by foot, car or public transportation with estimated travel time, Congestion description on current time or with prediction time, measure distance from one place to other either straight or route wise, see near by location and many more. You  can easily calculate straight line distance measurement, by just following simple steps.

Measure Straight line distance in Google Map:

Note: Google provides two different version of map as, Classic Google Map (now with new Google Map Lite mode version) and a newly customized Google map. For both version, different steps are to followed to calculate distance. Below are the methods for both.

measure straight line distance in Google map
measure straight line distance in Google map

New Google Map: Measure Straight line distance:

1.) Open Google Map in your browser.
2.) Right click, from your starting point on Map, and select Measure Distance options.
3.) Click on destination point to which you want to measure distance. Done.

measure straight line distance in google map
measure straight line distance in google map

4.) Under the search box, see the calculated distance, as shown below in the figure.

How to switch between Google classic map and Google new map. Now switch to Lite Mode Google Map version.

Classic Google Map: Measure Straight line distance:

1.) Open Google map in your browser, and login with your Google all in one account.
2.) Click on Map lab link, appearing just left bottom panel.
3.) Enable “Distance Measurement tool”, and save changes.

measure straight line distance in google map
measure straight line distance in google map

4.) Click on ruler icon which appear at the lower left hand corner of map.
5.) Click on your start point and the end point, this will give your straight line measurement, shown in the left panel as shown.

measure straight line distance in google map
measure straight line distance in google map

Google map provides many feature, you can explore many other features as:

Hope this article helped you, to measure straight line distance, between two points. Do comment, below with your experience to calculate distance on Google Map.