In search of EPSG

It often happens to us that we need to find, for example, the EPSG code of a certain coordinate system to give it to our spatial data. Of course, we can use the epsg.io website, but there is an easier way and it is in one of the R libraries – rgdal. Let’s upload it:

Using the make_EPSG() function, we will write all the coordinate system data to the proj variable:

Variable proj is of class data.frame and contains 3 columns: EPSG code, coordinate system name, parameters in format proj4

We can search for an interesting coordinate system using the grepl function. This function is used to find strings. For example, let’s find all coordinate systems with “Poland” in their name:

Once we find the EPSG or proj4, we assign it to our spatial data.

Leave a Reply

Your email address will not be published.

Translate using Google Translate»
Social media & sharing icons powered by UltimatelySocial

Podoba Ci się nasza strona? Odwiedź nasz profil