Wednesday, December 3, 2008

iPhone app implementation

I have been trying to find the best way to implement our application on the iPhone and I have run into a few problems and a variety of different solutions. The main problem with connecting to the database server can be solved by installed an app already written for the iPhone, Mobile Can 2.0. Another option is to install an SSH client to make the connection, and there and several of those are available: iSSH, pTerm, and TouchTerm. Each of these programs are available from the App store for a fee. One large problem arises with using these is that only one application can run at a time on the iPhone unless special software is installed to allow this which requires you to "jailbreak" the iPhone in order to install this app which makes changes to a critical config file. This would not let me take advantage of this software and allow me to "listen" to the outputs of these programs in an external program.

Since this seems to not be a very viable solution, I have trying to find other methods for obtaining data remotely from our database. Another option that I have discovered is a program called phpPgAdmin which is a web based postgresql database administration tool. This would essentially make the database available for updates and modifications just by visiting a web address. This would be much easier to use in the iPhone since no other additional apps would be required to install, and updates (for example blocking a hallway) could be executed by constructing SQL queries and sending them through the iPhone's web interface to the database server. However, this would require that the database server also be a web server with PHP enabled. This means that we would have to get Scott to install the software, as well as enable Apache and PHP for CCID147.

The great thing about using the phpPgAdmin web interface is that any mobile device with access to the internet can make updates to the database, not just the iPhone. This means that any program we write for the iPhone can be ported to another mobile OS (ie. Windows Mobile 6, Android) relatively easy without having to use proprietary iPhone software.

If this is not possible there are other routes that we can take such as creating a REST API to send/receive data. This would also allow for interoperability across multiple platforms other than the iPhone.

I am awaiting an email on whether to proceed with the phpPgAdmin installation.


Iphone Programming resources

I have been tasked with creating an extension of our program to be used on the iPhone. I have looking around the web for tutorials and explanations on how to program using Cocoa Touch, Objective-C, and other tools. Here are some useful websites that I have discovered related to these topics:

CS193P - Stanford iPhone programming class lecture notes and other information
http://www.stanford.edu/class/cs193p/cgi-bin/index.php

iPhone development blog (3rdparty)
http://icodeblog.com/

Apple iPhone Dev Center
http://developer.apple.com/iphone/

Getting started video
http://www.wonderhowto.com/how-to/video/how-to-get-started-with-iphone-programming-in-cocoa-184437/


Friday, November 14, 2008

Updates to CAD_database

After I uploaded an erroneous table to the database, It was necessary to delete the whole thing and start over again. Today I reuploaded all the previous files that were in the database with a few new additions.

These new additions included the woodward_rooms files that I have created. These files are simply the RM$ layer or the CAD files and refer only to the room polygons. I have also put in two files called Woodward_test* to the database. These will be used for testing the automation process with Jianfei's program. I will begin putting more of these in with varying degrees of complexity so as to test how his program interprets these files.

Thursday, November 13, 2008

New buildings coming soon

I have put in a request with Fred Brillante from Facilities Management to get more CAD data files. I have requested that we receive preferably the SAC, Cone Center, College of Health and Human Services, and the College of Education.

The main idea with this is to create a "urban cluster" that will be similar to the type of data we will be working with in an actual urban environment. When this data is incorporated we will most likely begin testing out the automation portion of this project to see how effective our techniques are in setting up this type of data. We can then also begin testing various scenarios related to urban clusters and emergency management.

Tuesday, November 4, 2008

New database and files for automation process

I have created a new database entitled "CAD_database" which I will be using to put CAD shapefile in a PostGIS database. The purpose of this database is to hold all of the data that will be nessessary in order to automate the room number/name and type assignments.

Currently, I have the raw converted shapefiles in there along with a generalized version of the Cameron buildings polygon file. I have deleted all unessessary polygons from the file (called: cri_rooms*) and it only contains the room geometry.

I hope to use the original shapefile to further divide the polygons into several groups of files that will be used to relate room numbers to polygons in the table. There are several ways to achieve this, however, I must see what Jianfei wants to do in order to cater to his needs. Since each building, and sometimes floor, have different labels and layers this may be a hard process to accomplish.

Friday, October 31, 2008

Geo-referenced Raw CAD Shapefiles

Today I have been using the spatial adjustment tool in ArcGIS to geo-reference the CAD shapefiles I created. We have been moving towards using these in a effort to save time and set up the data so that automated creation of our other data can begin.

Currently, I have CRI and Woodward Hall CAD shapefiles correctly geo-referenced using the Mecklenburg County building footprint file as my building reference. This process only takes about 20 minutes per building, and is much faster than the previous method of copy and pasting the CAD polygons directly into our geo-database.

I have noticed some descrepincies in the types of CAD files from building to building. In the CRI files, the room numbers are actually contained in the polygon, point, and annotation layers of the CAD shapefiles. From what I have noticed, the Woodward Hall CAD shapefiles do not have this type of information anywhere other than the annotations made on the original CAD files. This will definently be a problem in the future, especially if we find that most building exclude this information from the CAD files.

I am now working on getting the Atkins library files geo-referenced and should be done with that by the end of the day.

Friday, October 24, 2008

Today's Progress 10/23

I finally got an email back from Kurt Olmsted about the data I had requested in his department. The Mecklenburg GIS team now has the 911 data and the master address data, and today I got access to their database of information.

This should prove useful, especially if the scope of the project increases in the future. I also have building footprint data for the entire county that I will be able to use as contour layers for buildings.

We have also been working on this automation problem. Jianfei and myself are currently working to come up with a solution. I am strictly using GIS while he is using analytical tools in a program that he is writing. I am hoping that we can come up with a solution to fix these time consuming issues.

Thursday, October 23, 2008

Todays Progress 10/23

Today I have been separating the Atkins library files into their specific classes. I now have for each floor a poly, stairway, and elevator file that has been separated into their specific classes.

For the time being I am not going to manually add room numbers. This is because we are coming up with a new method to assign this type of data that will hopefully make the process much easier and automated.

For next week I hope to incorporate this automation so that we can have a complete set of files for Atkins Library.

Wednesday, October 22, 2008

Today's Progress

Today I updated COITVISCENTER.uncc.edu, which is serving as our backup database with all of the new shapefiles, and geodatabase files. I need to start archiving things on a regular weekly basis now that we have much more data to store and handle. It would be critical if anything was lost on the local machine, which is where the majority of the source data is at.

Another thing I did today was email Kurt Olmstead, who is the directory of Mecklenburg County GIS services. I asked him for some help with this research project and if he could provide any relevent data for us. I met him earlier this week when he gave a presentation to our class and let me know that his department is now over theE-911 and MAT data for the county.

I am still awaiting an email back, but hopefully something good will come of this.

New effects and changes to NIJ Analysis program

Jianfei has made several changes to the NIJ Analysis program. One thing that has been added is a indicator of a fire by displaying animated smoke. Later on we are hoping to have thematic additions for chemical spills, floods etc. A screenshot of this smoke effect is displayed below.


Another addition that has been made is an airplane that can be dragged around the map to see the contents of a specific building. This will allow you to see the detailed view of the building by simply putting the airplanes light beam on the specified building. Later we hope to add more effects such as placemarks and possibly terrain. A screenshot of the airplane effect is displayed below: