In this post, we will merge two polygons in OpenLayers(polygons that intersect each other) into one polygon as shown in the above GIF image. The merging of two polygons is also known as the union of two polygons. In the last tutorial, we demonstrated how we can split a polygon by a line into two parts in OpenLayers using JSTS.
If you are a first-time reader of this blog, I would recommend going through the following tutorial on splitting polygon into two parts. It would make understanding this tutorial easy for you.
OpenLayers is an powerful map api to develop map based applications. But to perform complex spatial operations like splitting a polygon, merging two polygons etc., we need to find another way to accomplish these operations. OpenLayers can’t do these operations on its own.
In this tutorial, we are going to develop a Polygon Splitter tool that will split the polygon into two parts by a line.
In this tutorial, we are going to create a dynamic measurement tool in OpenLayers version 6.5. We will create a Line and Area measurement tool to show measurements on labels that follow changing geometry like area, length or cursor position as shown in the above GIF image
OpenLayers is a great open source GIS library which is used to develop a rich featured GIS web applications. But sometime you need to implement advanced spatial/geometrical operations. For example, union of two geometry, creating buffers, creating hole in polygon, dividing a polygon in two parts by a line as shown in following images.
Prerequisite: You need to have beginner level knowledge of QGIS and PostGIS to understand this post.
QGIS and PostGIS are one of the most famous open source GIS tools in GIS community. QGIS is used for the visualisation and processing of GIS data where as PostGIS is an extension to PostgreSQL database to store GIS data such as vector and raster data. Combining these tools with each other can greatly improve the productivity of GIS Analysts/Developers.
Using PostGIS on top of QGIS gives us ability to analyse the GIS data using SQL statements and can directly visualise the sql result…
ol.View, ol.layer and ol.source are one of the foundations of OpenLayers application. You can not move ahead without understanding them. Let’s understand them with the help of following code.
In this post, we will create a simple GIS web app which will display OpenStreetMap on it. OpenStreet map is similar to Google Map. We will use a OpenStreetMap mapping API in our application.
Our final result will look something like below image:
Projections or Map Projections are attempts to portray the 3D surface of the earth or a portion of the earth on flat surface like flat surface or XY plane or Cartesian Plane. The method by which 3D earth surface or curved surface is laid flat to a flat surface or XY plane is known as map projections.
In order to understand Map Projection, we need do understand Latitude and Longitude
Latitude and Longitude: Lets first discuss what is Equator and Prime Meridian. In the above figure, the earth is divided into parallel horizontal and vertical lines. The largest line that…
GIS stands for Geographical Information System(GIS). It is a system for gathering, storing and analysing GIS data. A GIS data is a data which has some location information associated with it.
A very simple and popular example is GPS on your smart phone.