DEV Community

loading...
Cover image for Understanding geospatial data

Understanding geospatial data

Antara Datta
Developer: Java | Javascript | NodeJS | Angular | React | Postgres | PostGIS | Firebase
Updated on ・3 min read

What is geospatial data?

When a set of data encompasses geographic location as the reference component, it is referenced to as geospatial data. It represents some information about a specific location or over a range of a given location. The location can range from a specific point to a larger area. Oftentimes, GIS and geospatial data are interchangeably used.

GIS is a programmatic system that creates, stores and analyses geospatial data.

To paint a picture, when we search for nearby restaurants, monitor the movements of a cyclone or lookup prominent tourists spots of the place you are going to visit next, you are consuming geospatial data. The information could be plain data or analytical reports, what is common is the fact that they represent a specific location.

What are the different types of geospatial data?

There are two major kinds of geospatial data:

  • Raster data

  • Vector data

Raster data

It is like a pixel-by-pixel digital image but has spatial reference. This helps associate the data to a specific location. The basic building block of a raster data is a cell/pixel. The geographical data in a raster format must hold an extent and its co-ordinate referencing system. The extent of a raster data represents the geographic area it encompasses.

The CRS is a standard used to define the transformation of data on from geographical point to a flattened location on a map.

geo spatial data

One of the most popular formats of raster data is a GeoTIFF file. It is a regular tif image with added geo referential data which can tag the data to a location.

Vector data

Vectors are specific feature information at a discrete geographical location. The location could be a simpleton point with (x,y) co-ordinates (specific location) or a collection of these (x,y) co-ordinates to represent a line (streets, rivers) or a polygon (lakes, grounds).

Data:

[

{ lat: 37.772, lng: -122.214}, 

{ lat: 21.291, lng: -157.821}, 

{ lat: -18.142, lng: 178.431}, 

{ lat: -27.467, lng: 153.027}, 
Enter fullscreen mode Exit fullscreen mode

]

Representation:

shapefile representation

Shapefiles a widely used form of vector data. A shapefile consists of several files which include the main file (.shp), an index file (.shx), a dBase file (.dbf) and an optional projection file (.prj). The dBASE file contains attribute data for each shape in the main file. The projection file holds specifics about the spherical geometry; it is an optional but useful component of a shapefile.

Coordinate Reference System

In both raster and vector, one of the crucial elements of the data was its CRS. It is a system to project or convert points or actual location on the surface of the earth to the flattened 2D map. To achieve this, certain set of transformations are applied on the data based on its crs. This means that data of same location associated with different projection will not align on map when plotted. Once the correct projection is applied only then they will plot on the correct and same location.

CRS has three major components:

  • Datum: This represents the shape of earth, its starting point and reference angles. Most used datums are WGS84 and NAD27.

  • Projection: This is the transformation method that should be used to convert the angular measurements to a 2D surface.

  • Other parameters

There are common standard systems to store and transmit CRS data. One of the universally used systems are EPSG and PROJ. Each of them is identified by a code. Often, we need to convert from one CRS definition to another, and one of the most useful resources to do so is Spatial Reference Org . Different systems might use different standards but the ability to transform from one of these definitions to another makes the referencing system highly interoperable.

With this whole new understanding of geospatial data, it becomes interesting to see how we use our data and process them for visualization using various standards available.

To know more about, how geospatial data can be used using postgis please take a gander at the follow up article: Getting started with PostGIS.

Discussion (0)