Skip to content

Commit 9c68f31

Browse files
committed
Update to latest version of Vecorel
1 parent 1b847a5 commit 9c68f31

9 files changed

Lines changed: 78 additions & 91 deletions

File tree

.github/workflows/test.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ jobs:
88
steps:
99
- uses: actions/setup-python@v5
1010
with:
11-
python-version: '>=3.9'
11+
python-version: '>=3.10'
1212
- uses: actions/checkout@v4
1313
- name: Install pipenv
1414
run: |
1515
pip install pipenv
1616
pipenv install
1717
- run: pipenv run test-docs
1818
- run: pipenv run test-schema
19-
- run: pipenv run test-geojson
20-
- run: pipenv run test-geoparquet
19+
- run: pipenv run test-examples

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2727

2828
- ...
2929

30-
## [v0.1.0] - 2024-03-01
30+
## [v0.1.0] - 2025-08-24
3131

3232
- First release
3333

34-
[Unreleased]: <https://github.com/vecorel/extension-template/compare/v0.1.0...main>
35-
[v0.1.0]: <https://github.com/vecorel/extension-template/tree/v0.1.0>
34+
[Unreleased]: <https://github.com/vecorel/geometry-metrics-extension/compare/v0.1.0...main>
35+
[v0.1.0]: <https://github.com/vecorel/geometry-metrics-extension/tree/v0.1.0>

CONTRIBUTING.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# Contributing
22

33
All contributions are subject to the
4-
[Vecorel Code of Conduct](https://github.com/vecorel/specification/blob/main/CODE_OF_CONDUCT.md).
5-
For contributions, please follow the
6-
[Vecorel contributing guideline](https://github.com/vecorel/specification/blob/main/CONTRIBUTING.md).
4+
[Vecorel Code of Conduct](https://vecorel.org/code-of-conduct/).
75

86
## Running tests
97

@@ -17,7 +15,5 @@ Finally, you can run the tests as follows:
1715

1816
- To check the markdown run: `pipenv run test-docs`
1917
- To check the Vecorel schema run: `pipenv run test-schema`
20-
- To check the examples run:
21-
- `pipenv run test-geojson` for GeoJSON
22-
- `pipenv run test-geoparquet` for GeoParquet
18+
- To check the examples run: `pipenv run test-examples`
2319
- To create a GeoParquet from the GeoJSON examples: `pipenv run create-geoparquet`

Pipfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ verify_ssl = true
44
name = "pypi"
55

66
[packages]
7-
vecorel-cli = ">=0.3"
7+
vecorel-cli = ">=0.2"
88
pymarkdownlnt = ">=0.9"
99

1010
[scripts]
1111
test-docs = "pymarkdown -d md024,md013 scan ."
12-
test-schema = "vecorel validate-schema schema/schema.yaml"
13-
test-geojson = "vecorel validate examples/geojson -e https://vecorel.github.io/extension-template/v0.1.0/schema.yaml,schema/schema.yaml --data"
14-
test-geoparquet = "vecorel validate examples/geoparquet -e https://vecorel.github.io/extension-template/v0.1.0/schema.yaml,schema/schema.yaml --data"
15-
create-geoparquet = "vecorel create-geoparquet examples/geojson -o examples/geoparquet/example.parquet -c examples/geojson/collection.json -e https://vecorel.github.io/extension-template/v0.1.0/schema.yaml,schema/schema.yaml"
12+
test-schema = "vec validate-schema schema/schema.yaml"
13+
test-examples = "vec validate examples/geojson examples/geoparquet -s https://vecorel.org/geometry-metrics-extension/v0.1.0/schema.yaml,schema/schema.yaml -n -1"
14+
create-geoparquet = "vec create-geoparquet examples/geojson -o examples/geoparquet/example.parquet -s https://vecorel.org/geometry-metrics-extension/v0.1.0/schema.yaml,schema/schema.yaml"

README.md

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Geometry Metrics Extension Specification
22

33
- **Title:** Geometry Metrics
4-
- **Identifier:** <https://vecorel.github.io/geometry-metrics/v0.1.0/schema.yaml>
5-
- **Property Name Prefix:** metrics:
6-
- **Extension Maturity Classification:** Proposal/Candidate/Stable
7-
- **Owner**: @cholmes @geospatial-jeff
4+
- **Identifier:** <https://vecorel.org/geometry-metrics-extension/v0.1.0/schema.yaml>
5+
- **Property Name Prefix:** metrics
6+
- **Extension Maturity Classification:** Proposal
7+
- **Owner**: @cholmes @geospatial-jeff @m-mohr
88

99
This document explains the Geometry Metrics Extension to the
10-
[Vecorel Specification](https://github.com/vecorel/specification).
10+
[Vecorel specification](https://github.com/vecorel/specification).
1111

12-
This is the place to add a short introduction.
12+
The extension defines standardized properties for representing geometric measurements, such as area and perimeter.
1313

1414
- Examples:
1515
- [GeoJSON](examples/geojson/)
@@ -19,19 +19,10 @@ This is the place to add a short introduction.
1919

2020
## Properties
2121

22-
The properties in the table below can be used in these parts of Vecorel documents:
23-
24-
- [ ] Collection
25-
- [x] Feature Properties
26-
27-
| Property Name | Type | Description |
28-
| --------------- | ------ | ----------- |
29-
| metrics:area | float | Area of the polygon |
30-
| metrics:perimeter | float | Perimeter of the polygon |
31-
| metrics:width | float | |
32-
| metrics:height | float | |
33-
| metrics:micd | float | The Circumference-Area ratio (CA ratio) is calculated by dividing the circumference of a given polygon by the square root of its area. This ratio is then adjusted so that a circle corresponds to 0, and scaled so that a square corresponds to 1 |
34-
| metrics:ca_ratio | float | |
22+
| Property Name | Type | Description |
23+
| ----------------- | ----- | ----------- |
24+
| metrics:area | float | Area of the field, in square meters (m²). Must be > 0. |
25+
| metrics:perimeter | float | Perimeter of the field, in meters (m). Must be > 0. |
3526

3627
## Contributing
3728

examples/geojson/collection.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/geojson/example.json

Lines changed: 47 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,53 @@
11
{
2-
"type": "Feature",
3-
"id": "example",
4-
"bbox": [
5-
172.91173669923782,
6-
1.3438851951615003,
7-
172.95469614953714,
8-
1.3690476620161975
9-
],
10-
"geometry": {
11-
"type": "Polygon",
12-
"coordinates": [
13-
[
14-
[
15-
172.91173669923782,
16-
1.3438851951615003
17-
],
18-
[
19-
172.95469614953714,
20-
1.3438851951615003
21-
],
22-
[
23-
172.95469614953714,
24-
1.3690476620161975
25-
],
26-
[
27-
172.91173669923782,
28-
1.3690476620161975
29-
],
30-
[
31-
172.91173669923782,
32-
1.3438851951615003
33-
]
34-
]
2+
"schemas": {
3+
"example": [
4+
"https://vecorel.org/specification/v0.1.0/schema.yaml",
5+
"https://vecorel.org/geometry-metrics-extension/v0.1.0/schema.yaml"
356
]
367
},
37-
"properties": {
38-
"determination_datetime": "2020-01-01T00:00:00Z",
39-
"template:field1": 1,
40-
"template:field2": "abc"
41-
},
42-
"links": [
8+
"type": "FeatureCollection",
9+
"features": [
4310
{
44-
"rel": "collection",
45-
"href": "collection.json",
46-
"type": "application/json"
11+
"id": "example123",
12+
"type": "Feature",
13+
"properties": {
14+
"collection": "example",
15+
"metrics:area": 13302056.24144445,
16+
"metrics:perimeter": 14708.361379488953
17+
},
18+
"geometry": {
19+
"type": "Polygon",
20+
"coordinates": [
21+
[
22+
[
23+
172.91173669923782,
24+
1.3438851951615003
25+
],
26+
[
27+
172.95469614953714,
28+
1.3438851951615003
29+
],
30+
[
31+
172.95469614953714,
32+
1.3690476620161975
33+
],
34+
[
35+
172.91173669923782,
36+
1.3690476620161975
37+
],
38+
[
39+
172.91173669923782,
40+
1.3438851951615003
41+
]
42+
]
43+
]
44+
},
45+
"bbox": [
46+
172.91173669923782,
47+
1.3438851951615003,
48+
172.95469614953714,
49+
1.3690476620161975
50+
]
4751
}
4852
]
49-
}
53+
}
944 Bytes
Binary file not shown.

schema/schema.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
$schema: https://vecorel.github.io/sdl/v0.2.0/schema.json
2-
required:
3-
- template:field1
1+
$schema: https://vecorel.org/sdl/v0.2.0/schema.json
2+
collection:
3+
metrics:area: false
4+
metrics:perimeter: false
45
properties:
5-
template:field1:
6-
type: uint8
7-
template:field2:
8-
type: string
6+
metrics:area:
7+
type: float
8+
exclusiveMinimum: 0
9+
metrics:perimeter:
10+
type: float
11+
exclusiveMinimum: 0

0 commit comments

Comments
 (0)