![coding in grass gis coding in grass gis](http://lucadelu.org/grass_foss4g_2018_workshop/figures/GUI_description.png)
using the EPSG code (alternative: use raster or vector file with metadata): # hint: EPSG code lookup:
![coding in grass gis coding in grass gis](https://grass.osgeo.org/programming7/raster_2format_8c__incl.png)
This session we open now, defining the projection parameters e.g. Now we can define and create a session instance: # create a PERMANENT mapset object: create a Session instance Os.environ.update(dict(GRASS_COMPRESS_NULLS='1')) # set some common environmental variables, like for raster compression settings: It is also a good idea to import some further parts of the GRASS GIS Python API: # import some convenient GRASS GIS Python API partsįrom import general as gįrom import raster as rįrom import vector as vįrom import temporal as t Next we import "grass-session": # the next line starts the GRASS GIS session In a first step we define a few settings: # define where to process the data in the temporary grass-session Using "grass-session" to access GRASS GIS functionality from Python Now, sometimes you do not want to use Python within a GRASS GIS session but simply use the wealth of functionality from "outside", that is using GRASS GIS as your backend for geospatial number crunching. More that 70 of the GRASS GIS modules are written in Python they are a good starting point to see how that's done (including graphical user interface generated automatically, command line interface, XML self-description, multi-language support etc. GRASS GIS provides a Python API (see also the related page collection in the GRASS GIS Wiki to all functionality. Python is easy to work with and supports you in simple as well as complex tasks due to the huge amount of high level libraries available including machine learning and more.
![coding in grass gis coding in grass gis](https://grass.osgeo.org/images/gallery/community/2018_grass_osgeo_codesprint_bonn_fotowall.jpg)
It is not only very popular in science but also the field of GIS. Python is one of the world's most popular programming languages.