Skip to content

Commit

Permalink
Build new documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
evetion committed Nov 24, 2024
1 parent 91a6593 commit 23a89db
Show file tree
Hide file tree
Showing 23 changed files with 11,798 additions and 149 deletions.
51 changes: 39 additions & 12 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,51 @@
name: Documentation
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Documenter

on:
# Runs on pushes targeting the `master` branch. Change this to `main` if you're
# using the `main` branch as the default branch.
push:
branches:
- master
tags: '*'
tags: ['*']
pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
statuses: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: 'lts'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
- name: Checkout
uses: actions/checkout@v4
- name: Setup Julia
uses: julia-actions/setup-julia@v1
- name: Pull Julia cache
uses: julia-actions/cache@v1
- name: Install documentation dependencies
run: julia --project=docs -e 'using Pkg; pkg"dev ."; Pkg.instantiate(); Pkg.precompile(); Pkg.status()'
#- name: Creating new mds from src
- name: Build and deploy docs
uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
run: julia --project=docs/ docs/make.jl
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
GKSwstype: "100" # for Plots.jl plots (if you have them)
JULIA_DEBUG: "Documenter"
DATADEPS_ALWAYS_ACCEPT: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ docs/src/*.png
*.sha256
.DS_Store
Manifest.toml
docs/final_site
node_modules/
test/data
50 changes: 0 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,53 +70,3 @@ when enabled by the driver, can be provided in this way.
table = [(; geom=AG.createpoint(1.0, 2.0), name="test")]
GDF.write(tfn, table; geom_columns=(:geom,),)
```

## Operations
The supported operations are the ArchGDAL operations that are exported again to work on Vectors of geometries as well.
Hence, if you can apply all the [ArchGDAL operations](https://yeesian.com/ArchGDAL.jl/stable/geometries/) yourself.

```julia
df.geom = buffer(df.geom, 10); # points turn into polygons
df
10×2 DataFrame
Row │ geometry name
│ IGeometr String
─────┼──────────────────────────────
1 │ Geometry: wkbPolygon test
2 │ Geometry: wkbPolygon test
3 │ Geometry: wkbPolygon test
4 │ Geometry: wkbPolygon test
5 │ Geometry: wkbPolygon test
6 │ Geometry: wkbPolygon test
7 │ Geometry: wkbPolygon test
8 │ Geometry: wkbPolygon test
9 │ Geometry: wkbPolygon test
10 │ Geometry: wkbPolygon test
```

### Reprojection
```julia
#Either reproject the whole dataframe (which will set the correct metadata):
dfr = reproject(df, EPSG(4326), EPSG(28992))

# Or reproject the individual geometries only:
df.geometry = reproject(df.geometry, EPSG(4326), EPSG(28992))
10-element Vector{ArchGDAL.IGeometry{ArchGDAL.wkbPolygon}}:
Geometry: POLYGON ((-472026.042542408 -4406233.59953401,-537 ... 401))
Geometry: POLYGON ((-417143.506054105 -4395423.99277048,-482 ... 048))
Geometry: POLYGON ((-450303.142569437 -4301418.89063867,-515 ... 867))
Geometry: POLYGON ((-434522.645535154 -4351075.81124634,-500 ... 634))
Geometry: POLYGON ((-443909.665585927 -4412565.43193349,-509 ... 349))
Geometry: POLYGON ((-438405.666500747 -4299366.23767677,-503 ... 677))
Geometry: POLYGON ((-400588.951193713 -4365333.532287,-46626 ... 287))
Geometry: POLYGON ((-409160.489179734 -4388484.98554538,-474 ... 538))
Geometry: POLYGON ((-453963.150526169 -4408927.89965336,-519 ... 336))
Geometry: POLYGON ((-498317.413693272 -4321687.31588764,-563 ... 764))
```

## Plotting
```julia
using Plots
plot(df.geometry)
```
![image](img/plot_points.png)
Loading

0 comments on commit 23a89db

Please sign in to comment.