# YMSpace route.htm Controller Exploration Summary

**Date:** 2026-02-08
**Base URL:** `https://ymspace.ga.nycu.edu.tw/gisweb/public/route.htm`
**Framework:** GIPS (GIS Platform System) - Java Spring MVC
**Total requests made:** ~1,800 across 6 exploration iterations

---

## 1. API Architecture Discovery

### Valid Actions (from error message leak)
The route.htm controller supports exactly **9 actions**:

| Action | Method | Required Params | Status |
|--------|--------|----------------|--------|
| `findGeom` | POST | `path`, `gid`, `proj` | Navi config is NULL - no data returned |
| `loadImageByApKey` | POST | `naviKey`, `apKey` | sourceType null - broken |
| `findAll` | GET/POST | `tableName` (via path?) | tableName comparison fails |
| `getHeaders` | GET/POST | `path` | Navi config NULL |
| `search` | GET/POST | `schema` | Schema null |
| `getLayerInfo` | GET | `layerName` | Works but returns 0 results for all names tried |
| `searchByDistance` | POST | `naviKey`, `lon`, `lat`, `srcProj`, `distance` | tableCrs is null |
| `getCentroid` | POST | `naviKey`, `gid` | src is null |
| `dataTransmissionAPI` | GET/POST | `query` (JSON with `target`+`action`) | Partially works - `find` action recognized |

### Other Controllers Discovered (from JS analysis)

| Controller | Working Actions | Data Retrieved |
|-----------|----------------|---------------|
| **buildinfo.htm** | `getFloorList`, `getBoundByBuildId`, `getCentroidByBuildId`, `getBoundingBoxByBuildId`, `loadPublicData`, `loadImage` | YES - Full building data |
| **roominfo.htm** | `findByFloor`, `queryRoomExists`, `getBound` | YES - Full room data |
| **campus.htm** | `listAllWithExtent`, `getCampusList` | YES - Campus boundaries |
| **userrole.htm** | `findAllLayers` | YES - All 51 layer definitions with naviKeys |
| **uploadfiles.htm** | `listImg` | YES - Building photos (URLs discovered) |

---

## 2. Data Successfully Extracted

### 2.1 Campus Data (3 campuses)
- Yang Ming University Campus (ID: 1) - with bounding polygon in EPSG:3826
- Linong Section 2nd Subsection (ID: 2) - with bounding polygon
- Fulin Section 2nd Subsection (ID: 3)

### 2.2 Building Data (31 buildings with full data)

**Yang Ming Campus (Y prefix):**
| ID | Name (Chinese) | Name (English) | Lat | Lon | Floors |
|----|---------------|----------------|-----|-----|--------|
| Y001 | Nursing Building | Nursing Building | 25.1223 | 121.5156 | R1,6F-1F,B1 |
| Y002 | Administration Building | Administration Building | 25.1225 | 121.5148 | 3F-1F,B1 |
| Y003 | 2nd Medical Building | 2nd Medical Building | 25.1229 | 121.5158 | RF,4F-1F,2M |
| Y004 | Dentistry Building | Dentistry Building | 25.1230 | 121.5152 | RF,4F-1F |
| Y005 | Medical Building | Medical Building | 25.1228 | 121.5143 | RF,3F-1F,1M,B1 |
| Y006 | Zhi Xing Building (Back) | Zhi Xing Building(Back) | 25.1236 | 121.5126 | RF,5F-2F |
| Y007 | Zhi Xing Building (Front) | Zhi Xing Building(Front) | 25.1234 | 121.5130 | RF,3F-1F,B1 |
| Y008 | Teaching Building | Teaching Building | 25.1235 | 121.5138 | 3F-1F,2M,B1 |
| Y009 | Experimental Building | Experimental Building | 25.1235 | 121.5148 | RF,4F-1F,B1 |
| Y010 | Biomedical Engineering Building | Biomedical Engineering Bldg | 25.1236 | 121.5157 | R1,R2,6F-1F |
| Y011 | Student Activity Center | Student Activity Center | 25.1239 | 121.5134 | RF,2F-1F |
| Y012 | Gymnasium (Main Campus) | Gymnasium | 25.1230 | 121.5140 | 3F-1F |

**B-prefix buildings (dormitories/facilities):**
B003-B020: Includes guest houses, dormitories (male/female), research buildings

**P-prefix buildings (major facilities):**
P003-P006: Large buildings with 9-12 floors including basement levels

### 2.3 Room Data (202 floor-room combinations, ~574KB)
Complete room-level data for all floors of all buildings. Each room includes:
- Room name (Chinese)
- Room ID (e.g., "Y0011F004")
- Class number (e.g., "118")

### 2.4 Building Geometry (31 buildings)
Full building boundary polygons in MULTIPOLYGON WKT format for both:
- EPSG:3826 (TWD97/TM2 Zone 2)
- EPSG:4326 (WGS84)

### 2.5 Building Bounding Boxes (31 buildings)
Simplified bounding box polygons in WGS84 for quick spatial queries.

### 2.6 Building Images (31 buildings, ~28KB of URLs)
Image URLs via `uploadfiles.htm?action=listImg&q={id}` endpoint.

### 2.7 Layer Definitions (51 layers)

**Campus Life (School Life):**
- gis_atm - ATM locations
- gis_artwork - Public art
- gis_conveniencestore - Convenience stores
- gis_campusphotos - Campus photos
- gis_postoffice - Post offices/banks
- gis_restaurant - Restaurants/dining
- gis_sport / gis_sport_p - Sports facilities
- test_c - Vending machines
- toilet - Restrooms (holiday hours)

**Emergency/Safety:**
- gis_aed - AED defibrillator locations
- gis_emergencycall - Emergency call points
- gis_securityoffice - Security/police locations

**Accessibility:**
- gis_auditorium2 - Wheelchair-accessible seating
- gis_barrierfreetoilet2 - Accessible restrooms
- gis_elevator2 - Accessible elevators
- gis_handicapparking2 - Accessible parking
- gis_wheelchairramp2 - Wheelchair ramps

**Transportation:**
- gis_busroutes_1/2/3 - Bus routes (559, Green Line, Red Line)
- gis_busstop - Bus stops
- gis_gateway - Campus entrances

**Sidewalks (15 routes from campus gate to buildings):**
- gis_sidewalk_1 through gis_sidewalk_15
- gss_sidewalk - Full campus walkway network

**Property/Land:**
- gis_parcel0821line/0886line/0893line/0981line - Property boundary lines
- gis_parcel0886text/0893text/0981point - Property labels

**Building Management:**
- buildinfo / buildinfoen - Building info (Chinese/English)
- floorinfo - Floor management
- roominfo - Room management
- gis_campus - Campus boundaries

---

## 3. What route.htm Could NOT Return (and Why)

### The Navi Configuration Problem
The route.htm controller's core actions (`findGeom`, `findAll`, `search`, `searchByDistance`, `getCentroid`, `getHeaders`) all fail because the server's **navi configuration is NULL**. This is an internal mapping that connects naviKey values to GeoServer layer names and database tables. The error messages confirm:

- `findGeom`: `java.lang.NullPointerException` (path/naviKey not resolved to a table)
- `getHeaders` with path: `"navi" is null` (navi config map not initialized)
- `searchByDistance`: `tableCrs cannot be null` (CRS not configured for naviKey)
- `getCentroid`: `src cannot be null` (projection source not configured)
- `loadImageByApKey`: `sourceType is null` (source type mapping not configured)

This means the route.htm controller **was designed to serve spatial data** but its GeoServer integration is **not configured** on this instance. The data exists (accessible via buildinfo.htm/roominfo.htm), but the spatial query layer (route.htm) is disconnected.

### Indoor Routing/Navigation Network
Despite route.htm's name suggesting routing capabilities, no indoor routing network data was found. The `gis_sidewalk_*` layers suggest outdoor pedestrian routes exist, but the spatial data for these layers is not accessible through the public API due to the navi configuration issue.

### WiFi AP Location Data
The `loadImageByApKey` action suggests WiFi AP mapping capability, but no AP data was retrievable. The function expects a `sourceType` parameter that is internally derived from the navi configuration.

---

## 4. File Inventory

### Key Data Files (in `v6_final/`):
| File | Size | Description |
|------|------|-------------|
| `_FINAL_SUMMARY_v6.json` | 13KB | Complete extraction summary with all building details |
| `all_buildings_centroids.json` | 7KB | 31 building center points with names (CN/EN) |
| `all_buildings_publicdata.json` | 7KB | Building descriptions in Chinese |
| `all_buildings_floors.json` | 3KB | Floor lists for all buildings |
| `all_rooms_by_floor.json` | 574KB | Complete room data for 202 floor-building combinations |
| `all_buildings_bounds.json` | 7KB | Building boundary polygons (WGS84) |
| `all_buildings_images.json` | 28KB | Image URLs for all buildings |
| `userrole_findAllLayers.json` | 21KB | All 51 layer definitions with metadata |
| `campus_listAllWithExtent.json` | 1KB | Campus boundaries with extents |
| `_layer_summary.json` | 13KB | Simplified layer overview |

### JavaScript Framework Files:
| File | Size | Description |
|------|------|-------------|
| `gips.map.gisMapWrapper.js` | 76KB | Main GIPS wrapper - reveals all API methods |
| `gips.core.js` | 33KB | Core framework |
| `gips.map.geomap.js` | 45KB | GeoMap module |

---

## 5. Potential Follow-Up Opportunities

1. **uploadfiles.htm**: The `listImg` action with numeric IDs (38264-39050 range discovered) could yield building/campus photographs.

2. **GeoServer WFS**: The map.htm references `https://map.ntu.edu.tw/geoserver` with workspace `ntuga`. The `gis_sidewalk_*` and other spatial layers might be queryable via WFS if accessible.

3. **dataTransmissionAPI `find`**: The `find` action with `keyColumn` or `filter` parameters is recognized but requires `records` data. This could potentially be used to query spatial data if the correct JSON structure is provided.

4. **Authenticated endpoints**: Most `/gisweb/` paths (non-public) return 401, suggesting there is an admin interface with more data access.
