Skip to content

Commit

Permalink
Add schema support for histogram processing
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Jul 30, 2024
1 parent 8b317ae commit 188bc39
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
11 changes: 7 additions & 4 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@
- [Sandbox](sandbox/README.md)
- [Introspection](sandbox/inspect.md)
- [Projects](sandbox/projects.md)
- [Vector layers](sandbox/vector/layers.md)
- [Vector styles](sandbox/vector/styles.md)
- [Raster layers](sandbox/raster/layers.md)
- [Raster styles](sandbox/raster/styles.md)
- [Vector](sandbox/vector/README.md)
- [Layers](sandbox/vector/layers.md)
- [Styles](sandbox/vector/styles.md)
- [Raster](sandbox/raster/README.md)
- [Layers](sandbox/raster/layers.md)
- [Styles](sandbox/raster/styles.md)
- [Processing](sandbox/raster/processing.md)
- [Developers](DEVELOPERS.md)
- [Funders](FUNDERS.md)
1 change: 1 addition & 0 deletions docs/src/sandbox/raster/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Raster
17 changes: 17 additions & 0 deletions docs/src/sandbox/raster/processing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Sandbox : raster processing


### Histogram

To get an histogram for a specific raster layer:

```` shell
$ curl "http://localhost:5000/api/processing/raster/histogram/my_project/dem?schema=my_schema" \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"min": 0,
"count": 100
}'
true
````
1 change: 1 addition & 0 deletions docs/src/sandbox/vector/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Vector
3 changes: 2 additions & 1 deletion qsa-api/qsa_api/api/processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ def raster_histogram(project: str, layer: str):
if "count" in data:
count = data["count"]

proj = QSAProject(project)
psql_schema = request.args.get("schema", default="public")
proj = QSAProject(project, psql_schema)
if proj.exists():
layer_infos = proj.layer(layer)
if layer_infos:
Expand Down

0 comments on commit 188bc39

Please sign in to comment.