blankblank blank


Archive for the 'coordinate conversion' Category Page 4 of 5



Reproject NOAA BSB Raster Navigation Charts And Export Them In TIFF Format

Yesterday, I posted about a NOAA site where you can download Raster Navigation Charts (RNC), maps of coastal and inland waterways. The charts are currently only available in BSB format, which many GIS programs can’t handle; I linked to a few free viewers that will let you view the maps, but not export them. They’re also only available in the Mercator NAD83 projection/datum. Peter Guth (the author of the terrain analysis GIS MicroDEM) let me know about a free utility available from NOAA called the Digital NOAA Nautical Chart Reprojector. It lets you re-project the BSB maps into one of 32 projections (e.g. geographic or UTM) and over 100 datums, then exports the chart in BSB, RAW or TIFF format with a world file; the latter virtually every GIS program and graphics editor can open. It looks like it was originally a command-line utility, since a DOS box pops up when you run the program, but it now comes with a GUI:

NOAA Chart Reprojector

The Input File and Output File dialog windows are a bit clumsy to use until you figure them out, but for the input file, you’re looking for the .kap file that came with the zip file you downloaded from the NOAA mapsite. Choose the desired output parameters at right, including choice of output file format (TIFF here), projection (UTM) and datum (WGS_84). The GUI doesn’t set the UTM zone automatically, but you’ll see the West and East Bounds for the map in the Input Info window at left, and can use those as a guide for setting the correct UTM zone with the Projection Parameters dropdown at right. In this case, clicking “Run” will create the TIF file specified as the output file, along with its worldfile. The file extension for that worldfile will be .tifw; if your GIS program doesn’t accept that, try changing it to the more-commonly seen .tfw extension.

NOAA also has a free extension called Chart Viewer that lets you open BSB charts natively in ESRI’s ArcView and ArcGIS, and Leica Geosystems’ Imagine.




Additional ERDAS Viewfinder Utilities

While a previous post dealt with using ERDAS Viewfinder to re-project raster images from one coordinate system to another, probably its most useful function, it does also have some other utilities. To start with, it has some satellite image viewing and enhancement capabilities, including multiband display, sharpening and softening, histogram equalization, and two standard deviation stretch. I won’t talk about those here, since I think its capabilities in that area are too limited to be especially useful, and I’ll probably cover more useful satellite image analysis programs in the future, But if you’re interested in those, you can take a look in the help file, or this handy tutorial PDF, which also describes how to use the general toolbar controls to zoom in/out and pan the map.

Instead, I’ll look at two other utilities, accessible from the Tools menu:

Continue reading ‘Additional ERDAS Viewfinder Utilities’




Reprojecting Raster Imagery II – ERDAS Viewfinder

For a long time, I thought that the free utility ERDAS Viewfinder 2.1 had slipped through the cracks after the acquisition of ERDAS by Leica Geosystems, but it recently re-surfaced for me in a Google search. And that’s great (thanks, Leica!), because while Viewfinder is an OK geographic image viewer, especially when compared to the many alternatives now available, it does have one very handy capability: the ability to re-project a raster image from one coordinate system to another, and save the new image in GeoTiff format with the new projection/datum data embedded.

Continue reading ‘Reprojecting Raster Imagery II – ERDAS Viewfinder’




Reprojecting Raster Imagery I

There’s no really complete free substitute for a good commercial program like Global Mapper or FME for reprojecting raster images from one coordinate system to another. Not only do they support virtually every projection and image format, but they also have batch conversion capabilities for converting many images in a single step. But they’re expensive, and overkill if you only have a small number of basic conversions you want to do; for those basic needs, there are some simple and free alternatives.

MicroDEM – I’ve covered the use of MicroDEM before for converting graphic files with worldfiles into GeoTiffs with both georeferencing and coordinate system data embedded. But you can also use it to convert GeoTiffs in the NAD27 datum to the program’s native WGS84 projection using essentially the same process: open the NAD27 GeoTiff, zoom it to 1:1, and then export it as a GeoTiff in WGS84 (read the original post for more info). That’s all it does, change the datum – it maintains the projection of the original (i.e. if you start with UTM or geographic, the two projections it supports, that’s what you’ll wind up with). And it converts indexed color files to RGB, making the filesize lot larger. But for the common need to convert USGS topo maps from NAD27, like those freely available from Libremap or other sources, to WGS84, it may be enough for some people.

gdalwarp – Part of the GDAL library (included in FWTools), this command-line raster re-projection utility is extremely powerful, but its command-line nature makes it less than user-friendly, and learning the proper codes and syntax for converting from one coordinate system to another isn’t my idea of fun. If you have one conversion you do on a regular basis, setting up a batch file might make that process a bit easier, but a graphical user interface would be even better. Note to command-line fans: Yes, I’m a wimp.

MapWindow – I include MapWindow because, not coincidentally, it does include a graphic interface to gdalwarp that supports many projections/datums, and which also appears to have a limited batch processing capability. Access it using the GIS Tools => Image => Reproject Images menu function (make sure GIS Tools is enabled in the Plugins menu). The image file and coordinate system selections (source and target) are straightforward. The one problem is … I haven’t been able to get it to work on my system. After going through the whole process, I keep getting an error message saying that image export through GDAL isn’t supported. But I’m guessing this will be fixed reasonably soon, and as a bonus, MapWindow also comes with a really nice shapefile coordinate system converter.

But until MapWindow is functional, I’ve found another free program that re-projects georeferenced image files from one coordinate system to another, supports a fair number of datums and projections, and supports export in indexed color format. More on that in the next post.




More Degree-Minute-Second Converter Options

A commenter on yesterday’s post asks if I know of any programs that will convert a list of coordinates in degree-minute-second format to decimal degrees. Haven’t tried it, but Zonums Software has a free Excel macro called Ectrans that will supposedly convert a spreadsheet list of coordinates in degree-minute second format to decimal degrees (and vice versa), or one set of coordinates at a time manually. It also converts spreadsheet coordinate lists from lat/long to UTM and back again. If you don’t have Excel, it might work with OpenOffice, since I hear rumors that OpenOffice may support some VBA macros.

Zonums also has online decimal-DMS converters for converting one point at a time, adding them to a text box that can be copied and pasted as a CSV spreadsheet file; points can also be plotted on a Google Maps interface. There are also online lat/long to UTM converters accessible from the same page, but they don’t appear to be working currently.

From comments in yesterday’s post, Dylan Beaudette describes how to do it using FWTools (command-line, run away! ;-):

1. convert DD -> DMS:
cs2cs +proj=latlong +datum=NAD83 +to +proj=latlong +datum=NAD83

2. convert DMS -> DD
cs2cs -f “%.6f” +proj=latlong +datum=NAD83 +to +proj=latlong +datum=NAD83

If you invoke the command as listed above (without reference to a data stream) you will get an interactive prompt. This approach is a lot more useful when you have a file full of coordinates, or a stream of coordinates:

cs2cs +proj=latlong +datum=NAD83 +to +proj=latlong +datum=NAD83 < DD_coords.txt > DMS_coords.txt

Also from the comments, for programmers, Aron Rubin posts code for a C function that will do the conversion.




Degree-Minute-Second To Decimal Degree Converter

Someday, working with latitude/longitude in degrees-minutes-seconds will be a bad memory, and everyone will use either decimal degrees or rational metric units like UTM exclusively. But until that happy day, if you need a desktop utility to easily convert from degrees-minutes-seconds to decimal degrees or degrees-minutes (and the opposite direction as well), you may find it useful to have the Degree/Minute/Second Converter from Mentor Software handy. It’s a small download at 307 kB with a full installer, but make note of which Start Menu folder it puts the shortcuts in (default is Accessories). Operation is dead simple:

dms

Enter the degrees, minutes and seconds separated by spaces, set the number of decimal places with the Precision option, select the result type you want, then click Convert. It converts in the opposite sense directly, i.e. enter a decimal degree and have it converted to degrees-minutes or degrees-minutes-seconds. In this latter mode, checking Min/Sec Blank Fill removes the zero from the front of single digit minutes and seconds (e.g. 1 instead of 01 minute, 4.2 instead of 04.2 seconds). Can’t quite figure out what Degree Zero Fill does, though ….




MGRS/UTM/Latitude-Longitude Converter

For converting to and from the Military Grid Reference System (MGRS) and UTM/LatLong, the MGRS Conversion Utility from Mentor Software is a small utility (365kB download) which does only that. During installation, everything stops for a long while, but it’s not a crash – it will eventually complete the installation process. Once installed and run, just enter one of three kinds of coordinates, UTM, latitude/longitude, or MGRS, click Enter next to the entered coordinates, and they will be converted to the other two coordinate systems:

mgrs

You can choose from 61 different datums in the “Ellipsoid” section at top. Latitude/longitude can be entered in decimal degrees, or as degree-minute-second with each set of numbers separated by a space. Set the MGRS precision with the up/down arrows; check “Use Bessel Code” for those areas where it’s appropriate for MGRS (mainly Europe – see the help file for more info).

And if you’re interested in displaying MGRS coordinate data in Google Earth, the Nearby.org.uk website has a link that plots MGRS gridlines in Google Earth, with a central marker that displays the 1-meter MGRS reference.

Addendum: See this post for a roundup of MGRS utilities.




Natural Area Coding Tool For Google Earth

Ogle Earth posts on NAC Earth, a Google-Earth addon that lets you navigate to a Natural Area Coding (NAC) location. Never heard of NAC? Neither had I until this post. It’s apparently a proprietary universal address system that can assign a sequence of up to 8 letters and digits to any geographic location or landmark; Stefan at Ogle Earth describes it as the geographic equivalent of tinyurl. He also doesn’t see much need for it, and truthfully neither do I – if you want to describe a location by a semi-cryptic series of letters and numbers, you can always use MGRS. Given that the system has been around now for five years without picking up any traction, I’m guessing others feel the same way.

Need to convert a set of geographic coordinates to an NAC code? Try Barry Hunter’s online coordinate converter. The NACGeo site also has some free online services for looking up and plotting NAC locations.