Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions maintainer-tools
Submodule maintainer-tools added at f9b919
661 changes: 661 additions & 0 deletions ogcapi/LICENSE.txt

Large diffs are not rendered by default.

89 changes: 89 additions & 0 deletions ogcapi/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# OGC API Module for Odoo

## Overview

The OGC API module implements the OGC API - Features standard on Odoo 16, allowing you
to publish and manage geospatial data via modern, RESTful HTTP APIs. The module provides
standardized access to geospatial features and metadata, following Open Geospatial
Consortium (OGC) specifications.

## Features

- **OGC API - Features endpoints:** Landing page, Conformance, Collections, Items
- **GeoJSON and JSON support**
- **Paging and spatial filtering (bbox, limit, offset)**
- **CRS transformation and definitions**
- **OpenAPI 3.0 documentation**
- **Authentication (Bearer Token, Basic Auth)**
- **Admin interface for managing APIs, collections, CRS, keywords, and metadata**
- **Extensible architecture and comprehensive test coverage**

## Module Structure

```
ogcapi/
├── controllers/ # HTTP controllers for API endpoints
├── data/ # API configuration data
├── i18n/ # Translation files
├── models/ # Odoo models (API, collection, CRS, etc.)
├── security/ # Access rules and authentication
├── static/ # Static files (OpenAPI schemas, CSS, JS)
├── tests/ # Test modules
├── views/ # XML view definitions
├── __init__.py # Module initialization
└── __manifest__.py # Module metadata
```

## Installation

1. Add the following line to your Odoo configuration file:
```
server_wide_modules = web, base, ogcapi
```
2. Copy the module to your Odoo addons directory.
3. Add the module path to your Odoo configuration.
4. Restart the Odoo server.
5. Install the module from the Apps menu.

## Configuration

- **OGC API Definition:** Create new API records from OGC API → APIs menu.
- **Collection Management:** Add collections and link them to Odoo models from OGC API →
Collections menu.
- **CRS Definitions:** Manage CRS records from OGC API → CRS Definitions menu.

## API Endpoints

| Endpoint | Description | Method |
| --------------------------------------------------------------------- | ----------------------- | ------ |
| `/ogcapi/<api_name>` | Landing page | GET |
| `/ogcapi/<api_name>/conformance` | Conformance information | GET |
| `/ogcapi/<api_name>/collections` | List of collections | GET |
| `/ogcapi/<api_name>/collections/<collection_name>` | Collection details | GET |
| `/ogcapi/<api_name>/collections/<collection_name>/items` | Feature collection | GET |
| `/ogcapi/<api_name>/collections/<collection_name>/items/<feature_id>` | Single feature | GET |
| `/ogcapi/<api_name>/collections/<collection_name>/schema` | Collection schema | GET |
| `/ogcapi/<api_name>/api` | OpenAPI documentation | GET |

## Authentication

- Bearer Token (Odoo API key)
- Basic Authentication

## Testing

Use the `tests/` directory and Odoo's test infrastructure for automated testing.

## License

This module is licensed under the GNU Affero General Public License v3. See
[LICENSE.txt](LICENSE.txt) for details.

## Authors

- OGC API module development team

## Support

For questions and support, use the Odoo community forums or contact the module
maintainers.
34 changes: 34 additions & 0 deletions ogcapi/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#############################################################################
#
# Odoo OGC API
#
# Copyright (C) 2025-TODAY Geon Information Technologies Inc. (<https://www.geonbt.com.tr>)
# Copyright (C) 2025-TODAY Nezih Gülesanlar (<postanezih@gmail.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################
from .models.ogcapi_exceptions import (
OgcapiException,
BadRequestException,
NotFoundException,
UnauthorizedException,
ForbiddenException,
InternalServerErrorException,
MethodNotAllowedException,
)


from . import controllers
from . import models
56 changes: 56 additions & 0 deletions ogcapi/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#############################################################################
#
# Odoo OGC API
#
# Copyright (C) 2025-TODAY Geon Information Technologies Inc. (<https://www.geonbt.com.tr>)
# Copyright (C) 2025-TODAY Nezih Gülesanlar (<postanezih@gmail.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################

{
"name": "OGC API",
"summary": (
"This app helps to interact with odoo backend with help of "
"Open Geospatial Consortium (OGC) api requests"
),
"category": "GeoSpatial",
"version": "16.0.1.0.0",
"author": (
"Nezih Gülesanlar, Geon IT Solutions, " "Odoo Community Association (OCA)"
),
"website": "https://github.com/OCA/geospatial",
"depends": ["base", "web", "base_geoengine"],
"data": [
"security/ir.model.access.csv",
"views/ogcapi_workspace_views.xml",
"views/ogcapi_collection_views.xml",
"views/ogcapi_api_views.xml",
"views/ogcapi_api_path_views.xml",
"views/ogcapi_component_parameter_views.xml",
"views/ogcapi_component_schema_views.xml",
"views/ogcapi_component_response_views.xml",
"views/ogcapi_menuitem.xml",
"views/ogcapi_test_feature_views.xml",
"data/ogcapi_config_data.xml",
],
"assets": {},
"external_dependencies": {"python": ["jsonschema"]},
"images": [],
"license": "AGPL-3",
"installable": True,
"application": True,
"auto_install": False,
}
23 changes: 23 additions & 0 deletions ogcapi/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#############################################################################
#
# Odoo OGC API
#
# Copyright (C) 2025-TODAY Geon Information Technologies Inc. (<https://www.geonbt.com.tr>)
# Copyright (C) 2025-TODAY Nezih Gülesanlar (<postanezih@gmail.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#############################################################################

from . import main
Loading
Loading