[GRASS-SVN] r64917 - in grass-promo/grassposter/2015_EGU_G7_Python: . listings

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Mar 25 07:32:36 PDT 2015


Author: huhabla
Date: 2015-03-25 07:32:36 -0700 (Wed, 25 Mar 2015)
New Revision: 64917

Added:
   grass-promo/grassposter/2015_EGU_G7_Python/listings/tgrass_examples.tex
Modified:
   grass-promo/grassposter/2015_EGU_G7_Python/Makefile
   grass-promo/grassposter/2015_EGU_G7_Python/main.tex
Log:
Added GRASS GIS Temporal Framework part


Modified: grass-promo/grassposter/2015_EGU_G7_Python/Makefile
===================================================================
--- grass-promo/grassposter/2015_EGU_G7_Python/Makefile	2015-03-25 14:11:52 UTC (rev 64916)
+++ grass-promo/grassposter/2015_EGU_G7_Python/Makefile	2015-03-25 14:32:36 UTC (rev 64917)
@@ -6,10 +6,10 @@
 ODPDIR = odp_slides
 TEXDIR = listings
 
-SVGFILES = $(shell ls $(SVGDIR)/*.svg)
-SVGPDF = $(patsubst %.svg, %.pdf, $(SVGFILES))
-ODPFILES = $(shell ls $(ODPDIR)/*.odp)
-ODPPDF = $(patsubst %.odp, %.pdf, $(ODPFILES))
+#SVGFILES = $(shell ls $(SVGDIR)/*.svg)
+#SVGPDF = $(patsubst %.svg, %.pdf, $(SVGFILES))
+#ODPFILES = $(shell ls $(ODPDIR)/*.odp)
+#ODPPDF = $(patsubst %.odp, %.pdf, $(ODPFILES))
 TEXFILES = $(shell ls $(TEXDIR)/*.tex)
 TEXPDF = $(patsubst %.tex, %.pdf, $(TEXFILES))
 

Added: grass-promo/grassposter/2015_EGU_G7_Python/listings/tgrass_examples.tex
===================================================================
--- grass-promo/grassposter/2015_EGU_G7_Python/listings/tgrass_examples.tex	                        (rev 0)
+++ grass-promo/grassposter/2015_EGU_G7_Python/listings/tgrass_examples.tex	2015-03-25 14:32:36 UTC (rev 64917)
@@ -0,0 +1,41 @@
+% taken from grass-promo/grassposter, written by me I think
+
+\documentclass{standalone}
+
+\usepackage[active,tightpage]{preview}
+\usepackage{listings}
+\PreviewEnvironment{lstlisting}
+
+\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
+
+\input{listings_settings}
+
+\begin{document}
+
+
+\begin{lstlisting}[language=Python,linewidth=34.2em]
+# Import the GRASS GIS temporal framework
+import grass.temporal as tgis
+# Open an existing space time raster dataset (STRDS)
+temp_strds = tgis.open_old_stds(name="temp_daily", 
+                                type="strds")
+# Shift all registered raster map layer 2 days in the future
+temp_strds.shift("2 days")
+# Open an exitsing time stamped raster map as map object
+temp_19770324 = tgis.open_new_map_dataset(type='raster', 
+                                name='temp_1977_Mar_24')
+# Unregister the raster map from the STRDS
+temp_strds.unregister_map(temp_19770324)
+# Get a list of all registered raster map layers with
+# a start time later 1990-05-22 from the STRDS
+maps = temp_strds.get_registered_maps_as_objects(\
+                     where="start_time > '1990-05-22'")
+# Create a temporal buffer of 6h for each map in the list
+for map in maps:
+    map.temporal_buffer("6 hours", update=True)
+# Compute new spatio-temporal extent and granularity 
+temp_strds.update_from_registered_maps()
+# Get the granuarity of the STRDS
+gran = temp_strds.get_granularity()
+\end{lstlisting}
+\end{document}  
\ No newline at end of file

Modified: grass-promo/grassposter/2015_EGU_G7_Python/main.tex
===================================================================
--- grass-promo/grassposter/2015_EGU_G7_Python/main.tex	2015-03-25 14:11:52 UTC (rev 64916)
+++ grass-promo/grassposter/2015_EGU_G7_Python/main.tex	2015-03-25 14:32:36 UTC (rev 64917)
@@ -229,9 +229,27 @@
 }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\block{\blocktitlewrap{GRASS GIS Addons}}{
+The GRASS GIS Addons ensures long-term preservation of the code.
+Well maintained modules in Addons can be moved to GRASS GIS itself.
+}
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\block{\blocktitlewrap{Alternatives to Python}}{
+GRASS GIS modules are command line tools, so they can be used in shell scripting (e.g. Bash)
+and as subprocesses virtually any language as long as proper environment is set.
+
+The GRASS GIS library has a C API which is often used to create GRASS modules in C and C++.
+
+GRASS GIS modules can be used in R using \pkg{rgrass7} package.
+}
+
+
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \column{0.25}
 
 
@@ -312,6 +330,10 @@
 and running code from IDE
 }
 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\block{\blocktitlewrap{Testing the code}}{
+\cite{Petras2014}
+}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -320,32 +342,15 @@
 \column{0.25}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\block{\blocktitlewrap{Temporal framework}}{
-\cite{Gebbert2014}
+\block{\blocktitlewrap{GRASS GIS Temporal Framework}}{
+The GRASS GIS Temporal Framework implements the temporal GIS functionality of GRASS GIS 
+and provides a Python API to implement spatio-temporal processing modules. 
+The framework introduces space time datasets that represent time series of raster, 
+3D raster or vector maps. Some API examples:
+\includegraphics[width=1\linewidth, clip, trim=0 0 0 0]{tgrass_examples}
 }
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\block{\blocktitlewrap{Testing the code}}{
-\cite{Petras2014}
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\block{\blocktitlewrap{GRASS GIS Addons}}{
-The GRASS GIS Addons ensures long-term preservation of the code.
-Well maintained modules in Addons can be moved to GRASS GIS itself.
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\block{\blocktitlewrap{Alternatives to Python}}{
-GRASS GIS modules are command line tools, so they can be used in shell scripting (e.g. Bash)
-and as subprocesses virtually any language as long as proper environment is set.
-
-The GRASS GIS library has a C API which is often used to create GRASS modules in C and C++.
-
-GRASS GIS modules can be used in R using \pkg{rgrass7} package.
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \block{\blocktitlewrap{Acknowledgements}}{
 
 \newcommand{\listhspace}{\hspace{0.005\linewidth}}



More information about the grass-commit mailing list