blankblank blank


Archive for June, 2009

Convert From AutoCad Format To KML And Vice Versa With KML Tools Pro

I don’t have AutoCad, so I can’t try this out, but KML Tools Pro has AutoCad DVB macros that let you select features in AutoCad and convert them to Google Earth’s KML format; similarly, another macro will let you import a KML file into AutoCAD. From the website:

From AutoCad to Google Earth:

  • select objects and create .kml file
  • export points, lines, text, polygons (beta)
  • apply the icon of your choice
  • select zoom level that objects are visible
  • output automatically layer colors
  • adjust weight and transparency of objects

From Google Earth to AutoCad:

  • digitize points, lines, polygons in GEarth
  • save “.kml”
  • import in AutoCad using wanted projection

Supported projections:

  • NAD-83′ State Plane (*Alaska Zone 1 not supported)
  • UTM zones
  • HATT
  • Greek Grid (EGSA 87)

The current download site is in Greek, but the link to the downloadable file is obvious at the bottom. An older version of the page used to be available at this link, but isn’t currently working; you might try the cached version of the page from Google.

For converting KML files to DXF format, you can also try this online converter.




Map Maker Gratis: Free Map Editor

Map Maker Gratis is the free version of the professional $400 GIS and map editor Map Maker Pro. I’ve been meaning to try it out for a while, since even the free version has a very strong feature set. From the website:

  • Unlimited number of layers, raster and vector.
  • Colour, mono, and grey-scale bitmap backgrounds.
  • Large range of fill, line, and symbol styles
  • Translucent and semi-translucent fills.
  • Curved, stretched, and outline text.
  • Arrows, and dimensions.
  • Easy to create scale bars, north points, legends, text panels, inset images, etc.
  • Point-and-click to pop-up images, documents and internet links.
  • Print accurately scaled maps on any true Windows compatible printer.
  • Multi-sheet printing of large maps.
  • Create from new or import and edit.
  • Vector drawing and editing.
  • Intuitive cutting and joining of polygons.
  • Create polygons with islands.
  • Simple editing of common boundaries.
  • Numerous “snap-to” options.
  • Drag, stretch, rotate, duplicate groups of objects.
  • Create buffer zones.
  • Calibrate raster images.
  • Use data from DBF files to colour up a map or determine symbols.
  • Generate legends.
  • Measuring areas and lengths is simple.
  • Edit data sets.
  • Import vector data including ArcView SHP, MapInfo MIF, AutoCAD DXF, Idrisi VXP.
  • View BMP, TIF, Geo-Tiff,  and JPG raster data.
  • Export BMP, JPG, TIF.
  • Export DBF data to Microsoft Access, Excel, dBase etc.

The Pro version adds support for 3D, raster-to-vector, on-the-fly reprojection, export of vector features from the native .dra format to standard formats (shapefile, MapInfo, etc.),  and more; see the comparison chart for all the differences. And the install program lets you try out the Pro version for 30 days before it reverts to the free Gratis version. So it seemed worth a look on a simple map project I was doing for a friend as a favor.

Having struggled with the program for a few days, I can see that it does have many features; unfortunately, it also has a fairly steep learning curve, especially for those used to more conventional GIS programs. For example, modifying vector file display attributes isn’t done by modifying the layer properties, but rather by defining a “style”, a set of descriptions for things like symbol, line width, fill patterns and more, and figuring out how to do that effectively takes some work (and sometimes doesn’t work the way you expect). Getting labels to appear in the position I wanted was a chore, and some of the label controls didn’t seem to work. You can have multiple layers of vector data loaded, but it seems that you can only work with data in a single, “active” layer, i.e. you can’t edit or add points to layers other than the active layer.  There’s a large PDF manual that comes with the program, and at first glance it seemed to be comprehensive. But when I ran into problems and looked in the manual for answers, more often than not I couldn’t find them.

I suspect that if I worked long enough with the program, I would eventually figure out what it can and can’t do. There are some limited tutorials available for download at the site, along with links to tutorials by other users. Given the feature set, and the price point of $0 for the Gratis version, I can’t complain too much, and can see myself revisiting the program at some point in the future to give it a more complete review.

I should mention that the program authors generously offer free licenses for the Pro version to any non-profit organization, educational institution, or students in Africa. Also, there’s a world clock / sunlit area display program called Sun Clock available for a 30-day full-featured demo; at the end of 30 days, some features disappear (like views of the sky and stars), but the world clock /sunlit areas feature remains free.

SunClock




Disaster Response Map Symbols

The Portuguese chapter of the Association Of Volunteer Emergency Response Teams, in collaboration with Peter Guth and Donald Springer, is working to create a general-purpose set of symbols useful in mapping the position and condition of infrastructure, resources and incidents during emergency situations. You can download these Disaster Response Map Symbols as a True Type font from the DRMS website, along with a PDF file that documents the symbols There are 253 symbols depicting infrastructure, resources and incidents (graphic from the help file for MicroDEM, Peter Guth’s freeware GIS):

drms table

And additional dot symbols that represent the status of the higher-level symbol:

drmsstatus

These status symbols would be plotted directly below the higher-level symbol, to indicates its condition/status:

commstatus

Any GIS software that can use True Type fonts for symbols or labeling can use the DRMS symbol set directly. But MicroDEM has some special capabilities built in for working with this symbology. Make sure you’ve used the most recent program install, which includes the DRMS True-Type font; also, download the latest executable and copy it into the program directory.

From MicroDEM’s File => Tools menu, selecting Military icon generator brings up the icon composer window; make sure the DRMS tab is selected:

iconcomposer1

Double-click on an icon to select it, and then modify it as you like:

  • Use the color button to modify the color
  • Use Left/Right/Top/Bottom to add text around the symbol.
  • Select the Infrastructure status to plot dots depicting the status of the feature underneath the symbol
  • Modify the test and symbol size using the arrow keys

iconcomposer2

Once the symbol design is complete, you can save the symbol to the clipboard to paste into a graphics program, or choose “Save to file” to save it as a PNG, GIF, JPG, BMP or Targa format graphic file for those GIS programs that let you select graphic images to represent points.

You can also plot these symbols directly on a map in MicroDEM. Open up a georeferenced raster image in MicroDEM:

raster

Clicking on the Map Annotation button on the toolbar (second from the left), choose Military icons from the drop-down, and then enter a filename to save the locations for the icons you want to place. You’ll then use the same Icon Composer interface as above to design your DRMS icons. The Left text is used as a feature ID in the DBF file, and also in the KML file you have the option of creating later on. Once you’ve designed your icon, you can double-click on the raster map to place the icon on that map:

mapwithicons

Click on the “Close” button in the Icon Composer when you’re done. You can now export this map image directly to a generic image file or GeoTiff using the appropriate File => Save … option. But by right-clicking on the map, choosing Load => Google Earth overlay, you can export both the raster image and vector points to Google Earth. Here’s the raster overlay in Google Earth (vector overlay is turned off):

drmsraster

And here are the vector points, with the selected icons, for the same area (raster overlay turned off):

drmsvector

These data files are loaded into Google Earth automatically, but they’re not saved; to keep them for future use, right-click on the dataset listed in the Google Earth Places pane, choose “Save Place As”, then save it as a KMZ file.

Closing the Icon Composer will also open up a DBF  table window with the locations of the points you’ve just created; you can convert that to a point shapefile by clicking on the Report button, then selecting point shapefile. There’s also an option with this Report to create a KML file, but make sure you save this KML file in an empty folder. As I found out by testing it, this option creates a KMZ file, copies every single file in that folder into the KMZ file, then deletes the original file from the folder. If this happens to you, rename the KMZ extension to ZIP, then use your favorite unzipping program to extract out the original files. Also, the KMZ file contains only the KML text data, which  references the graphic icon files in a local directory on your computer for display in Google Earth. If you want to save this file for future use on your computer or another computer, and keep the graphics, you will need to open the file immediately in Google Earth, then save it as a KMZ file (right-click, choose “Save Place As”,etc.).




Automating Your Garmin Oregon Photo Geotagging Flow Using GeoHarvest

There are a number of stand-alone Windows apps and web apps that led you geotag photos by matching the time they were taken with points on a GPS track (see the geotagging category of this blog for examples). But all of them require you to start up the program, load in the photos, load in the GPS track, and then start up the geotagging process. Flip Fahrenfort geotags a lot of his photos, and got tired of the multiple steps involved. So he wrote GeoHarvest, a program that automates the process to a large degree for owners of Oregon Garmin GPS units. When a memory card or camera is attached to your computer, it can automatically download a copy of digital photos from a memory card/camera to a folder of your choice, and keeps track of the photo filenames. When you connect a GPS, it will download track data and save it in GPX format. It then matches up the track times with the times the photos were taken, and geotags the photos with the appropriate coordinates.

The program can run continuously on your system, monitoring for all inserted memory cards or attached cameras with images to download, or GPS units with tracks to download as well. But if you want it to run this way, you’ll have to copy a shortcut to the program to your Startup folder manually, since the program doesn’t come with an install program that does that. It also can run in single-transfer mode, so that you can connect the data sources, have the photos geotagged automatically, then have the program terminate.

Unfortunately, since I don’t own a Garmin Oregon unit, I was unable to figure out how well it works with that unit. And while the program option suggest that you should be able to get the program to work with other GPS models with some manual work, I was repeatedly unsuccessful at this – GeoHarvest refused to accept GPX files generated by multiple programs. There are online help pages on program configuration and usage; if you can get it to work with your non-Oregon GPS, please leave a comment below.




New Book (And Poster) On GIS Cartographic Design

Directions Magazine has a highly positive review of the new book GIS Cartography: A Guide to Effective Map Design by Gretchen Peterson. A bit expensive at around $80, but the review also links to a free printable poster that summarizes the “Five Layers Of Effective Map Design”, which is worth a look in any case. You can find more books on map design listed on this post.




LandSerf – Google Earth And GPS Functions

In previous posts, I reviewed LandSerf’s raster terrain analysis functions and vector functions. Today I’ll wrap up with a short review of LandSerf’s Google Earth and GPS functions.

Google Earth: The most notable Google Earth functionality is the ability to export vector data, either imported or generated by the program, into KML vector files. So I can open a DEM, like the sample one of Mt. Rainier included with the program:

lsdem

Generate a set of flow vectors for the DEM:

flowvectors

And then export the vector data as a KML file:

rainier

You could do something similar with a shapefile opened in LandSerf, but just be sure the shapefile is in NAD83 or WGS84. As I mention in the post on LandSerf vector functions, LandSerf has problems re-projecting from one datum to a significantly different second datum, and Google Earth data needs to be in WGS84 (NAD83 is almost the same). A search for “KML shapefile” on this blog will bring up a number of other programs that do a better job of converting shapefiles to KML, including preserving attribute data, which LandSerf doesn’t. But all of those are Windows-based; LandSerf runs on Macintosh and Linux, so it might be a useful option for those OSes.

Note: You should save vector data as a KML file; the KMZ file format is supposedly reserved for saving raster data as Google Earth image overlays, but I’ve been unsuccessful in getting that to work.

GPS: The list of useful GPS functions in LandSerf is a bit longer:

  • Convert loaded shapefiles or other vector data to GPX format (data must be in WGS84/NAD83 datum)
  • Load a GPX file as vector data, then save it in any of the vector formats LandSerf supports
  • Interface directly with a GPS. You’ll need to have the GPS connected to your computer and turned on before starting up LandSerf. To establish a connection to the GPS, use Configure=>GPS and scan for a connected unit. Once you do this, you can import waypoint data using the File=>Import from GPS function. While the dialog box gives you the option to import waypoints, tracks and routes:

gpsimport

I’ve had difficulty getting tracks to import successfully – the program just shuts down on me. This may just be an issue with my model GPS (Garmin 60Cx); f you have better luck, let me know. You can import the data in the default lat/long coordinate system. or re-project it on import to OSNG or UTM. Once there, you can export it in GPX, shapefile or other vector format.

  • You can also export point data (no lines or polygons) directly from LandSerf to a connected GPS as waypoints.

If you can get track data to import successfully from your GPS to LandSerf, which I couldn’t, there are several other functions that might prove useful:

  • On importing the data, you have the option of saving all the track data in spreadsheet format with position, elevation and time
  • As with other vector data, if you have a digital elevation model loaded in the program, you can get a elevation profile plot; see this previous LandSerf post for more info
  • If you have a GPS track that is broken into .segments because you lost the GPS signal, LandSerf has the ability to join all of the line segments into a single line, which you can then save as a GPX track file, using the Edit => Join vector lines function. AFAIK, it’s the only free program that can do this.

As with the Google Earth functions, there are other programs that can do most of this in Windows, but far fewer free options in Macintosh and Linux.




Online Google Earth Path Length Measurement

One oddity of Google Earth is that while you can measure distances, and also draw paths, there’s no direct way to determine the length of a path you’ve drawn. I’ve previously covered several applications that will take a KML path file and determine its total length; all of the require that the path file be a KML, not KMZ file. Via the comments in that post, Nicholas Hoza announces that he has a new online application that will also compute Google Eath path lengths, and do it for either KML or KMZ files.  Click the “Attach file” link to select the file on your computer:

craterfish

Then click “Find Path Length” to, ummm, you know:

path

And you’ll also get back the input screen so that you can select another file. As a bonus, the website cycles through scenic backgrounds, and you have the lovely angler fish logos to look at; you can even order a T-shirt with the logo.




A Look At The New USGS Quad Format

Via the All Directions Blog comes word that the first “beta” versions of the new digital USGS 7.5-minute quad maps are now available at the USGS Map Store; click on the yellow button that says “Show DigMaps-Beta” to display their positions in the Google Maps interface. Before you get too excited, you should note:

  • Only maps from Arizona are currently available, and even then not the whole state (there’s a big hole around where I live)Coverage is currently limited, but more states are being added all the time:

newquadsmap

(The coordinate indicator down at the lower right is new, and a nice touch – lat/long and USNG coordinates that reflect the current cursor position)

  • These are quads, but they’re not topo quads yet – contour lines are missing, as is all hydrographic data.
  • Worst of all, they’re in GeoPDF format only. Windows users will need the free GeoPDF plugin to take advantage of features like live coordinate readout, measurements, alternate coordinates, grids, etc.; there’s no plug-in yet for Mac and Linux users, though they can still view the files in Acrobat Reader with layers.
  • They’re not available in standard graphic formats like TIFF or GIF, but there’s a way around that – more on that later.

Open up one of these new quad PDF files, and you’ll see a layers panel at the left:

layers

Clicking the “eye” will turn a layer on and off; presumably, when contour lines are added, these can be turned on and off as well. Most of these layers are vector in nature, with one big exception, the “Orthoimage” layer; this is a full-color aerial photograph that can be placed on the map as a background:

ortho

This is both great, and a pain to use. Great because aerial photos on USGS maps rock; a pain because it slows things down and lot.  Every time you pan the map, the orthoimage needs to get redrawn completely; same thing every time you turn a vector layer on and off. It’s slow even on my quad-core desktop; on my netbook, it’s unusable. You’ll probably find yourself turning this layer off unless it’s absolutely necessary. Supposedly, later versions of these maps will have the old-style raster topo maps available as a layer, and I’m guessing they’ll be slow, too. Orthoimage resolution appears to be about 1-meter; in the picture below, the smallest square is about 1 meter by 1 meter, and the next square grouping is 8 meters by 8 meters:

orthoblowup

All of the vector layers, including labels, roads, and grids, blow up very nicely when you zoom in – no more aliasing effects as with the old raster maps:

vectorblowup

And the roads line up perfectly with the underlying imagery, which definitely wasn’t always true with the old USGS topo maps, either:

lineup

In appearance and utility, these maps looks like a big step ahead, and I look forward to seeing them with contour lines on top. But the format is a big problem – AFAIK, only Acrobat Reader with the GeoPDF plugin lets you look at these maps with georeferenced coordinate data. GeoPDF is being promoted as an open standard, and eventually more GIS programs will be able to handle these maps directly, but right now most (all?) don’t, and I doubt most graphic editors will be able to open and edit GeoPDFs anytime soon.

I’ve covered a way around this problem before. The free utility PDFCreator lets you “print” a file to a number of graphic formats like JPG, TIF, GIF, PNG, etc.; see this post for more details. So from Acrobat Reader, you could “print” the map into a TIF file. Depending on the output resolution you select, you’re likely to get some raster aliasing effects in the final map, but it still looks better than the old format USGS maps. The example below was “printed” at a 300 dpi resolution:

aliasing

The image won’t be georeferenced, but since the map is in the UTM NAD83 projection, georeferencing can be done easily and accurately using any number of free programs (which I’ll get around to covering sometime soon). Just convert the lat/long of the quad corners to UTM coordinates, and then use these corners as the reference points for registration:

corner

The very outside tip of the corner corresponds to 36N, 112W; convert that to UTM (409871E, 3984411N), and you can then use that corner for registration. Repeat as needed for the other corners.