You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
5. The _output_ Markdown files are written to `<src-root>/pyrasterframes/target/python/docs`. _Note_: don't edit any files in the `pyrasterframes/target` directory... they will get overwritten each time `sbt` runs a command.
88
-
6. To build all the documentation and convert to a static html site, run:
86
+
6. During content development it's sometimes helpful to see the output rendered as basic HTML. To do this, add the `-d html` option to the pweave command:
87
+
```
88
+
sbt:RasterFrames> pyrasterframes/pySetup pweave -d html -f docs/getting-started.pymd
89
+
[info] Synchronizing 54 files to '<src-roog>/pyrasterframes/target/python'
90
+
[info] Running 'python setup.py pweave -d html -f docs/getting-started.pymd' in '<src-root>/pyrasterframes/target/python'
Copy file name to clipboardExpand all lines: pyrasterframes/src/main/python/docs/languages.pymd
+75-14Lines changed: 75 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -3,43 +3,54 @@
3
3
One of the great powers of RasterFrames, afforded by Spark SQL, is the ability to express computation in multiple programming languages. This manual is centered around Python because that's the most common language used in data science and GIS analytics. However, Scala (the implementation language of RasterFrames) and SQL are also fully supported. Examples in Python can be mechanically translated into the other two languages without much difficulty once the naming conventions are understood. In the sections below we will show the same example program (computing average NDVI per month for a single tile in Tanzania).
4
4
5
5
```python, imports, echo=False
6
-
from pyspark.sql.functions import month, dayofmonth, year
6
+
from pyspark.sql.functions import *
7
7
from pyrasterframes.utils import create_rf_spark_session
8
+
8
9
from pyrasterframes.rasterfunctions import *
9
10
import pyrasterframes.rf_ipython
10
11
import pandas as pd
11
12
import os
13
+
spark = create_rf_spark_session()
12
14
```
13
15
14
16
## Python
15
17
16
-
Step 1: Load the catalog
18
+
### Step 1: Load the catalog
17
19
18
20
```python, step_1_python
19
21
modis = spark.read.format('aws-pds-modis-catalog').load()
Fetch the [proj4](https://proj4.org/) string representation of the coordinate reference system of a `ProjectedRasterTile` or `RasterSource` type tile columns.
93
+
Fetch CRS structure representing the coordinate reference system of a `ProjectedRasterTile` or `RasterSource` type tile columns.
94
+
95
+
### rf_mk_crs
96
+
97
+
Construct a CRS structure from one of its string representations. Three froms are supported:
@@ -117,7 +129,6 @@ Functions to create a new Tile column, either from scratch or from existing data
117
129
Tile rf_make_zeros_tile(Int tile_columns, Int tile_rows, String cell_type_name)
118
130
```
119
131
120
-
121
132
Create a `tile` of shape `tile_columns` by `tile_rows` full of zeros, with the specified cell type. See function @ref:[`rf_cell_types`](reference.md#rf-cell-types) for valid values. All arguments are literal values and not column expressions.
0 commit comments