Sunday, August 22, 2010
WorldWind - WMS Authentication Support
Unfortunately I don't have a WMS server with authentication to test his fix against. I did some basic regression testing and existing WMS functionality seems to work fine. From reviewing the code nothing appeared to be harmful and it made sense, though he added no commenting for any of the changes. I asked the user to provide more code comments as well as to finish an enhancement he was apparently making to the WMS browser for username and password fields in the browser GUI.
Forum discussion
You can get the source and see it in action from my SVN branch:
https://nasa-exp.svn.sourceforge.net/svnroot/nasa-exp/branches/ammianus
I will hold off on commiting his changes to the World Wind trunk until he responds to my questions and maybe finishes his work on the WMS Browser.
I have to say, this is probably my last contribution to the WW.NET project for now. I think it has run its course and led to a dead end, technically and in terms of a learning experience. I have begun new projects to learn more about coding in GNU/Linux and as a result want to focus my efforts towards Real-Time and Embedded system development. I have to thank the World Wind project both as a learning exercise and for the fact it did get me a job interview for a GIS programming position, and it was the first true Open Source project I made contributions to. Here's to many more.
Tuesday, August 17, 2010
Redwoods - Day 32
In general we water about twice a week, and spray the leaves and branches around every other day. The only windows in the room face east, so they get a lot of direct sun in the morning, and indirect the rest of the day. We've used some Miracle-Gro Liquid Houseplant Food, which we use for all our other house plants. In both cases starting from the bottom of the stem and growing up, the stem is turning a reddish-brown color with what seems to be the start of the redwood bark in what will be the trunk. It is only about the first 4-5 inches and after that the rest of the stem is still green like a plant's.
Specimen J2 is growing a bit fuller and maybe slightly taller. It grew a second set of branches radiating from the crown.
Specimen B2 is a little slower growing. Early on it had some "burning" of needles on some lower branches, possibly due to too much direct sunlight or under-watering. It seems to have recovered slowly but now is growing taller with more branches off the main stem.
Saturday, August 7, 2010
Ubuntu Remote Desktop
After speaking to a co-worker I found out that Ubuntu has a remote desktop capability built in to Gnome. That was great to know, so this weekend I spent some time to set that up finally. Enabling Remote Desktop connections is as easy as going to a Preferences Control Panel, a few check boxes are you it took to set it up. See this guide for more info: Remote Access to the Ubuntu Linux Desktop.
On the Windows side, my laptop already had TightVNC client (http://www.tightvnc.com). Using the above guide it was easy to connect to the Remote Desktop on the server using the default port of 5900 and desktop of :0.
This did log me in to the Gnome desktop, and thought I could move the mouse and control the desktop through TightVNC, it would not refresh the screen in the client window. After trying out a few solutions from the Ubuntu forums that didn't work, I remembered something the same co-worker mentioned. Basically there are some issues with VNC if you have any of the desktop effects enabled.
To disable them go to:
System > Preferences > Appearence >Visual Effects
Set to "None"
Immediately this disables the "effects". The only noticeable difference is that there were some transparency effects in some of the windows, and these were turned off. This probably helps with performance in any case.This did the trick and my VNC client came back to life and started to function. Although it is a little choppy if you try to drag a window around the desktop it worked pretty well with the "High-speed Network" connection profile in TightVNC.
Update
Adobe Flash Plugin installed today randomly. All I did was go to http://www.pandora.com/ and install the plugin, worked fine, and the box has been serving its first function as a dedicated internet radio player in my living room.
Sunday, August 1, 2010
Ubuntu Experiment
To move towards that goal, I needed a Linux development system. I didn't want to dual boot one of my existing Windows machines and possibly deal with driver hell.
Got a machine the other day. Nothing cutting edge. AMD Athlon II X2 215 (Dual cores, ~2.70 GHz). 4GB Memory, 500GB hard disk, NVIDIA® GeForce® 6150 SE. Good thing is that the case has a slim profile, 10.4" H x 3.9" W x 14.6" D. I wanted something small and quiet so I could leave running as a server and work on remotely. It came with Windows 7 and the obligatory set of crappy trial software and spyware. Also bought a book for some programming practice: GNU/Linux Application Programming
I went with the Ubuntu Linux distribution. Created an installer CD with the 10.04 LTS 64 bit Server Edition.
Installing was a simple(!) process, the installation documentation on the Ubuntu site is pretty good, if verbose. No snags were hit, though because I chose the Server edition it didn't come with the Graphical Installer option, though its not like there were any shell commands you had to run during the install. Since I didn't care about the pre-installed Win 7 OS, I didn't have to bother with creating any partitions, I just overwrote the whole drive as one big Linux partition.
Once it booted up after install it came to the default shell prompt. There is no desktop in the Server edition. A quick google search gave me the command to install the Gnome desktop. This was plugged in
$ sudo apt-get install ubuntu-desktopThat probably took longer than the install itself. In any case it loaded up fine with a snappy new purple themed Ubuntu desktop. From start to end it was probably around 4 hours of time.
One odd thing is that during the server install you are prompted for what kind of "server package" you want to set up. I chose Java/Tomcat, though I may not even use it. I can find no evidence that Java was installed so I am not sure what that was supposed to do.
Startup now takes under 10 seconds I would say, it is incredibly smooth.
I tried to connect remotely from my windows PC using PuTTy, but no luck, there was no SSH listener running on the server. You have to enable it by installing the SSH packages.
$ sudo apt-get install sshThat worked and I could connect via PuTTy SSH over port 22. Trouble is you needed to connect by the IP address of the box, you apparently can't resolve the Linux server's machine name from Windows. Fine, so I had to add an entry into my Hosts file, C:\Windows\System32\Drivers\etc\hosts. Its funny that Windows to Windows doesn't require this to resolve the machine name, but Windows to Linux doesn't work. I noticed that the Linksys router administration site did recognize the Linux server's name in the DHCP Clients Table.
In any case minor issue.
The other thing I've found is that Adobe Flash plugins doesn't seem to install, I tried the .apt and the .deb versions offered by Adobe, neither worked, getting "Architecture Not Supported 'I386'" errors. Great job Linux! I would guess it may have to do with 64-bit vs 32 as I believe Flash doesn't have any native 64 bit versions, at least not on Windows.
Next step is to try to set up VNC in order to make a remote desktop connection from my laptop to the new server. We do this at work with our Linux Oracle database host, so I know it works well.
Wednesday, July 14, 2010
Redwoods - Day 1
The two seedlings arrived in the mail today from a grower in Michigan. Found them on eBay for about $4 each. They were packed in a cardboard box with shredded newspapers to keep them protected and wet?. They apparently are in good health after that trip. My uneducated guess, from reading about growing these online, these two are probably several months old at least.
Specimen B2
Approximately 9" tall

Specimen J2
Approximately 10" tall

I have been using a number of resources online for tips on growing redwoods. We'll see how they do and I'll continue to post updates here to track their progress.
http://www.virtualsecrets.com/redwood_and_pines.html
http://www.redwoodworld.co.uk/faqs.htm
http://www.ehow.com/how_4421951_plant-grow-redwood-seedling.html
Sunday, June 27, 2010
GeoDjango review - part 2
Following this installation guide I went about creating my own GeoDjango stack locally.
My stack included the following components:
- Windows Vista Home Premium x64
- Python 2.6.2
- PostgreSQL 8.3.11-1 (PostGIS not available for 8.4 yet[1])
- PostGIS 1.3.6
- psycopg2-2.0.10.win32
- GeoDjango installer[2] (for windows , bundles together Django 1.1, GDAL 1.6.0, PROJ 4.6.1 and the GeoDjango components)
Following installing the software I went through the basic GeoDjango tutorial to load the a sample "World Borders" shape file data set to PostGIS and create necessary models in the Django db.
Following these steps worked perfectly for me, there is nothing I can really add. I would say that one feature that is missing from the tutorials, sample projects online and I would daresay, geodjango itself is a default viewer for viewing your entire layer set on one map. I couldn't find any such advice on taking this to the next step and it was not included in their default admin site, you can only view the world border records one at a time on individual screens.
To get a better sense of the Django framework's features I went through some of those "Hello World" style examples to build some basic templates and views with their framework, which I have to say being new to Python and modern webframeworks in general was quite easy.
Essentially I went through chapters 1 - 4 of the online The Django Book in an afternoon.
GeoDjango review
Recently I was asked to present my evaluation of a geospatial web framework called GeoDjango. This was in the context of a job interview with a center for geographical analysis at a local university.
I had to come up with a presentation based on benefits or features relative to a proposed system that the center wanted to develop for allowing users(researchers presumeably) to upload and manage map related data for geospatial analysis. Not knowing anything about GeoDjango or much about the whole geospatial research domain outside of my limited WorldWind exposure this was quite a test. As part of this presentation and my own attempt to show my skills for the interview, I set up a demo installing GeoDjango locally following some basic tutorials. The following is a summary of my analysis taken from my presentation.
GeoDjango - Summary
• Built as extension to the Django web framework written in Python.
• Open Source
• Includes related Geospatial Python libraries: GDAL/OGR(subset of full GDAL features, vector only), GEOS (geometry operations), PROJ.4(map coordinate projections)
• Support for spatial databases, PostGIS, Oracle, MySQL, etc…
• Extends Django Admin Site for directly editing models
• Built in cmd-line utilities for importing data into your database
GeoDjango – Some Useful Features
Based on the requirements I was given I took a look at the various features you get out of the box by using this framework over any of the other general frameworks of which there countless numbers these days or other “similar” products written in Java, Ruby, etc.
You do get some useful features, mostly the big draw that Django provides is it’s default CRUD administration interface where you can directly modify database records or just view them. In addition to CRUD representation for your “Models” (essentially a Model is the Django representation of a db table), you get a user admin interface for adding/updating user accounts as well as groups of users. The Django framework includes a basic permission model, where you can assign users or groups to the pre-defined permissions. The permissions allow you to grant users the ability to add records, update records or delete records. These permissions are enforced by the admin UI, though you would have the methods to check user’s permissions when creating your own UI pages. One missing privilege in my opinion is a “view” permission.
Beyond the front end the Django model provides various libraries set up for some common features of any web framework such as user authentication, a comment framework with automated moderation. On the geospatial side there seems to be the useful inclusion of the various geospatial libraries. What seems to be useful, not being an expert, were the inclusion of libraries for simplifying queries to the spatial database, supposedly no SQL required. There is also good support for conversion of your spatial data into various output formats such as the GML or KML formats.
Analysis of GeoDjango supporting requirements
These were some of the requirements the center had, and my evaluation of them.
User to upload spatial data (Shape, GeoTiff at a minimum)
• Shape Files
▫ Possible, Python utilities exist for importing Shape files
▫ Different Shape file attributes require coding Python models
• Geotiff
▫ Raster formats are not supported in GeoDjango
▫ Possible other 3rd party libraries could be leveraged (WKTRaster for PostGIS)
User to control visibility of data (who can see my data, public, private, shared)
• Django administration UI allows configuring permissions for user access to a Model type, but not by “owner” or “creator” of instances of Models.
• Only administrators have ability to add or remove permissions from other users. No way to specify which permissions they could grant or take away.
• Would require some extension of Django security model to provide this feature as well as change to UI screens.
User to control access to who can interact with their data
• Can restrict who could see or edit through the admin UI by Models but not by a user’s own content.
• Permissions not granular enough for mark-up / edit distinction in admin screen.
• Would require extension of security model and rework of current admin UI.
Conclusion
• Some of the central requirements are not available in GeoDjango off the shelf.
• Implementing the required features could still be done in GeoDjango framework.
• Most useful features of GeoDjango seem to be on server-side relating to interacting with the geospatial data.
• Django itself provides useful framework for dynamic website creation.
References
Couldn’t possibly list every site I visited to find all this data, and some of it came from my own observations. Here are few useful sites for more information
· http://geodjango.org/presentations/
· http://groups.google.com/group/geodjango
· http://docs.djangoproject.com/en/1.2/ref/contrib/gis/install/#windows-xp
· http://www.ohloh.net/p/geodjango
· A day with GeoDjango - Thinking in GIS
· http://www.geowebguru.com/articles/99-overview-geodjango
