Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
podcast
Filter by Categories
ArcGIS Pro
GDAL
Map
Python
QGIS
Uncategorized

Beginners guide to SRID

A Beginners Guide to Spatial Reference ID ( SRID )

What does SRID stand for in GIS?

SRID stands for “Spatial Reference ID”. It is a unique identifier used in GIS (Geographic Information Systems) to specify a coordinate reference system (CRS) for a dataset. The SRID is used to define the geographic location and spatial extent of the data, as well as the map projection and datum used to represent the data on a map.

In other words, the SRID defines the way that the data will be transformed from a spherical representation of the Earth’s surface into a flat map. This allows the data to be correctly located and aligned with other data that uses a different coordinate system.

Want to say ahead of the Geospatial curve? Listen to our podcast!

Choosing the right SRID

Choosing the right SRID for your data can be crucial for ensuring accurate results when working with geographic information. Here are some factors to consider when choosing an SRID:

  1. Geographic Extent: The first step is to determine the geographic extent of your data, which is the area that your data covers on the Earth’s surface. This information can help you choose an SRID that is appropriate for your area of interest.
  2. Projection: Different SRIDs use different map projections, which are ways of representing the spherical Earth on a flat map. Some projections are better suited for areas with small-scale data, such as cities or regions, while others are better for larger-scale data, such as countries or continents.
  3. Datum: The SRID also defines the datum, which is a reference surface used to define the shape and size of the Earth. Different datums can have different impacts on the accuracy of your data, so it’s important to choose a datum that is appropriate for your data.
  4. Source Data: If your data is being imported from another source, it may already have an SRID associated with it. In this case, it may be best to use the same SRID to ensure compatibility and avoid any potential coordinate transformations.
  5. User Requirements: Finally, it’s important to consider the user requirements for your data. If your data will be used for a specific purpose, such as navigation or surveying, you may need to choose an SRID that is specifically designed for that purpose.

What is an EPSG code?

EPSG stands for “European Petroleum Survey Group”. The EPSG is a consortium of European national mapping agencies that maintains a comprehensive database of SRIDs, known as the EPSG Geodetic Parameter Registry. The EPSG database is widely used as a reference for finding the right SRID for a given dataset.

In other words, an SRID is a unique identifier that defines a CRS, while the EPSG is a database of SRIDs and related information. The EPSG database is a useful resource for finding the right SRID for your data, but it’s worth noting that there are other similar databases available, such as the IOGP (International Association of Oil & Gas Producers) Geomatics Committee’s “EPSG Geodetic Parameter Dataset”.

How to check the SRID of your GIS data

The method to check the SRID of your GIS data depends on the software or platform you’re using. Here are some common methods:

QGIS: If you’re using QGIS, you can check the SRID of a layer by right-clicking on the layer in the “Layers” panel and selecting “Properties”. In the “Properties” dialog, go to the “Source” tab and look for the “CRS” section. The SRID will be listed next to the CRS definition.

ArcGIS: If you’re using ArcGIS, you can check the SRID of a layer by right-clicking on the layer in the “Table of Contents” and selecting “Properties”. In the “Layer Properties” dialog, go to the “Source” tab and look for the “Spatial Reference” section. The SRID will be listed next to the CRS definition.

PostGIS: If your GIS data is stored in a PostgreSQL database with the PostGIS extension, you can check the SRID of a table by running a SQL query. For example, you could run the following query to check the SRID of a table named “mytable”

SELECT SRID(the_geom) FROM mytable LIMIT 1;

If you’re working with raster data and the GDAL library, you can check the SRID of the data by using the gdalinfo command. The gdalinfo command is part of the GDAL library and provides information about a raster dataset, including the SRID.

Here’s an example of how you can use gdalinfo to check the SRID of a raster dataset named “myraster.tif”:

gdalinfo myraster.tif

If you’re working with vector data and the OGR library, you can check the SRID of the data by using the ogrinfo command. The ogrinfo command is part of the OGR library and provides information about a vector dataset, including the SRID.

Here’s an example of how you can use ogrinfo to check the SRID of a vector dataset named “myvector.shp”:

ogrinfo myvector.shp

How do I define the SRID if it is not present in the data or defined but the software?

If the SRID is not present in your data or defined in the software, you’ll need to define it yourself. The method for defining the SRID depends on the software or platform you’re using, but here are some common methods:

QGIS: In QGIS, you can define the SRID for a layer by right-clicking on the layer in the “Layers” panel and selecting “Set CRS for Layer”. In the “Assign Layer CRS” dialog, you can search for the SRID you want to use or enter the SRID manually.

ArcGIS: In ArcGIS, you can define the SRID for a layer by right-clicking on the layer in the “Table of Contents” and selecting “Properties”. In the “Layer Properties” dialog, go to the “Source” tab and click the “Spatial Reference” button. In the “Spatial Reference Properties” dialog, you can search for the SRID you want to use or enter the SRID manually.

PostGIS: If your GIS data is stored in a PostgreSQL database with the PostGIS extension, you can define the SRID for a table by running an SQL query. For example, you could run the following query to set the SRID for a table named “mytable” to 4326:

SELECT UpdateGeometrySRID('public', 'mytable', 'the_geom', 4326);

If you’re using the GDAL or OGR library, you can define the SRID when creating a new dataset or converting an existing dataset.

GDAL: you can define the SRID when creating a new raster dataset by specifying the SRID in the creation options. For example, the following command creates a new GeoTIFF raster dataset with SRID 4326:

gdal_translate -a_srs EPSG:4326 input.tif output.tif

OGR: you can define the SRID when creating a new vector dataset or converting an existing dataset by specifying the SRID in the creation options. For example, the following command creates a new Shapefile vector dataset with SRID 4326:

luaCopy codeogr2ogr -t_srs EPSG:4326 output.shp input.shp

In both GDAL and OGR, you can use the EPSG code to specify the SRID, as shown in the examples above. You can find the EPSG code for a given SRID by searching the EPSG Geodetic Parameter Registry or using a similar resource.

About the Author
I'm Daniel O'Donohue, the voice and creator behind The MapScaping Podcast ( A podcast for the geospatial community ). With a professional background as a geospatial specialist, I've spent years harnessing the power of spatial to unravel the complexities of our world, one layer at a time.

Leave a Reply