Skip to content

Commit 034cc49

Browse files
Merge pull request #8 from eoda-dev/dev
Dev
2 parents 5c295cc + 017ecdb commit 034cc49

File tree

131 files changed

+14771
-1805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+14771
-1805
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build and deploy docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
pull_request:
9+
branches:
10+
- "*"
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.11"
23+
24+
- name: Install package
25+
run: pip install -e .
26+
27+
- name: Install dependencies
28+
run: pip install -r requirements.docs.txt
29+
30+
- name: Build docs
31+
run: mkdocs build -d dist
32+
33+
- name: Upload artifact
34+
uses: actions/upload-pages-artifact@v3
35+
with:
36+
path: ./dist
37+
38+
deploy:
39+
needs: build
40+
if: github.ref == 'refs/heads/main'
41+
permissions:
42+
pages: write
43+
id-token: write
44+
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

.github/workflows/pytest.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test package
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.10", "3.11", "3.12"]
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
20+
# You can test your matrix by printing the current Python version
21+
- name: Display Python version
22+
run: python -c "import sys; print(sys.version)"
23+
24+
- name: Install package
25+
run: pip install -e .
26+
27+
- name: Install dev dependencies
28+
run: pip install -r requirements.dev.txt
29+
30+
- name: Test package
31+
run: pytest

README.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,38 @@
1-
# OpenLayers for Python
1+
# py-openlayers: OpenLayers for Python
2+
3+
[![Release](https://img.shields.io/github/v/release/eoda-dev/py-openlayers)](https://img.shields.io/github/v/release/eoda-dev/py-openlayers)
4+
[![pypi](https://img.shields.io/pypi/v/openlayers.svg)](https://pypi.python.org/pypi/openlayers)
5+
[![License](https://img.shields.io/github/license/eoda-dev/py-openlayers)](https://img.shields.io/github/license/eoda-dev/py-openlayers)
6+
[![OpenLayers JS](https://img.shields.io/badge/OpenLayers-v10.5.0-blue.svg)](https://github.com/openlayers/openlayers/releases//tag/v10.5.0)
7+
8+
Provides Python bindings for [Openlayers](https://openlayers.org/), a high-performance, full-featured web mapping library that displays maps from various sources and formats. It makes it a easy to create interactive maps in [Marimo](https://marimo.io/) and [Jupyter](https://jupyter.org/) notebbooks with a few lines of code in a pydantic way.
9+
10+
## Features
11+
12+
### Tiled Layers
13+
14+
Pull tiles from OSM, CartoDB, MapTiler and any other XYZ source.
15+
16+
17+
### Vector Layers
18+
19+
Render vector data from GeoJSON, TopoJSON, KML, GML and other formats.
20+
21+
### Controls
22+
23+
Add geocoding, draw, full screen and other controls to your map.
24+
25+
### WebGL
26+
27+
Render large data sets using WebGL.
28+
29+
### PMTiles
30+
31+
Render PMTiles from vector and raster sources.
32+
33+
### Interactions
34+
35+
Drag and drop GPX, GeoJSON, KML or TopoJSON files on to the map. Modify, draw and select features.
236

337
## Installation
438

@@ -7,3 +41,21 @@ uv init
741

842
uv add "git+https://github.com/eoda-dev/py-openlayers@main"
943
```
44+
45+
## Quickstart
46+
47+
```python
48+
import openlayers as ol
49+
50+
# Jupyter or Marimo
51+
m = ol.MapWidget()
52+
m # Display map
53+
54+
# Standalone
55+
m = ol.Map()
56+
m.save()
57+
```
58+
59+
## Note
60+
61+
The documentation is still in an early stage, more examples will be added as soon as possible.

TODOS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# TODOS
2+
3+
## STAC layers
4+
5+
https://openlayers.org/en/latest/examples/stac-item.html

docs/api/basemaps.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Basemaps
2+
3+
::: openlayers.basemaps.BasemapLayer
4+
5+
::: openlayers.basemaps.CartoBasemapLayer
6+
7+
::: openlayers.basemaps.MapTilerBasemapLayer

docs/api/controls.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Controls
2+
3+
::: openlayers.controls

docs/api/express.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# OpenLayersExpress
2+
3+
::: openlayers.express.GeoJSONLayer

docs/api/geopandas.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# GeoPandas
2+
3+
::: openlayers.geopandas.OLAccessor
4+
5+
::: openlayers.geopandas.GeoDataFrame

docs/api/layers.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Layers
2+
3+
::: openlayers.layers.Layer
4+
5+
::: openlayers.layers.VectorLayer
6+
7+
::: openlayers.layers.VectorTileLayer
8+
9+
::: openlayers.layers.TileLayer
10+
11+
::: openlayers.layers.WebGLVectorLayer
12+
13+
::: openlayers.layers.WebGLVectorTileLayer
14+
15+
::: openlayers.layers.WebGLTileLayer

docs/api/map.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Map
2+
3+
::: openlayers.Map
4+
5+
::: openlayers.view.View
6+
7+
::: openlayers.MapWidget
8+

0 commit comments

Comments
 (0)