No Disconnect

Things I’d rather not forget

Archive for the ‘Cartography’ Category

Steps for making the contour maps in GPSmapedit

leave a comment »

  1. Add all layers at once. Add to level 0.
  2. Properties
    1. add a map ID, add a map name, convert to meters
  3. Levels Tabl
    1. add up to Level5
    2. make Zoom0=0 … Zoom5=5
    3. make “Bits” descending
  4. Select minor contours, right-click, Join Objects
  5. Extend to level 1 (i.e., GPS Zoom 200 m – 300 m)
  6. Select intermediate contours, right-click, Join Objects
  7. Extend to level 3 (i.e., GPS Zoom 800 m – 1200 m)
  8. Select major contours, right-click, Join Objects
  9. Extend to level 5 (i.e., GPS Zoom 1200 km)

Written by nodisconnect

July 2, 2009 at 5:28 am

Posted in Cartography, GIS

Making good contour maps

leave a comment »

One strategy is to run gdal_contour several times, to generate the three levels of contour that Garmin accepts: major, intermediate, and minor. [Update: this seems to be the only strategy.] Unfortunately Garmin doesn’t auto-simplify contours automatically, so it will be necessary to decide at what level which contours are eliminated. Awkward, since there are high-relief locations as well as low-relief.

Which contour intervals to use? In the 7.5 minute maps, the USGS uses 40-foot minor intervals, with an annotated major interval every 5 contours (such that the values are in multiples of 200). (Incidentally their maps can be downloaded, at screen-appropriate resolution, for free.) 40 feet is 12.19200 meters. So we could start with 10 meters and annotate every 50, to parallel the USGS approach. Here is some GMT code to test these parameters out on the Catalina Mountains, the only mountains I really have a feel for:

grdcut /GIS/srtm/srtm_14_06.grd -G/GIS/srtm/catalinas.grd -R-110.875/-110.75/32.25/32.375
grdimage /GIS/srtm/catalinas.grd -R-110.875/-110.75/32.25/32.375 -JM7i -B0.5 -Cmyglobe_land.cpt -P -V -K > catalinas.ps
grdcontour /GIS/srtm/catalinas.grd -R-110.875/-110.75/32.25/32.375 -JM -C10 -A50 -B0.5 -S10 -O -P -K >> catalinas.ps

There are obviously some artifacts from the 90-meter resolution, but on the whole this looks and feels right. (The SRTM data also come in 30-meter resolution for the U.S., but since I am interested primarily in overseas maps, I have used the 90-meter resolution here.)

Improvement: the lines looked much better when resampled to 30-meter resolution, and redid the contours. [Again, kind of silly for a U.S. sample.]

grdsample /GIS/srtm/catalinas.grd -G/GIS/srtm/catalinas_1c.grd -I1c
grdimage /GIS/srtm/catalinas_1c.grd -R-110.875/-110.75/32.25/32.375 -JM7i -B0.5 -Cmyglobe_land.cpt -P -V -K > catalinas.ps
grdcontour /GIS/srtm/catalinas_1c.grd -R-110.875/-110.75/32.25/32.375 -JM -C10 -A50 -B0.5 -S10 -O -P -K >> catalinas.ps

Also, here is a commitment on which lines are which in the Garmin map: 10-meter Minor, 50-meter Intermediate, 250-meter Major.

Written by nodisconnect

June 29, 2009 at 1:17 pm

Posted in Cartography

The Grail: my own topo maps into my Garmin

leave a comment »

Well, this took long enough.

Broad Strokes

  1. Data from the Shuttle Radar Topography Mission (best taken from CGIAR).
  2. Use GDAL (gdal_translate) to convert to GMT‘s .grd format.
  3. Use GMT’s grdcut to cut out a region of interest.
  4. Use GDAL (gdal_contour) to create a contour map, in ESRI Shapefile format.
  5. Open GPSMapEdit, import said Shapefile, tweak environment parameters extensively. Save as Polish-format .mp file; export as Garmin .img file.
  6. Use MapSetToolKit to install the .img file as a map that MapSource can see.
  7. Use MapSource to send the file to the GPS.

Tricky Bits

  • Steps 1 – 4 are pain-free.
  • Step 2
    • File | Import | Shapefile. In the “From field” tab the labels must be clicked on, for some reason. Click. Click. Make sure the datum and coordinate system are correct.
    • Under File | Map Properties. Enter a unique 8-digit numeric key in “ID.” Give the map a name.
    • Tricky things to do under the “Levels” tab:
      • A “level” is a zoom level. Level0 is the most detailed; Level8 or so the least detailed. Map objects will only be visible at levels for which are not specified, or for levels that are not specified.
      • So, add as many levels, plus one, as you want your map to be visible in. The last level must be blank.
      • Moreover, in the “Bits” field of the “Level Settings” dialog box, starting from Level0, each successive level must use fewer bits than the one above it.
    • Close out the “Map Properties” dialog.
    • Select all of the contours. Right click. Modify | Extend All Elements up to Level — and enter in the number of levels minus 1. (The highest-level level must be empty.)
  • Step 7. Described here.

Remaining Work

  1. Figuring out what contour intervals are appropriate for which zoom levels.
  2. Making it look better.

Credit/help/inspiration: here and here.

Written by nodisconnect

June 29, 2009 at 12:00 pm

Posted in Cartography, GIS

How MapSource works

leave a comment »

Copying a map to my Garmin should be as easy as copying an MP3 to my MP3 player. Here’s how it really works:

There are things called “mapsets” — Garmin products, or pretend Garmin products. (Information about mapsets is stored in the computer registry, so of course people have figured out how to fake the format. This is what MapSetToolkit does; you give it an .img file, and it fakes out Mapsource into thinking that your .img file is a real Garmin product.)

The idea behind MapSource is that you’re working with a “Garmin GPS Database.” What’s in the database is what’s in the panel at the left of the screen. Not every map in every mapset is in the database. This was confusing when I was trying to transfer maps to the Garmin. How does one add a map to the database?

  1. Select the desired mapset with the “Select the desired product” drop-down at the upper left corner.
  2. Make sure the “Map Tool” button is checked. (Inexplicably the symbol is a yellow polygon.)
  3. Click the map you want to add in the map window.

Thereafter it’s a simple matter of, Do Transfer | Send to device…. The really surprising thing is that you have to select all of the products you want to send to the device, visually. (For such a slick device the software is not great.)

Written by nodisconnect

June 29, 2009 at 11:21 am

Posted in Cartography, GIS

cgpsmapper into Garmin

leave a comment »

There is a free way to convert from the “Polish format” (for cgpsmapper) into something that can be loaded into Garmin. Instructions here. You use a free tool called MapsetToolkit. Bit of a clunky interface.

Written by nodisconnect

March 22, 2009 at 9:14 am

Posted in Cartography, GIS

GPSBabel

leave a comment »

GPSBabel “converts waypoints, tracks, and routes between popular GPS receivers and mapping programs.” Not the ultimate in conversions, but it’ll get the data to KML, which is far enough for me. Garmin’s Mapsource has a text export option, but nothing that I wanted to have to parse afterwards.

I’ll need to write more once I’ve played around with it.

Written by nodisconnect

March 13, 2009 at 2:26 pm

Posted in Cartography, GIS

Garmin eTrex Visa Hcx

leave a comment »

I bought a Garmin eTrex Visa Hcx ($189.99, with free shipping). Now I’m trying to create my own maps.

W.r.t. data, I’ve got the filled SRTM data, and the GTOPO30 data. The data are in raster format. Garmin accepts vector format. I’ve previously created topo maps from them using GMT, but since the GMT tools focus on Postscript output, I don’t know know whether pscontour will really help me.

Garmin has their own proprietary map format. Since they sell maps they’re not sharing, but people have worked around them. Promising tutorials here and here, mostly based around the cGPSmapper software.

Written by nodisconnect

March 12, 2009 at 7:43 pm

Posted in Cartography

Follow

Get every new post delivered to your Inbox.