Adventures in GIS

Getting Started with GeoDjango …

December 31, 2009 · Leave a Comment

The only reason for my dabblings with Django has been that I wanted to see Geodjango in action. Most of my dabbling has been with Django under Ubuntu using Ayman Hourieh’s “Website Development with Django…” and “Python Web Development with Django” – both of which I’ve found rather useless books – and more successfully using the Apress titles “The Definitive Guide to Django” and “ Practical Django Projects“. In my opinion, the former two titles take a very convoluted approach to explaining the MVC architecture, which is done in a more friendly approach by the Apress authors. I am not a web developer. I am interested in GIS.

More recently, I installed Django on Windows to get things down (I simply spend more time with Windows, like it or not). A good step-by-step guide was this one by John P. Mulligan. What follows is a list of steps taken by me, with a few additional download links. It’s somewhat redundant in light of the previous good work by Mulligan. It’s more of personal recap for myself to keep track of steps taken.

1) I downloaded and installed PostgreSQL8.4 from EnterpriseDB.

2) Then I installed win-psycopg.

3) Then I installed Tortoise SVN.

4) Then I SVN to check out the latest Django revision.

5) Finally, I added Apache2 and mod_python.

The only problem I encountered was with getting Django to work with Vista, quoting:

If you get Type 'django-admin.py help' for usage. when trying to run django-admin.py startproject mysite, the cause of the problem is that only the first argument (startproject) gets transferred to django-admin.py. This seems to be a Vista feature, and furthermore, Vista itself has no tools to fix the situation.

However, there was help here, and it seemed to help.

But when I started looking at the Geodjango installation guide under Windows, I realized that I should’ve installed Postgres8.3 instead of 8.4 because of compatibility with PostGIS. Undoing this caused me all kinds of troubles with Stackbuilder, once I wanted to add PostGIS. There is some help here. I finally installed version 8.3 in a different directory and ignored the last error with creating a template PostGIS database… This is where I left off and hopefully it will work now.

Oh, and I just found another, similar step-by-step here.

→ Leave a CommentCategories: Uncategorized
Tagged:

ESRI EDN License

December 29, 2009 · 1 Comment

Nearly 2 months since my last post. That’s what field work and travel can do to you. But I’m getting back to GIS.

I have taken the plunge and coughed up the $$$ for an annual ESRI EDN License. Hopefully I will get my money’s worth in terms of training and experience.

I am not quite sure how I will get ArcGIS Server to run without a server running Windows Server or Red Hat Enterprise. But some people have gotten ArcGIS Server to run on Ubuntu Server which I installed recently to try out Mapserver. Also, I’ve learned that CentOS is basically a free version of Red Hat Linux, and you can get the equivalent of Red Hat Enterprise 5.4 here.

So wish me luck with my upcoming END adventures. :-)

→ 1 CommentCategories: Uncategorized
Tagged: , , ,

ArcGIS Jungle of Programming Languages

November 2, 2009 · 2 Comments

It occurred to me (stroke of genius!) while fiddling with some VB Script code for labeling expressions in ArcMap last week that ArcGIS asks a lot of you in terms of programming languages. Visual Basic for customizing the software, Python for geoprocessing, VBScript or JavaScript for tweaking like labeling… wouldn’t it be nice if you only needed one language ?! I haven’t spent any time reviewing what’s under the hood of ArcGIS 9.4. Maybe more potential for Python? I think there was some talk of more functionality working in Python with layers. We’ll see.

On a related matter, I am faced with the same confusion when it comes to Web GIS. Which platform for web development is the one I should choose? So I enjoyed today’s email from geospatialtraining.com that asked readers to participate in a survey on this matter. Looking at survey results, the three front runners are Google Open Layers, Maps API, and Mapserver. So my recent efforts with Mapserver may not have been in vain. Amazingly, Geodjango garnered an astonishing 5% !

Over all, I want to stick with Python and hope that eventually it will become the tool to do it all. I ordered a book on Iron Python the other day and then actually saw post on James Fee’s blog about Iron Python & ArcGIS. I would love to see Python turn into the ultimate super-glue language that connects ArcGIS with the Open Source realm.

→ 2 CommentsCategories: Uncategorized
Tagged: , , , , ,

Mapserver Experiment – Unlimited (Headaches)

October 30, 2009 · 1 Comment

So I wanted to explore Mapserver ! – Having recently installed Ubuntu Server 9.04 on one of my machines, I thought it would be the perfect home for the Mapserver Experiment.

It didn’t take long to come up with seemingly perfect instructions from Paolo Corti. He and his blog have been very helpful in the past. But after probably 10 hours or so over the course of a couple of weeks, I’m at the point again where I wonder if I will ever turn into a Linuxionado. While my Django adventures have been more fruitful under Ubuntu, the Mapserver adventure has been a nightmare. The silver lining being that I am getting really good working with Linux. (Even though I don’t seem to get a lot done.) But I am beginning to feel rather at home in Linux, with its file system, permissions, conf files, wget, lynx, vim, sudo… etc.

After successfully downloading and installing Mapserver, and configuring mapserv and apache multiple times, the project always collapsed when I tried setting up the Mapserver-Demo (Itasca files). I could never get past the mapserver welcoming screen. As soon as I hit “Initialize”, the program terminated and gave me a:

loadWeb(): Unknown identifier. Parsing error near (C):(line 1) – If you have a simple answer for this problem (other than my own solution below, please let me know.

There is still, of course, an undeniable chance for human error on my part. For example, I was getting confused whether the root in Mapserver-Demo’s index.html should be the same as the Document Root in /etc/apache2/sites-available/default. But I think I’ve tried every possible combination of referencing directories here. Finally I gave up when I read that the problem may be with using the Demo (the link I had found on Corti’s page) with Mapserver 5.0 instead of 4.x.

Looks like I will have to try the 5.4 demo after upgrading to Mapserver 5.4. I’ve installed the most recent stable version of Mapserver from Ubuntu-GIS and I will try again. If this fails, I will have to either try Bill Kropla’s setp-by-step-building-from-source instructions, certainly even more error prone that what I have been trying to do. I was hoping to get around that and jump ahead to later chapters in the book once everything’s up and running. Or, alternatively, and this pains me greatly, I will have to check out MS4w. Yikes !

→ 1 CommentCategories: Uncategorized
Tagged: , , ,

Old Laptop Fixer-Upper

October 15, 2009 · Leave a Comment

In the process of trying to set up an old hand-me-down laptop – DELL 433C (A.D.1994) – with Damn Small Linux, I came across this Infoworld review (archived by Google).

This machine had: a 33MHz 486processor, 4MB RAM, and a 170MB hard drive, and retailed for only: $2699.00 – Wow!

In fact, I haven’t figured out exactly how to get the new OS installed (to replace Win95). There is no CD drive, and no network card. So it’s booting off and installing from a 3.5″ floppy. I’ve had a hard time finding a functional floppy drive around the office to write a boot disk. Looks like I will have to start with http://www.toms.net/rb/. Wish me luck.

UPDATE: 10/16/2009

Mission accomplished. I have a Linux version running that booted off a single 3.5″ floppy. The hardest part was getting the 1.7MB file (tomsrtbt-2.0.103.dos.zip) on a floppy. This entailed tracking down a functioning drive connected to a functioning computer. Then rather than playing fdformat to create a 1.7MB disc, I had to find a Win95 and WinXP compatible (16bit) file splitting utility (only succes was JSPlit.exe, 168KB) that would create files smaller than 1.44MB in WinXP, copy them to Win95, join the files under DOS and start the *.bat to create a 1.7MB Linux img file that’s written back to the floppy and then booted - or something like that…

→ Leave a CommentCategories: Uncategorized
Tagged: , , , ,

Getting Server Savvy – Ubuntu Server 9.04

October 12, 2009 · Leave a Comment

After a recent computer meltdown at our office, I was quick to claim the discarded desktop unit for my own purposes. Yes, it had been declared trash. But all I had to do was hook the HD up to my own computer as a slave, and format it. Then I popped it back into the old computer (A Compaq Presario, dated approx. 2004, with Pentium Celeron 2.8GHz, 120BG… you get the picture – 2004 hardware, and formatted the drive. That simple.

Now, I ‘ve installed Ubuntu Server 9.04, and it’s running like a charm. I’ve always thought it would be nice and handy to learn a little more about running (maintainenance/admin) a server. I will probably experiment with Geoserver and/or Mapserver – ideas I got the other day whilereading in GIS for Web Developers: Adding ‘Where’ to Your Web Applications, and if it’s true that I can get ArcGIS Server to run on Ubuntu, then I will try that once (if) I get my EDN package. Of course, the first thing I was wishing for when starting the server was a GUI. Need to get friendly w/ the command line to call myself a real Linux geek.

→ Leave a CommentCategories: Uncategorized

TNRIS Texas GIS Forum 2009

October 9, 2009 · 1 Comment

tnris_gisWed and Thur of this week, I attended the Texas GIS Forum, organized by TNRIS in Austin, Texas. It turned out to be a good introduction to what’s going on in GIS in Texas although, overall, I was expecting more of a focus on the GIS software side. Many of the presentations and most of the vendors were about remote sensing technology and services. LIDAR was the buzz word. Granted, it’s an amazing technology, with unbelievable resolution and versatile applications that will put many surveyors out of work. But I don’t think only of LIDAR when I think of GIS.

Highlight for me was an hour-long presentation by Dylan Lorimer, Product Manager @ Google Enterprise Geospatial. While there are many other GIS software and service providers with decades of experience, Google hasn’t been in it for that long. But while the others are busy coming up with new bells and whistles, add-ons, and knick-knacks, Google seems to be the one player with the vision, (however hazy or much of a stretch it may appear to be sometimes) – which I interpret to be: Make all human knowledge and information publically accessible for anyone on the planet (with internet access). Wow !

What did I learn ? Mostly that I have lots of things to learn. That there are so many different GIS technology tracks out there that I need to spend some time thinking about which ones I want to explore. For example, while I have heard people talk about Python and VB, and more recently .NET for ArcGIS, this week all I heard was Flex and Silverlight. Needless to say I know nothing about either one.

I also attended a Microsoft presentation on SQL Server Spatial. But I couldn’t figure out for the life of it why anyone would want to go with that product for their geospatial data needs. So I’m inclined to stay away from Microsoft products including Silverlight. I might take a look at Flex and revisit my earlier Web experiments.

Most of all, I like the idea of sticking with Python, learning Django as my web framework and Geodjango (I keep repeating myself) - someone will make this work for ArcGIS – and stay in the Open Source Realm. I still think that eventually, the future will be open source, and while open source evolves, other proprietary software goes in and out of style. It makes little sense to spend too much time “learning” one company’s software. Having said that I will look at getting an ESRI EDN license to “learn” their stuff. ;-)

→ 1 CommentCategories: Uncategorized
Tagged:

Suggestions for GIS Career & Credentials

September 18, 2009 · 1 Comment

Yesterday, I had an informational lunch with a GIS professional with significantly more experience than myself. My main questions were 1) how best to market my GIS skills, 2) how do I convince a potential employer that I can solve GIS problems, and 3) what essential GIS weapons should I add to my arsenal because they are most marketable and will get me the farthest.

Essentially, I came away from our talk thinking that my background as a geologist is an asset, and that I should focus on my programming skills, e.g. adding some Visual Basic to my Python (I’ve shied away from it because what little exposure I had to VB wasn’t pleasant), and – to my great relief !- that I should try to demonstrate analytical/scientific understanding rather than inside-out know-how of software. Also, I’m still considering obtaining a GIS Certificate.

expaoOh, and here the latest addition to my GIS library.

Exploring ArcObjects: Vol. 1 – 1356 pages !!!

→ 1 CommentCategories: Uncategorized
Tagged: , , , , ,

GISVM with Sun Virtualbox

September 18, 2009 · Leave a Comment

A while back, I made a post about difficulties with the installation of various GIS open source programs under Ubuntu Linux. One helpful response came from Samuel, who suggested running GISVM to make installation easier. (You should know that I’m only a casual Linux user, getting better and more confident all the time.)

I just installed GISVM (more or less successfully) using Sun’s Virtualbox. I now have a Ubuntu Linux host with a Ubuntu Linux Guest that includes PostgreSQL, PostGIS, GeoServer, Mapserver, FWTools, QGIS, GRASS, gvSIG, uDIG, Kosmo and OpenJump. There are a few jinxes to be ironted out – PostgreSQL didn’t install properly, and the display of my guest window is screwed up, which might have something to do with 16/32 bit issues.

The two things that took me a few moments to figure out was 1) how to get Virtualbox to boot from the proper VMDK file (I solved this by using the Media Manager in Virtualbox to select the VDMK file, declaring it as Master IDE drive and putting it at the top of the boot list) and 2) how to keep the start up of the virtual machine from aborting (Cruising the forums, I found that most likely there was a problem with the Host boot manager (GRUB), and I installed a different version BOOT-PC.) It was that easy.

Now, I have no idea what I’m going to do with the new software. But it’s nice to know I got it running.

→ Leave a CommentCategories: Uncategorized
Tagged: , , ,

Arduino & GPS

September 16, 2009 · Leave a Comment

As a passionate home remodeler and tinkerer, I was thinking the other day it would be a lot of fun to begin experimenting more with electronics. I googled a little and found Arduino. It wasn’t rocket science to wonder how this kind of hardware/software tinkering might fit in with my GIS interests. In fact, when I googled “GPS+Arduino”, I came up with some interesting results, and this guy here is doing exactly THAT.

→ Leave a CommentCategories: Uncategorized