Skip to content

Commit 2c8133d

Browse files
authored
Merge pull request #124 from STEMLab/branch_for_indoorAPI
revised README.md
2 parents d99412e + fe23de4 commit 2c8133d

7 files changed

Lines changed: 42 additions & 37 deletions

File tree

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,20 @@ pygeoapi/db.sqlite3
134134
.pygeoapi/docker/examples/mvt-tippecanoe/ES/data
135135

136136
# Tonny local
137+
# If you want to keep your test uploads private/local
137138
venv/
138139
__pycache__/
139140
*.pyc
140-
data/*.json # If you want to keep your test uploads private/local
141+
data/*.json
141142

142143
# Seongmin local
143144
run.sh
144145
pygeoapi-config.yml
145146
init_db.py
146147
my_test.py
147148
data/*.png
148-
*.dbml
149+
*.dbml
150+
data/
151+
openAPI/
152+
!openAPI/IndoorFeature_openAPI.yaml
153+
database/init_str_unique.sql

README.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# IndoorFeature API
2-
3-
IndoorFeature api is a RESTful api implementation of the **OGC IndoorGML 2.0** standard, designed to align with **OGC API - Features** standards. This api extends the pygeoapi framework to provide specialized service layers for indoor environments.
1+
# API-IndoorFeatures
42

3+
API - IndoorFeatures is a RESTful api implementation of the **OGC IndoorGML 2.0** standard, designed to align with **OGC API - Features** standards. This api extends the pygeoapi framework to provide specialized service layers for indoor environments.
4+
- We are working on `branch_for_indoorAPI` [branch](https://github.com/STEMLab/API_IndoorFeatures/tree/branch_for_indoorAPI).
55

66
### Naming
77

8-
This API is referred to as the **IndoorFeature API** because it implements
9-
the IndoorGML conceptual model, including spatial subdivision, topology,
8+
This API is referred to as the **API-IndoorFeatures** because it implements
9+
the IndoorGML 2.0 conceptual model, including spatial subdivision, topology,
1010
layering, and duality relationships.
1111

1212
All resources are exchanged using **IndoorJSON**, which serves as the
@@ -18,22 +18,18 @@ concrete JSON encoding of IndoorGML concepts.
1818

1919
This project is a extension of
2020
[pygeoapi](https://pygeoapi.io), designed to provide a RESTful API for IndoorGML 2.0 standard.
21-
### Key Accomplishments
22-
* **OGC Standards Alignment:** Successfully mapped IndoorGML 2.0 Indoorfeature to the OGC API - Features core.
23-
* **Dual-Space Logic:** Full implementation of Primal Space and Dual Space connectivity via. Poincare's Duality.
24-
* **Advanced Navigation:** Custom service endpoints for Shortest Path (Dijkstra) and Topological N-Hop analysis.
25-
* **Engineering Precision:** Native support for **SRID 0** (Cartesian Plane) for building-scale accuracy.
21+
2622

2723
---
2824

2925
## 🛠 Technical Pedigree
3026

3127
### Built on [pygeoapi](https://pygeoapi.io)
32-
This engine is built upon a specialized fork of **pygeoapi**, a Python server implementation of the OGC API suite of standards.
33-
* **Standardized Access:** Provides RESTful endpoints using OpenAPI, GeoJSON, and HTML.
34-
* **Extended Core:** We have customized the `api/indoorgml.py` core and developed custom providers to handle the unique hierarchy of `IndoorFeatures`.
35-
* **PostgreSQL/PostGIS:** Optimized schema for spatial bounding and geometric queries.
36-
* **pgRouting:** Dynamic graph traversal without the overhead of static topology creation.
28+
This engine is built upon a specialized fork of **pygeoapi 0.22.0**, a Python server implementation of the OGC API suite of standards.
29+
* **Standardized Access:** Provides RESTful endpoints using OpenAPI, JSON, and HTML.
30+
* **Extended Core:** We have customized the `api/indoorgml.py` core and developed custom providers `provider/postgresql_indoordb.py` to handle the unique hierarchy structure of `IndoorFeatures`.
31+
* **PostgreSQL/PostGIS:** Optimized schema of indoor DB for efficient query and geometric functions.
32+
* **pgRouting:** Routing the optimal path in the graph(DualSpace).
3733
* **Dockerized:** Fully containerized environment for immediate deployment.
3834

3935
---
@@ -43,9 +39,12 @@ This engine is built upon a specialized fork of **pygeoapi**, a Python server im
4339
| Category | Endpoint | Description |
4440
| :--- | :--- | :--- |
4541
| **Core** | `/collections/{collection_id}/items/{feature_id}` | Standard OGC resource discovery and Feature access. |
46-
| **IndoorFeature** | `.../layers/{layer_id}/...` | Specialized access to IndoorJSON components (Thematic layers). |
47-
| **Navigation** | `...{layer_id}/routing` | Shortest path calculation powered by pgRouting.|
48-
| **Spatial** | `/geoquery` | Advanced spatial filtering via WKT-form 2D geometries. |
42+
| **IndoorFeature** | `.../layers/{layer_id}/` | Specialized access to IndoorJSON `ThematicLayer`. |
43+
| **IndoorFeature** | `.../interlayerconnections/{connection_id}/` | Specialized access to IndoorJSON `interLayerConnection`. |
44+
| **IndoorFeature** | `.../primal/{member_id}/...` | Specialized access to IndoorJSON primal space components (`cellSpace` and `cellBoundary`). |
45+
| **IndoorFeature** | `.../dual/{member_id}/...` | Specialized access to IndoorJSON dual space components (`node` and `edge`). |
46+
| **Services** | `...{layer_id}/routing` | Shortest path calculation powered by pgRouting.|
47+
| **Services** | `/geoquery` | Advanced spatial filtering via WKT-form 2D geometries. |
4948

5049
💡 Tip: For a full list of over 20+ endpoints, including detailed parameter schemas and CRUD operations, please refer to our interactive documentation at:
5150
🔗 Swagger UI: `/openapi`.
@@ -55,24 +54,27 @@ This engine is built upon a specialized fork of **pygeoapi**, a Python server im
5554
## 📥 Installation & Setup
5655
### 1. Prerequisites
5756
* Docker & Docker Compose (For PostGIS/pgRouting)
58-
* Python 3.10+ (For pygeoapi)
57+
* Python 3.10+ (For pygeoapi 0.22.0)
5958

6059
### 2. Environment Startup
6160
We recommend using a Python virtual environment to manage dependencies and avoid conflicts with system-level packages.
6261
```bash
6362
# Clone the repository
64-
git clone [https://github.com/STEMLab/IndoorGML_API.git](https://github.com/STEMLab/IndoorGML_API.git)
65-
cd IndoorGML_API
63+
git clone [https://github.com/STEMLab/API-IndoorFeatures.git](https://github.com/STEMLab/API-IndoorFeatures.git)
64+
cd API-IndoorFeatures
65+
6666
# Create and activate a Python Virtual Environment
67-
python3 -m venv venv
68-
source venv/bin/activate
67+
python3 -m venv .venv
68+
source .venv/bin/activate
69+
6970
# Install required dependencies
70-
pip install -r requirements-indoor.txt
71+
pip install -r requirements-indoorfeature.txt
7172
pip install -e .
73+
7274
# Start Docker Containers
7375
docker-compose up -d --build
7476

75-
./start.sh
77+
bash ./start.sh
7678
```
7779

7880
### 3. Testing api

pygeoapi-config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ metadata:
4141
name: MIT
4242
url: https://opensource.org/licenses/MIT
4343
contact:
44-
name: Taehoon KIM
45-
email: kim.taehoon@aist.go.jp
46-
url: https://github.com/STEMLab/IndoorGML_API
44+
name: Dong Kwon Kang / Seongmin Choi / Taehoon KIM
45+
email: kangdg2001@pusan.ac.kr / csm010311@pusan.ac.kr / kim.taehoon@aist.go.jp
46+
url: https://github.com/STEMLab/API-IndoorFeatures
4747

4848
resources:
4949
obs:

pygeoapi-config_indoorFeature.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ logging:
2525

2626
metadata:
2727
identification:
28-
title: IndoorFeatures API Demonstration
28+
title: API-IndoorFeatures Demonstration
2929
description: Developing IndoorGML and IndoorJSON support for OGC API Standards.
3030
keywords:
3131
- IndoorGML
@@ -41,9 +41,9 @@ metadata:
4141
name: MIT
4242
url: https://opensource.org/licenses/MIT
4343
contact:
44-
name: Taehoon KIM
45-
email: kim.taehoon@aist.go.jp
46-
url: https://github.com/STEMLab/IndoorGML_API
44+
name: Dong Kwon Kang / Seongmin Choi / Taehoon KIM
45+
email: kangdg2001@pusan.ac.kr / csm010311@pusan.ac.kr / kim.taehoon@aist.go.jp
46+
url: https://github.com/STEMLab/API-IndoorFeatures
4747

4848
resources:
4949
pusan_national_university:

pygeoapi/provider/postgresql_indoordb.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ def __init__(self, datasource=None):
2020
"""
2121
PostgresIndoorDB Class Constructor
2222
"""
23-
# define defaults inside init to avoid class-level state issues
2423
self.host = 'localhost'
2524
self.port = 5432
2625
self.dbname = 'indoordb'
@@ -31,7 +30,6 @@ def __init__(self, datasource=None):
3130
if datasource is not None:
3231
self.host = datasource.get('host', self.host)
3332
self.port = datasource.get('port', self.port)
34-
# Fixed: Ensure code matches docstring (using 'dbname' consistently)
3533
self.dbname = datasource.get('dbname', self.dbname)
3634
self.user = datasource.get('user', self.user)
3735
self.password = datasource.get('password', self.password)

start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export PYGEOAPI_OPENAPI=$(pwd)/openAPI/IndoorFeature_openAPI.yaml
88
# 2. Generate the OpenAPI Document
99
# This creates the 'local.openapi.yml' file from your config.
1010
# We run this every time to ensure your API changes (like new collections) appear in Swagger.
11-
echo "Regenerating OpenAPI configuration..."
11+
# echo "Regenerating OpenAPI configuration..."
1212
# pygeoapi openapi generate "$PYGEOAPI_CONFIG" --output-file "$PYGEOAPI_OPENAPI"
1313

1414
# 3. Start the Server

0 commit comments

Comments
 (0)