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

Related tags

Maps CampusAtlas
Overview

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.

You might also like...
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

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

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

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

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

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

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

Provides API access to localized musical instruments and their tunings.

instruments.fyi instruments.fyi provides API access to localized musical instruments and their tunings provided by InstrumentKit. Table of Contents Wo

Provides type-safe access to localized musical instruments and their tunings.

InstrumentKit InstrumentKit provides type-safe access to localized musical instruments and their tunings. Table of Contents Work In Progress Installat

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

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

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'

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.

Project Based IOS/Swift study_fast campus lecture
Project Based IOS/Swift study_fast campus lecture

Project Based IOS/Swift study_fast campus lecture

SSLineChart provides you with the additional functionality of gradient color fill which cannot be found in any library specially Watchkit Libraries.
SSLineChart provides you with the additional functionality of gradient color fill which cannot be found in any library specially Watchkit Libraries.

SSLineChart SSLineChart draws a UIImage of a chart with given values and provide additional functionality of gradient color fill. Setup Instructions C

Swift Featured Projects in brain Mapping
Swift Featured Projects in brain Mapping

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

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

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

Owner
Larry Tseng
UMass Amherst undergrad interested in iOS apps, robotics, and entrepreneurship. Pursuing a BS in Computer Science and a BBA in Management.
Larry Tseng
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

Lasha Efremidze 1.2k Dec 25, 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. Installation Cocoapods pod 'JDSWiftHeatMap' Usage JDSwi

郭介騵 135 Dec 26, 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

Muhammad Abdul Subhan 48 Aug 13, 2022
Allows you to use custom maps in iphone applications and attempts to mimics some of the behaviour of the MapKit framework

NAMapKit Lets you drop pins or custom annotations onto a standard UIImage or a tiled NATiledImageView. Includes callouts, multi-colored pins, animatio

Neil Ang 263 Jun 29, 2022
An Xcode Source Editor Extension that helps navigating to many places easier

XcodeWay ❤️ Support my apps ❤️ Push Hero - pure Swift native macOS application to test push notifications PastePal - Pasteboard, note and shortcut man

Khoa 543 Dec 1, 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.

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

null 0 Oct 14, 2022
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

PerfectlySoft Inc. 54 Jul 9, 2022
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

PerfectlySoft Inc. 119 Dec 16, 2022
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

PerfectlySoft Inc. 51 Nov 19, 2022