Campus Atlas -- a Mapping & GIS solution which provides easy access to navigating the campus around you.

Last update: Nov 12, 2021

Campus Atlas

Welcome to Campus Atlas -- a Mapping & GIS solution which provides easy access to navigating the campus around you.

Technical Implementation

Building IMDFs

In order to render the insides of a building, we need to construct the data in a format the computer can understand. We chose to use the Indoor Mapping Data Format (IMDF), a superset of the GeoJSON standard, written by Apple for use with Apple Maps.

We started with a floorplan PDF of the ILC. This floorplan is publicly available on the UMass website, and is on display in various parts of the ILC. We overlaid the foorplan on top of Google Maps, and drew polygons around all of the classrooms & hallways. We then added entrance and exit points, corresponding to all doors between classrooms and outside the building.

Once we had the ILC sectioned into 'units', we exported these files to KML -- Keyhole Markup Language. This is an XML-like format, that although is standardized, it is not commonly used by many GIS platforms, in favor of more common formats like GeoJSON. Therefore, the second step in our pipeline was to convert the KML to GeoJSON. We used a Python library, alongside a good handful of tweaks, to make the GeoJSON IMDF compliant.

In the end, started had something that looked like this:

n111 1 -72.52647901921534,42.39134650155054,0.... ">
xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
  <Placemark>
      <name>n111name>
      <Polygon>
        <tessellate>1tessellate>
        <outerBoundaryIs>
          <LinearRing>
            <coordinates>
              -72.52647901921534,42.39134650155054,0....
            coordinates>
          LinearRing>
        outerBoundaryIs>
      Polygon>
    Placemark>
  Document>
kml>

And with a press of a python3 geojson_imdf_converter.py, we got

{
  "type": "Feature",
  "id": "ef65bb09-3219-4598-a238-34fed876548f",
  "feature_type": "unit",
  "properties": {
    "name": "n111",
    "restriction": null,
    "accessibility": null,
    "level_id": "1ae9c2cb-721a-4a8c-bbb0-c836b0504967",
    "category": "classroom",
    "alt_name": null,
    "display_point": null
  },
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [-72.5262255, 42.390991],
        [-72.5262188, 42.3909583],
        [-72.5261999, 42.3909142],
        ...
      ]
    ]
  }
}

The resulting IMDFs are are simply zipped GeoJSONs in a particular format w/ properties describing the attributes of the room (classroom vs hallway vs entryway, for example). There are lots pf properties that can be filled in, but to start we filled in the name and type of the room.

Finally, we needed to validate our IMDFs. These files were thousand of lines long, full of lat&lon coordinates, some of which were compliant, some of which were out of spec, and (at the beginning) some completely invalid. To solve this, we used Apple's own IMDF Sandbox. It allowed us to snap our polygons together, connecting rooms to hallways which weren't already. It allowed us to refine our scripts, fix issues, and visualize the building before we had the branch up and running.

Rendering Indoor Maps

We built an iPhone-native app using SwiftUI, UIKit, and MapKit to display our indoor maps. We request the user's current location to be able to retrieve the proper indoor maps for their given location. Next, we render polygons and annotations described in the IMDF on top of the MKMapView base map.

Locating and Serving the IMDFs

Once we have converted the basic map definitions into the standard IMDF format, we then post the files and host them in our backend; the backend of this project is implemented entirely through AWS. We have a PostgresSQL database hosted by AWS RDS (Relational Database Service), storage space supplied by AWS S3, and several REST API functions hosted on AWS lambdas that are delivered through Amazon's API Gateway.

When we receive an IMDF file to be stored in the database, we first compute the md5 digest and "GeoHash" of the IMDF. This geohash will encode a given latitude and longitude into a string of bits to create a unique identifier of a specific place on Earth. This hash was computed up to six characters to provide us a precision of ±0.61 KM. While the md5 digest is used to prevent duplicate IMDF's from being submitted, the geohash will allow us to perform to efficient locality-sensitive searches to find stored map definitions in the vicinity of a given latitude and longitude. Thus, we store the IMDF file in an Amazon S3 bucket, and submit the file's geohash, md5 digest, and S3 bucket key into RDS.

When the client (i.e. mobile app) wants to get a map definition from the client, it will make an http GET request to our AWS Lambda function hosted through API Gateway. This function will compute the geohash of the sent coordinates, and then look up any geohashes in the database that start with the same first five characters. Since geohash was designed based on the idea of locality sensitive hashing, any found database entries will be in the vicinity of the client. The lambda function will then respond back with the latitude/longitude of all the found entries, along with their key in S3. The client can than query the S3 storage with the provided keys to get the IMDF files of the buildings in its vicinity.

GitHub

https://github.com/LTSENG01/CampusAtlas
You might also like...

A stand-alone Swift wrapper around the FileMaker XML Web publishing interface, enabling access to FileMaker servers.

A stand-alone Swift wrapper around the FileMaker XML Web publishing interface, enabling access to FileMaker servers.

Perfect - FileMaker Server Connector This project provides access to FileMaker Server databases using the XML Web publishing interface. This package b

Dec 7, 2021

This app is a native client for openHAB which allows easy access to your sitemaps

openHAB client for iOS Introduction This app is a native client for openHAB which allows easy access to your sitemaps. Beta releases are available on

Jun 7, 2022

A wrapper around UICollectionViewController enabling a declarative API around it's delegate methods using protocols.

Thunder Collection Thunder Collection is a useful framework which enables quick and easy creation of collection views in iOS using a declarative appro

Dec 18, 2020

Easy JSON to NSObject mapping using Cocoa's key value coding (KVC)

Easy JSON to NSObject mapping using Cocoa's key value coding (KVC)

#Motis Object Mapping Easy JSON to NSObject mapping using Cocoa's key value coding (KVC) Motis is a user-friendly interface with Key Value Coding that

May 3, 2022

iPhone and iPod Touch version of Skeleton Key: is an addictive and unique puzzle game in which you shift keys around the board unlocking treasure chests. Made with cocos2d-iphone.

Skeleton Key (iOS) Skeleton Key is an addictive and unique puzzle game in which you shift keys around the board unlocking treasure chests. It's availa

Jun 6, 2022

College-catche - Developed an iPhone application that provides access to real-time college statistics as part of The Congressional App Challenge

college-catche Developed an iPhone application that provides access to real-time

Jan 27, 2022

Development of the TUM Campus App for iOS devices - for and from students at Technical University of Munich.

Development of the TUM Campus App for iOS devices - for and from students at Technical University of Munich.

Tum Campus App - An Unofficial Guide Through University Life The TUM Campus App (TCA) is an open source project, developed by volunteers and available

Jun 27, 2022

Fast Campus iOS App Development All-in-one Package Online Clone Coding

Fast Campus iOS App Development All-in-one Package Online Clone Coding

애플뮤직 클론 코딩 패스트캠퍼스 iOS 앱 개발 올인원 패키지 Online 클론코딩 사용요소 UICollectionReusableView , c

Dec 21, 2021

An on-campus UCR auth app for iOS.

R'Scan Installation The app can be installed through the Apple App Store on compatible iOS devices: https://apple.co/3sGuxrM Usage Login Enter your R'

Dec 28, 2021

Development of the TUM Campus App for iOS devices - for and from students at Technical University of Munich.

Development of the TUM Campus App for iOS devices - for and from students at Technical University of Munich.

Development of the TUM Campus App for iOS devices - for and from students at Technical University of Munich.

May 3, 2022

Project Based IOS/Swift study_fast campus lecture

Project Based IOS/Swift study_fast campus lecture

Project Based IOS/Swift study_fast campus lecture

May 31, 2022

Swift Featured Projects in brain Mapping

Swift Featured Projects in brain Mapping

Swift 开源精选   自 2014年 WWDC 发布 Swift 语言以来,本项目 一直致力于将主流 Swift 中文学习、开发资源汇集于此,并且尽力紧密地跟踪、甄选优秀 Swift 开源项目,以方便开发者快速获得并使用。考虑 Swift 已经正式发布超过四年半(更无力管理维护海量的 Swift

Jun 21, 2022

Decodable Simple and strict, yet powerful object mapping made possible by Swift 2's error handling.

Decodable Simple and strict, yet powerful object mapping made possible by Swift 2's error handling. Greatly inspired by Argo, but without a bizillion

Jun 18, 2022

Reflection based (Dictionary, CKRecord, NSManagedObject, Realm, JSON and XML) object mapping with extensions for Alamofire and Moya with RxSwift or ReactiveSwift

EVReflection General information At this moment the master branch is tested with Swift 4.2 and 5.0 beta If you want to continue using EVReflection in

Jun 16, 2022

CRUD is an object-relational mapping (ORM) system for Swift 4+.

CRUD is an object-relational mapping (ORM) system for Swift 4+. CRUD takes Swift 4 Codable types and maps them to SQL database tables. CRUD can create tables based on Codable types and perform inserts and updates of objects in those tables. CRUD can also perform selects and joins of tables, all in a type-safe manner.

Apr 21, 2022

iOS App that allows a pilot to check drone photo collection after a mapping mission for any issues

iOS App that allows a pilot to check drone photo collection after a mapping mission for any issues

DronePhotoChecker iOS App that allows a pilot to check drone photo collection after a mapping mission for any issues. Features: Connects to DJI drone

Dec 30, 2021

Bluetooth mapping in Swift

Bluetooth mapping in Swift

Bluetonium is part of the E-sites iOS Suite. Bluetonium is a Swift Library that makes it easy to communicate with Bluetooth devices. Features 🎲 Servi

Apr 7, 2022

WhirlyGlobe-Maply is a mapping toolkit with two parts, hence the dash.

WhirlyGlobe-Maply is a mapping toolkit with two parts, hence the dash.

What is WhirlyGlobe-Maply? WhirlyGlobe-Maply is a mapping toolkit with two parts, hence the dash. The WhirlyGlobe part is an interactive 3D globe. The

Jun 10, 2022

Manage multi-domain url auto mapping ip address table.

Manage multi-domain url auto mapping ip address table.

Domainer Multi-domain mapper. This library provides manage multi-domain table. Features Manage multi-domain mapping main domain. Find best domain whic

Apr 4, 2020
Related tags
Easy Map Annotation Clustering 📍
Easy Map Annotation Clustering 📍

Cluster is an easy map annotation clustering library. This repository uses an efficient method (QuadTree) to aggregate pins into a cluster. Features R

Jun 20, 2022
JDSwiftMap is an IOS Native MapKit Library. You can easily make a highly customized HeatMap.
JDSwiftMap is an IOS Native MapKit Library.  You can easily make a highly customized HeatMap.

JDSwiftMap is an IOS Native MapKit Library. You can easily make a highly customized HeatMap. Installation Cocoapods pod 'JDSWiftHeatMap' Usage JDSwi

Jun 18, 2022
MSFlightMapView allows you to easily add and animate geodesic flights to Google map

MSFlightMapView Demo Requirements iOS 10.0+ Xcode 9.0+ Installation Just add the MSFlightMapView folder to your project. or use CocoaPods: pod 'MSFlig

Apr 24, 2022
A tech-for-good, green and digital solution based on CSA which promotes the green agricultural production for small farmers, provides responsible produce for consumers.
A tech-for-good, green and digital solution based on CSA which promotes the green agricultural production for small farmers, provides responsible produce for consumers.

Green Farm IBM : Call for Code 2021 Green Farm is a tech-for-good, green and digital solution based on CSA which promotes the green agricultural produ

Mar 18, 2022
A stand-alone Swift wrapper around the mongo-c client library, enabling access to MongoDB servers.
A stand-alone Swift wrapper around the mongo-c client library, enabling access to MongoDB servers.

This package is deprecated in favour of the official Mongo Swift Driver. We advise users to switch to that pack

Jan 29, 2022
Perfect - a Swift wrapper around the MySQL client library, enabling access to MySQL database servers.
Perfect - a Swift wrapper around the MySQL client library, enabling access to MySQL database servers.

Perfect - MySQL Connector This project provides a Swift wrapper around the MySQL client library, enabling access to MySQL database servers. This packa

May 21, 2022
A stand-alone Swift wrapper around the libpq client library, enabling access to PostgreSQL servers.
A stand-alone Swift wrapper around the libpq client library, enabling access to PostgreSQL servers.

Perfect - PostgreSQL Connector This project provides a Swift wrapper around the libpq client library, enabling access to PostgreSQL servers. This pack

Jan 29, 2022
A stand-alone Swift wrapper around the MySQL client library, enabling access to MySQL servers.
A stand-alone Swift wrapper around the MySQL client library, enabling access to MySQL servers.

Perfect - MySQL Connector This project provides a Swift wrapper around the MySQL client library, enabling access to MySQL database servers. This packa

May 21, 2022
A stand-alone Swift wrapper around the libpq client library, enabling access to PostgreSQL servers.
A stand-alone Swift wrapper around the libpq client library, enabling access to PostgreSQL servers.

Perfect - PostgreSQL Connector This project provides a Swift wrapper around the libpq client library, enabling access to PostgreSQL servers. This pack

Jan 29, 2022