Sunday, February 8, 2009
Project Update for week of 2/8
This week I am tasked with completing the database upgrade as well as finally installing the phPhoneHome app so I can test the iPhone communications with our database server. Dr. KR also wanted me to develop a simple iPhone application that makes use of the UI for the iPhone and does some simple functions such as selecting polygons in OpenGL.
In order to do this I need to break apart the code that I currently have that is running the sample OpenGL app and make it render something related to the project. I am sure that I will have to enlist the help of Jianfei and maybe some other people to do this since I am not very good at programming in Objective C or using X-Code. I will try to blog my progress as the week goes on.
Thursday, February 5, 2009
Updated and geo-referenced new CAD files...
These new building files will allow us to set up "urban cluster" scenarios and enable us to start testing our program on different shapes and sizes of building. As well as having new building files, hopefully by the end of the day we will also have a new database server up and running so we can access everything we need.
Here is the latest screenshot from the new geo-referenced CAD files that I have just fixed:
Thursday, January 29, 2009
Implemented PgPhoneHome Web app
Below are a few screenshots of it running in the iPhone simulator on the Mac in the demo lab:



Installation of Postgresql Plus on Windows
http://www.enterprisedb.com/learning/getting_started.do
This also includes the documentation for installing the server with Apache/PHP support for web applications.
Saturday, January 24, 2009
FeatureServer and OpenLayers information
This software also is able to use a PostGIS as it's storage and information mechanism. In addition to this, there are several options for input/output:
- GeoJSON -- input and output in the emerging GeoJSON specification. FeatureServer supports GeoJSON Points, Lines, and Polygons with Rings, as both input and output.
- GeoRSS Atom (Simple) -- input and output of Points/Lines/Polygons (no rings/holes) in GeoRSS Simple (Atom). This allows one to take any GeoRSS Simple Atom feed and feed it to FeatureServer for storage.
- KML -- Input and output of Points, Lines, and Polygons from KML.
- GML/WFS -- Output-only support of WFS/GML.
- HTML -- Output-only support of features as HTML files, powered by Cheetah templates.
- OSM -- Output-only support of features as OpenStreetMap '.osm' files. (These files can be opened using JOSM and posted to the OSM server.)
As soon as I am able to get a test machine up and running with the new version of Postgresql I will be able to install these things and test them out. Then we can begin developing methods to transfer this information over to a format that will be displayed properly on an iPhone.
The image below shows the framework of the featureserver and the many storage and input/output options:
Project Progress update 1/24/2009
The current building files are now located in our GIS database as spatial data files that have been converted from shapefiles. They are now in the proper format to be read by Jianfei's automated centerline program to make paths inside the building.
Other things that have been done are: setting up and test the new version of Postgresql on my Windows box. This has allowed me to install the pgPhoneHome iPhone web application that will allow us to mainipulate our database from the iPhone. This will hopefully provide a first step in our mobile application.
I have also come across a useful project called FeatureServer. It is basically a implementation of a RESTful Geographic Information feature service. I will be posting more information about this service and all of the details in a later blog post.
Centerline Extraction for Convex Polygons
From email from Jianfei Liu on January 21st, 2009:
I extracted centerlines from convex polygons this week. Snapshots are some results. For the concave polygon, it just needs a little extension to my existing framework. The current framework can handle certain concave cases except for one situation I neglected. I decided to design a more robust evaluation model to determine the polygon's type. In the results, the sphere means the vanishing point and the centerline is represented as the yellow line. In certain cases, the centerline is just one point.
Below are the snapshots from the centerline extraction from the above email:


Friday, January 16, 2009
Implementation of phPhoneHome for remote iPhone connections
The program is installed as part of stackbuilder on the Enterprise DB installation, which is located at: http://www.enterprisedb.com/begin-download.do?redirectReason=startDownload . The application isn't really an application in essence, but a way to format the administrative tools for use on the iPhone.
The program was created by Dave Page who has an interesting and useful blog at: http://pgsnake.blogspot.com/ . Dave works for EnterpriseDB and developed the Iphone application that I will be using. His blog is a useful source of information for Postgresql information that I hope to use more of in the future.
Currently I am trying to get the server running on my Windows box since I have to get Scott Wood to do the install on our main DB server. At the moment, things don't seem to be working correctly and my server isn't recieving incoming connection on TCP/IP. Once i have this problem resolved I should be able to load the iPhone interface and try to test sending quieries and updates via SQL to the server.
Below are some screenshots that show how pgPhoneHome looks and works:

Thursday, January 8, 2009
Using JSON for data transfer
The idea behind this is to have something that is easy to use and supported from multiple languages. As soon as I am able to build and test code, I will try to implement some of these programs to see if I can recieve data from the database. This method can also be used to send data I believe, which will prove to be very usefull in the future.
Saturday, December 27, 2008
Iphone application development
I have found some great resources related to these problems and some sample code that should be of great use to us. Below are some links that I am posting as a reference later on when I will actually implement the program on the mobile device.
/* This link is sample code for GLSprite. The GLSprite sample application shows how to create a texture from an image. By looking at the code, you can learn how to use Core Graphics to create a bitmap context and draw an image into the context. You can then see how to use OpenGL ES to create a texture from the image data.
This application is built on the Cocoa Touch OpenGL Application template. Instead of using GL_COLOR_ARRAY as provided in the template, GLSprite renders a texture. The textured sprite in the application rotates using the timer that's provided with the template. */
http://developer.apple.com/iphone/library/samplecode/GLSprite/index.html
/* XMLPerformance -- This sample explores two approaches to parsing XML, focusing on performance with respect to speed, memory footprint, and user experience. The XML data used is the current "Top 300" songs from the iTunes store. The data itself is not particularly important to the sample - it was chosen because of its simplicity, availability, and because the size (approximately 850KB) is sufficient to demonstrate the performance issues central to the sample.
This could be very useful if we can find a way to export the database in a XML format which would be easy to transfer, as well as being less data intensive and non-chatty */
http://developer.apple.com/iphone/library/samplecode/XMLPerformance/index.html
/* LocateMe -- Shows how to use the CLLocationManager class to determine the user's current location. It demonstrates starting and stopping updates, error handling, and changing location parameters.
This can be used to determine a users location that will enable us to provide location based content for the user. Can also be used for tracking users and other possible applications. */
http://developer.apple.com/iphone/library/samplecode/LocateMe/index.html
/*UICatalog -- This sample is a catalog of all the UI elements found in the iPhone's UIKit framework. It is designed to exhibit a large variety of views and controls along with all their varying properties and styles. If you need code to create specific UI controls or views, refer to this sample and it should give you a good head start in building your user interface. In most cases you can simply copy and paste the code snippets you need. */
http://developer.apple.com/iphone/library/samplecode/UICatalog/index.html
/*SeismicXML -- The SeismicXML sample application demonstrates how to use NSXMLParser to parse XML documents. When you launch the application it fetches and parses an RSS feed from the USGS that provides data on recent earthquakes around the world. It displays the location, date, and magnitude of each earthquake, along with a color-coded graphic that indicates the severity of the earthquake. */
http://developer.apple.com/iphone/library/samplecode/SeismicXML/index.html
There are also many other sample apps available that should prove very useful in the development of the NIJ mobile device implementation. These other sample source code and program can be found at:
http://developer.apple.com/iphone/library/navigation/SampleCode.html



