Campusmap
Campus Map API for Institut Teknologi Bandung. 🗺
Install / Use
/learn @mathdroid/CampusmapREADME
INSTALLATION
Tested on Node v6.3.1
-
$ git clone PATH_TO_THIS_REPOthis repository -
$ npm install -
$ node index.js
RESULT
init.js will provide results in data/ folder.
database.jswhich will export (CommonJS) 5 things:buildingswhich is anarrayof building objects.floorswhich is anarrayof floor objects.roomswhich is anarrayof room objects.polygonsOfFloorswhich is anarrayof floor objects, but instead of rooms they have polygons of each room in that floor.validatedPolygonswhich is anarrayof polygons fetched using the rooms ofroomsarray.db.min.jsonwhich containsbuildings,floors,rooms,polygonsOfFloors,validatedPolygonsin a JSON (not prettified) format.db${key}.min.jsonwith one of the key from above, contains their value, respectively.
TODO
-
[x] Map each floor in a building for its rooms.
-
[x] API server
- [x] Rooms
- [x] Floors
- [x] Buildings
- [x] Floor Polygons
- [x] Room Polygons
-
[ ] Create Android Client
-
[ ] Create iOS Client
SERVER
Requires MongoDB
After running init, seed the Mongo database using server/seed.js or manually with the data from data/
Run $ node server/index.js.
Routes:
GET /rooms -> List all the rooms in JSON.
GET /rooms/name/:name -> Returns the rooms containing the name :name (using regex)
GET /rooms/id/:roomId' -> Returns the rooms with id :roomId
GET /floors -> List all the floors.
GET /floors/id/:id -> Returns the floors with id :id
GET /buildings -> List all the buildings
GET /buildings/name/:name -> List all the buildings containing name :name
GET /buildings/id/:id -> List all the buildings containing id :id
GET /floor-polygons -> List all the floor Polygons
GET /floor-polygons/id/:floorId -> Returns the floor polygons from floors with id :floorId
GET /v-room-polygons -> List all the Room polygons
GET /v-room-polygons/name/:name -> List all the RP with name :name.
GET /v-room-polygons/id/:roomId -> List all the RP with id :roomId.
OPTIONS / -> Gives the list of allowed request types.
HEAD / -> HTTP headers only, no body.
TRACE / -> Blocked for security reasons.
CONTRIBUTE
Reach me out here or just make a PR.
© Muhammad Mustadi - 2016
Related Skills
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
