Introduction to GDAL

This tutorial will introduce you to the GDAL command line tools.

2. Retrieving information from GIS data

2.2. Retrieve information from vector data

For retrieving info from vector data we use the ogrinfo command.

1. Execute the following command:
ogrinfo -al roads.shp | more <ENTER>
ogrinfo -al gem_2011_gn1.shp | more <ENTER>

2. Answer these questions:

  • What are the projections of these two shapefile?
  • What are the EPSG codes?
As you can see there are several EPSG codes reported. That is because different elements of the projection have their own EPSG code. The rule of thumb is that you can take the last EPSG code. So the projection of roads.shp is EPSG: 4326, which means that it is in Geographic Coordinate System (GCS) with coordinates in Latitude/Longitude.
For gem_2011_gn1.shp the projection is EPSG: 28992, which is the Dutch projection (Amersfoort RD/New).


More info about the ogrinfo command can be found here:

More info about EPSG codes in this video