blankblank blank


Archive for September, 2008

Uploading .img Map Files to A Garmin GPS Unit With IMG2GPS

An earlier post covered MapUpload, a free program for uploading .img files to a Garmin GPS; another option for this operation is IMG2GPS. This is actually a limited front-end to the command-line program SendMap (included in the IMG2GPS install package), but it supports most of SendMap’s upload features you would normally use.

img2gps

You don’t select .img files for loading into the selection list individually; instead, you specify a folder using the “Load Folder” button, and all .img files in that folder are automatically added to the list. Selecting another folder will add those .img files, while not erasing the ones already there. To erase all the files in the list, click the “Clear” button at the bottom; this clears all the files in the list, regardless of whether they’re selected using the check box. You can save a list of selected files with the “Save” button, and load that list with the “Load” button; it also supports the .gdb format created by MapSource. Finally, you can search through the list of files for a text string in either the filename or the map name using the “Search” function at the top.

To upload one or map files to your GPS, select them with the check box, make sure your GPS unit is turned on, and click “Upload to GPS”. In “Auto” mode, the program should automatically detect a connected GPS, running through all the options (USB and all COM ports). If the program has difficulty recognizing that you have a GPS connected, you can use the “Test Connection” function at the top to help diagnose the problem; you can also manually specify the I/O port your GPS is hooked up to. You can also set a mapset name label for all the maps being uploaded by checking the box below, and entering the desired label.

Unlike MapUpload, IMG2GPS supports uploading to a data card (like a microSD card) in a card reader, which can be faster if the card reader is USB 2.0 (most Garmin GPS units are USB 1.1). Oddly, it doesn’t seem that you can do it directly using the “Folder/Card” option for I/O Port. Instead, you have to combine all of the selected maps into a single “gmapsupp.img” file, and then upload that file to the “Garmin” folder on the data card (see this post for more info on the “gmapsupp.img” file). To do this, check the box at the bottom marked “Create File instead of Upload”; this will change the button below to “Create File”. Press the button, and then select the “Garmin” folder on the data card to save the “gmapsupp.img” file in (create the folder if it’s not already there). When you put the card back into the GPS, the “gmapsupp.img” file will be recognized and read as a map file.

There’s another front-end for Sendmap called GPS Send Map, but it’s obsolete, doesn’t appear to be in development anymore, and doesn’t have the features that IMG2GPS  has.



GISVM - A Virtual Ubuntu Linux GIS Workstation

GISVM is a Ubuntu 8.04 Linux distribution packaged as a virtual machine, an OS that can be run in a window inside of another OS like Windows, Mac OS X, or even another Linux distribution. It contains a number of open-source GIS packages already installed, including:

  • uDig
  • gvSIG
  • Kosmo
  • FWTools / OpenEV
  • MapServer
  • PostGIS

It’s a big 1 GB RAR file download that decompresses into 3 GB; if you don’t have a program that handles RAR compression, try the free program 7-Zip. To run the virtual machine, you’ll need to install either the VMWare Player or VirtualBox; I’d recommend the latter since it’s been released as open source by Sun, and also doesn’t require registration for the download. Players are available for Windows XP/Vista, Mac OS X and Linux for both platforms. Since you’ll be running two operating systems simultaneously, the demands on your computer can be significant. I wouldn’t run it in less that 1 GB of RAM for Windows XP or Linux, and 1.5 GB for Vista or Mac OS X.

From VirtualBox, use the Virtual Disk Manager in the File menu to Add the decompressed vmdk file to your list of hard disks:

9-28-2008-5.28.44 PM

Then create a New Virtual Machine using Virtual Box’s wizard. Choose Ubuntu as the OS:

9-28-2008-5.27.54 PM

In subsequent dialog windows, give it as much RAM memory as you can spare, and select the vmdk hard disk image as the Existing hard drive. Once you’re done, click on the Start button and the GISVM will open up in its own window, like the one below running on my Windows Vista system:

9-28-2008-5.06.11 PM

One thing you’ll discover quickly is that as soon as you click or type anywhere in the virtual machine window, all mouse/keyboard input is confined to the virtual window, and you won’t even be able to move the mouse cursor out of that window. Pressing the right Ctrl key on your keyboard will release this control, so that you can access your regular OS with the mouse/keyboard again. The infoGISVM*.txt file in the upper corner is worth a look, since it contains basic information about the installed programs, and the basic user passwords.

On my computer system (2.4 GHz Quad Core, 3 GB of RAM, 1 GB assigned to GISVM), the virtual OS machine is very responsive, and programs open up almost as quickly as they do running natively. Here’s qQIS in the virtual machine window:

9-28-2008-5.06.44 PM

I would have liked to play around with it a bit more, but I ran into a major issue: the largest screen resolution you can get in this virtual machine is 800 x 600, and it seems to be impossible to add additional resolutions. This might be a hardware-related issue, but I don’t think so, since the screenshots on the GISVM website also appear to be in this resolution. I haven’t run in 800 x 600 in 12 years, and I’m not about to go back to that now.

I’ve run into this problem before with Ubuntu 6 and 7, where you’re limited in your selection of screen resolutions if you’re running it as a virtual machine or on a remote machine using VNC with no monitor attached. It’s pretty retarded that this is still a problem in Ubuntu 8.04, and IMO another sign that Ubuntu isn’t ready yet for real people. Don’t tell me it can be fixed in the xorg.conf file; A, it can’t (I’ve tried), and B, regular non-techie users shouldn’t have to try to sudo fix this problem in an arcane text file.

If you can live with an 800 x 600 screen resolution, and want to try out Linux apps from Windows or Mac, GISVM is worth a look. If not, I’d wait until a version comes out that supports larger virtual screen resolutions.

Addendum: See the comments section for solutions to some of these problems.



Yet Another Way To Get Position Coordinates In Google Earth

In comments on my recent post, Easy Ways To Get Latitude/Longitude For A Screen Point In Google Earth, SEWilco notes another app/link that can give you easily copyable/pastable lat/long coordinates for the screen center point. The hjl_get_Coor tool is a KMZ network link that puts a crosshair at the center of the Google Earth display; click on the crosshair, and you’ll get a balloon with the coordinates in copyable format (Degree-minute-seconds with “|” as the separator):

9-22-2008-8.37.14 PM

Coordinate formatting is a little inconvenient, but unlike the Google Earth Position app described in the earlier post, this will work on all systems, including Mac and Linux. Turn off the link when you’re not using it, to reduce load on the server feeding the network link.



World Demographic/Socioeconomic Maps From Maplecroft

The Maplecroft Maps website offers a wide variety of maps depicting a wide variety of factors (social, economic, education, environmental, etc.). The primary interface is Flash-based, with controllable legend/display, and links to additional information:

9-22-2008-8.55.04 PM

There are movies and a tutorial section that show you how to use the maps. Terms of use allow for non-commercial, personal or education use free of charge; read the full TOU for all restrictions (link at the bottom of the Maplecroft Maps home page). Additional similar maps are viewable at the associated Global Risks website (free registration required), but under a more restrictive TOU.

HT to Askan Schmeisser.



Easy Ways To Get Latitude/Longitude For A Screen Point In Google Earth

In the lower left-hand corner of Google Earth, there’s a latitude/longitude readout that shows the position at the cursor position:

9-21-2008-9.02.12 PM

But if you want to record this position, the screen readout is graphical, so you can’t copy the numbers directly from Google Earth using a copy-and-paste operation; you have to write them out manually. One way around this is to create a placemark in Google Earth, and drag it to the desired location; the latitude and longitude will show up in the placemarks properties window, from which you can copy and paste them into a different app:

9-21-2008-9.06.51 PM

Another option is to use David Tryse’s Google Earth Position application. No installation, just run the program at the same time as Google Earth:

9-21-2008-9.15.26 PM

With Auto checked, it will update the position at the center of your Google Earth display continuously; unchecked, you’ll need to click the “GetPos” button to update the position. Clicking on the various “Copy” buttons copies position data into your clipboard for pasting into various programs:

Copy LatLong: 34.756012    -111.495048

Copy LookAt: 34.756012    -111.495048    0    812729.99    0.00    -9.43

Copy LatLong KML: <coordinates>-111.495048,34.756012,0</coordinates>

Copy LookAt KML: <LookAt>
<longitude>-111.495048</longitude>
<latitude>34.756012</latitude>
<altitude>0</altitude>
<range>812729.99</range>
<tilt>0.00</tilt>
<heading>-9.43</heading>
</LookAt>

With Auto unchecked, you can also enter a position into the Latitude and Longitude boxes at the top, and “FlyTo” that position in Google Earth. The numbered boxes at the bottom can save a current location (Shift-Click on the button), fly to a saved position (click on the button), or recall a saved position without flying to it (Alt-Click).

One big problem: there’s no center cursor or marker in Google Earth to indicate the center of the screen, so finding the position of a specific location might be difficult. But here’s a simple little KMZ file that puts a crosshair overlay at the center of the Google Earth screen, getting around this problem:

9-21-2008-9.24.55 PM

David’s website has several other apps worth a look. Google Earth Photo Tag lets you use Google Earth to embed location information into JPEG pictures (note: requires the Exiv2.exe command-line program in the same directory) . While I prefer Picasa for this task, GE Photo Tag does let you modify the balloon style for KML image files, which Picasa doesn’t. LatLong Conversion converts from degrees-minutes-seconds to decimal degrees and vice-versa, supporting more formats for the input data than other similar converters.



New App For Real-Time GPS Tracking In Google Earth

In my series on getting Google Earth Plus features for free, I reviewed a number of apps that interface a GPS unit with Google Earth, plotting your current position and/or recording your track. There’s a new one out from Valery Hronusov and friends called Navigator that appears to be better than all those, but since I’m away from home, I can’t try it out yet. The feature set looks impressive:

  • Supports USB and serial connections, including Bluetooth
  • Supports simultaneous connections with multiple GPS units
  • An information screen with many useful outputs, including position, course and speed, HDOP (horizontal dilution of precision, a metric for how accurate the GPS fix is based on satellite geometry) and more

  • Additional windows for position info, marking a waypoint, tracking, and more.

I’ll have a full hands-on review later on, but if you’re interested in this kind of app, it’s worth a look right away.



European Open Street Map (OSM) Data In Shapefile Format

Geofabrik makes available Open Street Map (OSM) data available for download in both the original OSM format and also in shapefile format. For the latter, a short set of features is available in layers: “road and railway network, forests, water areas, some points of interest”. While the primary coverage area is Europe, there are some datafiles for Asia as well. The data files are updated daily on the server to reflect the most recent changes in the OSM dataset.



Placemark Creator For Google Earth

A new utility from Valery Hronusov, Placemarker lets you create a Google Earth placemark different than the standard placemarks available in the program. No install program, just unzip the files into their own folder and run the executable:

9-14-2008-10.06.09 PM

Enter the desired text into the box; controls let you set the font, shadow or outline effects (with variable depth), and the location of the text relative to an optional icon. The default icon is shown above, but you can use JPG, PNG, TIF, BMP and TIF files of your own, and re-size the icon to your desired dimensions. “Save Image” saves the text and marker imagery at top as a graphic file. But if you want to place the text/marker in Google Earth,  click on the Open GE button:

9-14-2008-10.11.37 PM

If Google Earth isn’t already open, it will be, a marker will appear at the center of the screen (at upper left in the above picture), and the action box at the lower right. Move the image in Google Earth until the on-screen marker is positioned where you want the placemark to be located, and then click “Do!”. A PNG of the placemark image will be created, and positioned centered at the on-screen marker:

9-14-2008-10.15.30 PM

If you don’t like the position, you can move the Google Earth image and “Do!” it again. Once you have it where you want it, just save the generated “image.png” overlay as a Google Earth KMZ file to keep it for future use.

The overlay stays at a 0-degree orientation, and covers the same screen area, regardless of how you tilt the display and zoom in/out:

angled

A useful complement to the online KML Labels tool that generates similar text labels for Google Earth, but as image overlays on top of the terrain.