Measure Area in Google Map – Print and share measurement

Google Maps, a web mapping service of Google provides a very easy way to calculate and measure Area in google Map along with distance measurement. This would let you measure an area of any geographic location viz home, buildings, Grounds, city, etc from any where without visiting the location with just few clicks with Google Maps.

Measuring area is of the most important part of GIS analysis before coming to a conclusion of any project of construction or any other industries. Yes, as a fact to show to your customer or client, you need to provide a printed or soft-copy version of area and its measurement. Google Map provide the feature to print and save soft copy of the map after performing operation, which can be performed with the steps written below.

measure area in Google map

Steps to Measure Area in Google Maps:

1.) Open Google Map and check whether you are not in a Lite Mode Google Map, as Lite Mode does not provide an option to calculate and measure area. If you are in Lite mode than switch back to Full mode of Google Maps.

2.) Navigate to area in a Map of which you want to calculate the area.

3.) Right click on Map from the starting point of the area and select Measure Distance as shown below. (Don’t worry and continue the process as it will calculate area also along with distance.)

measure area in Google map

4.) Click on the map to create points so as to create an appropriate area. If you want to get the correct and good result, you should zoom in the map and click along the points to make an area. Remember to get the result in area, you need to connect the last point with the first point on Google Map other wise the measured unit will always be length and not area. Once you connect last and first point, you will get the measurement in distance as well as area.

measure area in Google map
measure area in Google map

If you find any point to be incorrect you may drag the point to get in the correct position or you may again click the point to remove the same. You may also clear measurement with the option provided with the right click on map.

  • Note : Both English and Metric unit System is supported in Google map depending upon your location. If your map is zoomed out and you are measuring a large area, the distance unit will appear in square miles (sq m) or square kilometers (sq km) while if the distance measured in Zoomed in map, then the area unit appear to be in the square feet (sq ft) or square meters (sq m).

You can explore Google Map more feature with the following articles listed:

Print Measure Area in Google Maps

You can easily make a print of the area along with the measured unit, the area covered and the title of the map shown. After performing the above steps. Right click on Google map and select print option. It will take to print section where you can also put up your notes which will appear on just above the maps and the measurement units just below the map.

measure area in Google map

Now you can easily share the printed or soft copy of the measured area on the map. A sample example of the image generated by google map is shown below.

Print measure area in Google map
Print measure area in Google map

Comment below if you are getting any problem in performing the above steps. You may also list the tools which provide the same solution and which you prefer by commenting on the section provided below.

Add table attributes with joining two files in QGIS

Want to add more attributes in your Shapefile to respective feature? QGIS an open source tool, which I recommend to every Geographer for use, can give you direct solution. Sometimes we need to join more attribute to a GIS vector files which ultimately provide more power to you for analysis with more attributes. For joining two file to add more attribute you need to have a common attribute field in both the files, same as like you need to have primary and foreign key to join two table data in SQL. QGIS provide us the facility to Add more table attributes with joining two files .

You may also be interested to see how to perform Spatial Join in QGIS and other tutorial in QGIS.

 

Add table attributes with joining two files

Steps to Add table attributes with joining two files in QGIS:

We are performing this steps with Shapefile and csv file, while you can also perform the same steps with other GIS vector file and csv file.

1.) Open QGIS and add a shapefile and observe its attribute table.

Add table attributes with joining two files

Here we have two columns.

Add table attributes with joining two files2.) Now We have a comma separated file(.csv) which has to be added. Having two columns i.e osm_way_id and amenity as shown below.

Add table attributes with joining two files
Add table attributes with joining two files

Note : Both the field will store in String format as we have not defined the field type. To define field type, create a new file with the same name of that of csv file but with csvt format in the same folder. For above instance the content should be written as :

“Integer”,”String”

in the file. We can see that osm_way_id is the column which is common in attribute table of shapefile and .csv file. So we can join this two using the same.

3.) First we have to import this file in QGIS. QGIS provide us the facility of importing files which do not have any geographic information also. While importing .csv file we have to take care that default type for .csv file is string if .csvt file is not present in the folder.

QGIS will look for .csvt file for data type in the same folder of same name. If not found all the data would be imported as default type i.e String. Now here all the columns are string so we are not creating a .csvt file.

4.) Lets import this file in QGIS. Click layer than Add Layer and select Add Delimited Text Layer.

Add table attributes with joining two files5.) Select csv radio button and then select no geometry radio button.

Add table attributes with joining two files
Add table attributes with joining two files

6.) Click ok. The file is imported.

Add table attributes with joining two files7.) Let’s join both tables. Open properties dialog box of the layer for which we want to perform join.

Add table attributes with joining two files8.) Click on join.

Add table attributes with joining two files9.) Click on plus sign.

Add table attributes with joining two files10.) Set the dialog box as in the image. We have chosen the field according to which we want to join and the field which we want to join with the table. By default all the fields are added.

Add table attributes with joining two files
Add table attributes with joining two files

11.) Click ok.

Add table attributes with joining two files12.) Click ok for properties dialog box.

13.) The tables are joined. Open the attribute table for the layer for which you performed join. The column name Book1_amenity shows that it was imported from Book1.

Add table attributes with joining two files
Add table attributes with joining two files

Comment below if you are facing any problem in adding attributes data to respective features in QGIs with Join function.

QGIS 3.2.1 User Interface

 

Insert Shapefile in MySql as Spatial Data

MySQL supports Spatial data type that corresponds to OpenGIS Classes. While MySQL is not one of the recommended database to store spatial data, but it definitely adds value if you have only one option to store GIS data. For instance I need to dump the Shapefile in MySQL, when I need to render the spatial data with leaflet in order of sorted latitude longitude one by one. This could be easily possible to get the spatial data from MySQL where we don’t need to use any GIS API to get and perform spatial operation.

Insert Shapefile in MySql as Spatial Data

To dump or insert a shapefile in a MySQL server we need to install ogr2ogr tool in our machine. If you have a windows machine and you have installed QGIS using OSGeo4W then this tool comes with the org2ogr package.

update: You may also see the ogr2ogr in program files folder of QGIS as shown below.

Insert Shapefile in MySql as Spatial Data

Insert Shapefile in MySql as Spatial Data

1.) Now open the MySQL server and create one database or use one of the existing database. I have made a database named as “spatial”.

2.) Open the command prompt as administrator. I have ogr2ogr file in C drive->OSGeo4W->bin folder. So navigate to this path in command prompt with change directory command (cd).

Insert Shapefile in MySql as Spatial Data

3.) Now write the command as follows:

ogr2ogr –f MySQL MySQL:database_name,host=localhost,user=database_username, password=database_password path/to/shapefile  -nln datatable_name -update -overwrite -lco engine=MYISAM.

Where you need to edit the bold word written above according to system configuration and need.

Note: If table and its column is not created, then the above command will automatically will create the table name as “datatable_name” as indicated above. You may also define SRS by giving argument as  ‘-a_srs “EPSG:4326″‘.

Reference : http://www.bostongis.com/PrinterFriendly.aspx?content_name=ogr_cheatsheet

I hope this post would helped you to insert spatial data in MySQL easily and you are now eligible to perform Spatial Queries on MySQL data. If you still find problem in performing any step above, do comment below with details, we may look and discuss over the same.

Everything about Web 3D Map – Examples, Tools, Library and Uses

Map with third dimension on Web gives you a new way to visualize reality. Isn’t that cool if you get to know building level detail,  Analyze the surface by getting elevation detail and get the actual visualization to some extent even without visiting the area. Adding third dimension to a map is an add-on for geographers, government bodies and to every individuals for proper understanding the geographic area.

Website with power of internet is connecting every people in this world, to acquire knowledge and now creating and viewing a 3D map on website without adding a plugin is an awesome. Before moving to see Examples and Libraries lets list out some uses for 3D Map.

3D Map

Uses of Interactive 3D map:

Several industries like Retail, Real Estate, Tourism, Geo Advertising, Smart cities etc can take advantage of Web 3D Map with existing GIS database knowledge.

1.) Get introduced to a new place before taking a tour to an unknown area.

2.) Create a walk-through of newly constructed building to visualize new concept easily.

3.) Visualize 3D Flood modeling simulation while planning construction development.

4.) 3D urban map with existing GIS databases.

5.) Get better understanding of 3D elevation view of natural features like mountain, canyons etc.

6.) Campus planning – Better understanding shadow effects, sun exposure, road etc.

Finally 3D Map brings more idea to your GIS analysis.

Amazing Library which helps you to create web 3D Maps easily:

You can now easily build and visualize your 3D Map model on website without adding any plugin or additional addon. This all can be possible with the help of WebGL technology which is a JavaScript API for rendering interactive 3D graphics. This libraries can help you to create interactive map which helps you to see the data on basemap, zooming and panning functionality which can be incorporated easily with the help functionalities provided.

1.) OSMBuildings GL – 3D Map Library:

Osmbuilding 3D map

Demo : OSMBuilding Demo

Download Library Code : Github Code

Type : Open Source, MIT License

Technology : WebGL, OpenStreetMap, OpenCage Geocoder, MapBox tiles

Developed By : Jan Marsch

2.) ViziCities – 3D Map library:

Vizicities 3D map

Demo : ViziCities Demo

Download library Code : Github Code

Type : Open Source, MIT License

Technology : WebGL via Three.js and openstreetmap

Developed By : Robin Hawkes & Peter Smart

3.) CesiumJS – 3D Map Library:

Cesium 3D map

Demo : CesiumJS Demo

Download Library Code: Github Code

Type : Both Commercial and Open Source with Apache 2.0 License

Technology : WebGL

Developed By : Analytical Graphics, Inc. (AGI)

4.) Tangram – 3D Map Library

Tangram 3D Map

Demo : Tangram Demo

Download Library Code : Github Code

Type : Open Source, MIT License

Technology : WebGL, OpenStreetMap

Developed By : Mapzen

Other Libraries, Tool and Examples for 3D Map

ESRI CityEngine: A software which Transform 2D GIS Data into Smart 3D City Models. You may look further docs here.  An Awesome Example of 3D Map with the help of ESRI CityEngine.

Octomap: Probabilistic 3D Mapping framework. Its an open source map under New BSD license. You may see Github code from here developed by Kai M. Wurm and Armin Hornung, University of Freiburg.

Android 3D map with Nutiteq SDK: You may see the github code from here and is licensed under MIT License.

You may Further research over Glob3Mobile which is the multiplatform advanced visualization framework and
Ol3-Cesium – 3D for OpenLayers map.

What you think about 3D map on website. Do comment below with  if you are looking to develop or want to create a sample or you know any new libraries which I have not listed here?

How to Georeference Map Image with Geo Coordinate Control points

How to Geo-reference Map Image with Geo Coordinate points in QGIS (Quantum GIS). Georeference is a process to associate geographic location coordinates to any kind of physical object which is physically present over a Raster image map or to a physical map, with help of other georeferenced data or with know location coordinates of some points of image which is effectively called as control points. Georeference is one of the important concept of GIS (Geographic Information System). Here we will see how to Georeference map manually in QGIS. You can also see how to georeference from one map to another and other QGIS tutorial.

Here is the steps to georeference raster image map in QGIS:

1.) Open QGIS and Import your image map using ADD RASTER LAYER in QGIS.

Georeference Map Image with Geo Coordinate Control points in QGIS2.) We need to find the control point and known geolocation coordinates. I prefer Google Maps to get the Latitude and Longitude values.

Go to google map and search the location which matches your image map location on it. Select a point in google map which matches in your map. You can also switch to satellite view. Select a point such as any land mark place as per your convenience. Right click on that point in Google Map and click what’s here you will see it will display latitude and longitude of the point.

Georeference Map Image with Geo Coordinate Control points in QGIS 1
Georeference Map Image with Geo Coordinate Control points in QGIS 1

Georeference Map Image with Geo Coordinate Control points in QGIS 1

3.) Latitude is written first and the second one is longitude. Also notice (-) sign (if present). Note down the points. Likewise select at least 4 points in different directions and note down the latitude and longitude of them.

4.) Moving to QGIS tool, Right click on the Raster layer and click remove.

5.) Now go to Georeferencer, you will find it in Raster tab, if you already have installed georeferencer plugin. If you don’t see the option, click Plugins and then select manage and install plugins. Search for georeferencer and install the same as shown below.

Georeference Map Image with Geo Coordinate Control points in QGIS
Georeference Map Image with Geo Coordinate Control points in QGIS

Georeference Map Image with Geo Coordinate Control points in QGIS 56.) Import your map here and click add points. You can pan and zoom here.

Georeference Map Image with Geo Coordinate Control points in QGIS

Georeference Map Image with Geo Coordinate Control points in QGIS

7.) Click on the location on your map which you selected on google map as control points. You will see a window demanding X,Y values. Put longitude value in X and latitude value in Y.

Georeference Map Image with Geo Coordinate Control points in QGIS8.) Like wise add all the points. Go to Settings and click Transformation Setting.

Georeference Map Image with Geo Coordinate Control points in QGIS9.) Select any one Transformation Type and Give your output raster name.

Georeference Map Image with Geo Coordinate Control points in QGIS
Georeference Map Image with Geo Coordinate Control points in QGIS

10.) Click load in to map canvas when done or if you forget to do so you can import the georeferenced map from the location where you saved it. The extension for the map will be .GeoTiff.

11.) Select CRS WGS: 84 because we are using Latitude and Longitude.

Georeference Map Image with Geo Coordinate Control points in QGIS12.) Now click start Georeferencing symbol as shown below:

Georeference Map Image with Geo Coordinate Control points in QGIS

13.) Close georeferencer. You will see georeferenced image in canvas. Note the coordinates.

Georeference Map Image with Geo Coordinate Control points in QGIS

I hope this article would be helpful for you to know the basics of how to georeference raster image with the help of control points. You are getting problem in implementing the process do comment below, so that we can discuss over it.

8 Best Alternative to Google Map Engine API

Alternatives to Google Map Engine API. You might be looking for this, as Google have announced earlier in January 2015 for Map Engine API depreciation and deactivated after January 29, 2016. This would also result in all your account Geo-referenced data losses, which you should have already exported.

GME as a Google product provides mapping services to many individual and organization. This leads us to explore for more alternative with features which is provided by GME, which are listed. Many of the below listed mapping services have different pricing plans, which you can choose after experiencing free trial plan and options from them.

Following are few of the listed services provided by Google Map Engine, which you may look before comparing the alternatives:

  • Upload vector or raster data of different formats
  • Display vector or raster data over Google Base Map
  • Edit features of layers uploaded from Google Map Editor interface
  • Make legends from layers
  • Export or import map data
  • Style layers directly according to the data classification
  • Access and share data from any where, any device and anytime and many more…

We have also listed Alternatives to Google old map after their switch from Google old or classic map to new Google map.

Alternative to Google Map Engine API
Alternative to Google Map Engine API

List of 8 Best Alternatives of Google Map Engine API

IGIS Map – An Alternative to Google Map Engine

map.igismao.com

MapOG Analysis (Earlier named as IGISMAP now changed to MAPOG) is a web based GIS application. Here you can create your own map, convert GIS format into other format, share your created map. IGISMAP tends to be number 1 choice for many GIS and all other industries users who want to create, share, analyse and embed map.

Feature of IGISMAP :

  • No coding skills required – Just drag and Drop and Few clicks to create Map
  • Simple and Easy User Interface
  • Multiple Base map supports
  • Ultimate Query and Analysis Tool
  • Best Data security and User access control feature
  • Multi roles support – Admin, Developer or Business User
  • User Cloud data security is our first priority – Scalable and reliable
  • Cost Effective and simple pricing – much cheaper and more storage with data hosting on AWS secured servers.
  • All Major GIS Spatial files support – Shapefile, CSV, Excel, MapInfo, GPX, KML, KMZ, TopoJSON, GeoJSON, GeoTiff, DXF etc.
  • Digitise map by creating point, line and polygon layer – only available feature in IGISMAP Analysis.

Mango Maps -Alternative to Google Map Engine

Mango Map - Alternative to Google Map Engine API

Without writing a single line of code you can easily make web map application which are hosted of a secure cloud server of Mango Maps. Even non technical users can quickly create stunning interactive web maps and can be shareable easily with private groups or to the public around the world. Mango Map provides maximum features which GME tends to provide to their users.

You can try their free account that allows you to make upto 3 maps with unlimited number of layer and 200 MB of data storage.

Over 20,000 and more users are using Mango Map. You may look on map gallery of Mango Map which users of Mango explored.

You may also look to their blog post explaining how they are best fitted as an alternative to Google Map Engine API.

CartoDB – Alternative to Google Map Engine

CartoDB - Alternative to Google Map Engine API

CartoDB is a Geo-spatial database on cloud. It is capable to quickly create map application on top of Google map platforms. CartoDB provides Interface to manage data and create maps and with help of APIs create applications. As Google Map Engine provides a simple interface, you would also look over to CartoDB Editor interface which also tends to be very simple interactive and User friendly.

They also provide a free plan to access unlimited datasets, unlimited mapviews, limited to upload 4 layers with 250 MB of vector data and 10,000 tweets per month, while if you may opt for other enterprise plan too.

Maximum GIS data are supported in CartoDB for uploading i.e csv, .tab, .shp, .kml, .kmz, .xls, .xlsx, .geojson, .gpx, .osm, .bz2, .ods as Vector and tif as Raster data.

CartoDB also provides MAP API, SQL API and Import API which also uses PostGIS to provides lots of GIS processing function. They provide the service on Google Cloud platform.

You might also be looking for the alternative of Carto Db.

To take a detailed look on CartoDB you may look their article with title as “Introducing CartoDB on Google Platform: An Alternative to Google Maps Engine“.

Mapbox – Alternative to Google Map Engine

Mapbox - Alternative to Google Map Engine API

Mapbox is an another cloud based solution which we can look as an alternative to Google Map Engine to some extent. Its scalable, cheap and uses open source technology. User can easily choose nicely designed base map from their predefined maps and can add them to their own custom application easily.

They also provides Android and iOS SDK along with Javascript API for development of map application. Their tools and APIs will help you to add location to any application.

You may look to mapbox from here.

Openstreetmap – Alternative to Google Map Engine

Openstreetmap - Alternative to Google Map Engine API

uMap is an OpenStreetMap Project which help you to “create maps with OpenStreetMap layers in a minute and embed them in your site”.

It lets you choose the layers of your map, add POIs as markers, lines or polygon with managing colors and icons, import geo-reference vector data like geojson, gpx, kml, osm etc, choose and add license from your data and finally embed and share your map.

You can try uMap from here.

Simialy to uMap which made over openstreetmap, you may also look geojson.io which is also a fast, simple tool to create, change and publish maps. You may try geojson.io from here.

Both uMap and geojson.io is opensource project and can be treated as an alternative to Google Map Engine (GME).

Esri – ArcGIS Online – Alternative to Google Map Engine

ESRI - ArcGIS Online - Alternative to Google Map Engine API

Esri is an international supplier of Geographic Information System software, web GIS and Geo-database management applications. ArcGIS online is product of ESRI and is used for creating interactive maps for website and applications which gives an ability to discover, use, make and share maps from any device from anywhere, anytime. ArcGIS online provide ready to use Maps comprised of authoritative maps with data, visualize large amount of data, brings power of analytics, API tool for developers and many more.

Esri also provide 60 days free trial, which you can opt for before subscribing the tool. You can try ArcGIS online from here.

You might also be interested in looking for the best alternative of ArcGIS Online.

GISCloud – Alternative to Google Map Engine

GISCloud - Alternative to Google Map Engine API

GIS cloud is a cloud storage platform where you can easily create, edit and customize your maps and can share and publish maps in web and applications. It provides to quickly integrate with Google base Map, customize your application like layout, style, and custom logo effortlessly, use data collection and populate your data into a map layer in real time and can share your data in a blink of eye. GIS Cloud can be considered as a good alternative to Google Map Engine, for further detail, you may look to this link explaining how it can be an alternative to GME.

iSpatial – Alternative to Google Map Engine

iSpatial uses Google Maps and Google Earth product in a task based approach to solve complete problems. It is used to create, annotate, add layer data, combine all datasets and search and manage real time updated data. You can easily share your data, communicate effectively and export data to other users or systems. You can opt iSpatial as one of an option for being an alternative to GME. Have a look of iSpatial from here.

espatial – Mapping software – Alternative to Google Map Engine

While eSpatial cannot be treated as a direct alternative to GME, but you take a look on it if you are working mostly with Excel data and wanted to convert the excel spreadsheets into maps in a go, then, this tool can become one of the most powerful mapping software for you. eSpatial uses Google Maps as a powered base map. Here is the link to visit eSpatial website.

Are we missing any other best alternative which should be in the list above. Have you tried any of the above services before and whats your experience with the same, do provide a review below as comment so that we could discuss and make some gist out of it. I hope you would figure out the best alternative mapping services.

Spatial Join in QGIS

Spatial Join in QGIS – Quantum GIS an open source software. Spatial join is used for joining or transferring attributes of two vector layer based on their  spatial relationship. In QGIS we can perform this task using Join Attribute by Location tool.

Spatial Join in QGIS

Here we have a university spatial data where, there are 21 teaching departments in this university. Each department runs a number of courses. The no. Of courses of each department is given. We want to find out total no. Of courses run by the university. We can find this by simply adding all the numbers, but here we will see how to use Join attribute by location tool.

More QGIS tutorial can be found here.

Spatial Join in QGIS
Spatial Join in QGIS

Spatial Join in QGIS

Spatial Join in QGIS – Steps

1.) Open Join attribute by location tool.

Spatial Join in QGISIf these tools are not enabling by default you can enable these tool by going into plugin manager, as shown below in image.

Spatial Join in QGIS
Spatial Join in QGIS

2.) Set the Dialog box as follows: Target vector layer is the layer to which we want to add the attribute. The join vector layer is the layer from which we are transferring the attributes. Click on take summary of intersecting features because we want all features covered by the location and we want to keep all the records as there are no matching records. Click OK.

Spatial Join in QGIS
Spatial Join in QGIS

3.) A new layer is added to the table of contents. Open the attribute table of new layer. where you will get the Count Column as total number of University department, which was our desired result.

Spatial Join in QGIS4.) Here we have got some unwanted fields also. As we only want SUM of courses as a field, so we will delete the other fields. We can delete column only in editing mode. So click on toggle editing tool and click on delete column. Select the column which you want to delete and then click ok. Click save edits, and again click on toggle editing tool.

For exploring more editing tool, you may follow this aritcle: Digitization in QGIS – Exploring tools for Digitizing.

You may also explore other QGIS tutorials:

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.

Edit – Export – download data from OpenStreetMap in QGIS

Edit – Export – download data from OpenStreetMap (OSM). Open Street Map is a free editable map of the world, and is very easy to handle. Here in this post we will see how to edit and create geometries on open street map. Also how to export, download and convert the .osm file to any other file.

Steps to Edit – Export – Download data from OpenStreetMap:

1.) Sign in – Before starting editing you need to have one Account in OpenStreetMap to your, so create the one if you don’t have any and login with your account.

2.) Click the Edit dropdown menu button, placed at the upper left of the map, where you will find following three options:

Edit - Export - download data from OpenStreetMap
Edit – Export – download data from OpenStreetMap

Where In-Browser editor are used to edit online and JOSM is used for offline editing.

3.) Lets try with iD In-Browser editor for demonstrating editing here. So click Edit with iD option.

4.) Screen will shows up as follows:

Edit - Export - download data from OpenStreetMap

In right hand side you have various option which you can explore one by one and is very easy to understand. Bing Ariel imagery is preferred in background which is by default is in background however you can select any background you want.

Edit - Export - download data from OpenStreetMap

5.) Now we can start editing. You can select either Point, Line or Polygon from your screen.

6.) Click on the screen on the location where you want to edit. If you selected a point then just click on the location and press enter and then fill the entries on the left hand side and give necessary information.

7.) Click save and your edits will be saved, which you may see it again by opening the osm in another session. Likewise you can digitize lines and polygons.

8.) You can export the map from osm and it will be downloaded to your computer with extension .osm.

Edit - Export - download data from OpenStreetMap
Edit – Export – download data from OpenStreetMap

The exported .osm file can be opened in QGIS or many other GIS tools.

Here I am showing you how to open .osm file in QGIS. Select Add Vector Layer icon as shown below, and browse to the location where you saved the downloaded file and click open.

Edit - Export - download data from OpenStreetMap

A pop-up will open. Select layers as shown in figure.

Edit - Export - download data from OpenStreetMap
Edit – Export – download data from OpenStreetMap

Now select OK. The downloaded map will be imported on the map canvas. In the layers space, you can see four layers which was exported as an example which are .osm layers and can be easily converted to any other GIS vector file like shapefiles.

Download OpenStreetMap OSM data directly from QGIS:

1.) We can also download osm map of our desired location to our computer using QGIS.

2.) In QGIS click vector and click openstreetmap and click download data.

Edit - Export - download data from OpenStreetMap

3.) Enter the coordinates. Click … and give the name of the output file and click download.

4.) Downloading will take some time depending on the size of the data.

QGIS tutorial – A simple Guide

After downloading map you can convert back the osm data to any other spatial data, preserving database attributes too. You can also use some advance plugin given in repository of QGIS. I hope this post would have helped you to export Spatial data with the help of OpenStreetMap. If you are getting any problem in performing the steps do comment below also, if have any other tricks to export spatial data from openstreetmap or any other source do provide us the reference by commenting below.

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection in QGIS

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection in QGIS. Vector analysis is one of the important part of GIS. There are many vector analysis operation which we can discuss on another article theoretically. Here you will learn how to perform vector analyssis with QGIS too. Suppose,  you want to select and find some places which are within some distance from main road or near to some landmark places for analyzing the location. All this can be done by GIS Geo-processing Vector Analysis operation. Finding schools which are near to main road within a distance of 1km or finding a hospital or police station within a distance of 1km are some of very basic example of Vector Analysis Operation. Here, we will see a small demo of how to use some vector analysis tool like Distance, Near by, Buffer, Intersection in QGIS.

Let us download some osm free available data for performing operation. We have downloaded some data from a Very well known university. The downloaded comes is in WGS 84 CRS or Pseudo Mercator CRS. To calculate distance in meters the data must be in projected coordinate system. For our region it is WGS 84/ UTM zone 43N. You can choose CRS according to your area.

Converting CRS – For Easy calculation:

If your data is already in CRS projection, then you may proceed to see the below article and perform some vector analysis operation. Now we will first change the CRS of our project in QGIS tool. Go to Project click project properties.

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection

Select CRS and find out the CRS which suits your region. Notice the coordinate displaying on the screen.

 

Geo-processing Vector Analysis – Distance, Near by, Buffer, IntersectionOur layers are not in projected CRS. So now right click the layer and click save as.

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection 2Save the file in shapfile format and change the CRS of the layer to projected CRS and click load in to canvas when done. Click OK. If you don’t see the layer in canvas. Then right click on the layer and click zoom to layer. Now turn on the “On the fly projection”. And now you will see the layer disappears. Again right click on the layer and click zoom to layer. You will see the layer appears with other layers on the map. Remove the layer with WGS 84 CRS. Now do the same with all the layers. Which are not in projected CRS.

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection in QGIS

Lets Select Schools from the polygon Layer:

  1. Go to properties. You can also open the properties dialogue box by double clicking on the layer. Select general tab and click query builder.
Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection
Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection

2. Double click on the field which you want to select and then select the operator i.e =, >, < , LIKE, != etc  as per the requirement and then click sample to find out the values in that field, as can be seen in the image provided below.

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection
Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection

3. Click ok in query builder and then select ok in general tab. You will see only the features you have selected according to query.

You can rename the layer, export and import the projected layer again or make a copy of the layer and clear the query by going back to query builder to get the original layer.

500 meter Buffer operation Around Schools :

  1. Now we will create a 500m buffer around schools. QGIS will automatically calculate the result in meters because we have changed the projection to CRS system and the basic unit in projected CRS is meters.
  2. Now click vector and click Geoprocessing tool and click buffer.

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection

We have selected ‘Dissolve buffer results option‘ to dissolve overlapping buffer zones. Now Click ok, and close window after completion of the process.

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection

which provides result as the provided below image in QGIS canvas.

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection
Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection

Similarly, we can create buffer on the roads also, as shown in another example below.

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection

Intersection – Vector Analysis in QGIS:

Lets compute the intersection area of the above two buffers i.e one buffer for schools and other over the roads. Lets start intersecting:

  1. Click on the vector and then geoprocessing tool and then select intersect.

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection

2. Click ok and then close the window after completion of the process. You can see the result showing intersection between two layers.

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection

Find some point which are falling within the buffer boundary:

Now let us find some point which are falling within the buffer boundary of the schools. We are not selecting specific values here for this case. But you can do if needed.

  1. Go to vector, click research tool and click on select by location.

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection2. Observe the options here. You can choose any number of options according to your analysis. Click ok.

Geo-processing Vector Analysis – Distance, Near by, Buffer, Intersection3. The result is highlighted.

Similarly you can perform operation like, finding distance, search near by etc.  Hope this article would be helpful for you to make some understanding about vector analysis. Obviously, you need to perform over the tool to become more familiar with vector analysis operation. If you find any difficulties or have any suggestion, do comment below.

Check :