Jump to content
Sign in to follow this  
Gridley

Finally - a free reprojection utility for background im...

Recommended Posts

Hi all,I decided to re-post Derek's post in a separate thread because I believe this is a significant discovery for anyone looking for a free utility that re-projects images and GIS data form UTM (or many other projections and datums) to the FS-native lat/long WGS84. "Hi Guys,ERDAS ViewFinder is a freeware image analysis package that allows raster reprojection. It will handle GeoTIFF and .img files, but you can also download a plugin from ER-MAPPER that will allow you to read an .ecw that you can then save as one of the other formats which you can reproject from. Follow the link then go to free downloads...http://gis.leica-geosystems.com/erdascentral/Cheers,Derek"-------------I just downloaded the utility (of course, yet another user registration required) and it runs fine on my Windows98, even though it indicates being for NT/XP only. I haven't done a full round of testing yet but I loaded one of the satellite image bands I've been using - http://glcf.umiacs.umd.edu/index.shtml - and saved it as geographic/WGS84 projection in tif format. I then loaded the same image I had reprojected earlier with my commercial GIS and the output seems to be identical - hooray!http://forums.avsim.net/user_files/78502.jpgUnless I'm missing something, ViewFinder doesn't allow to crop the image so you'd have to do that in Photoshop or PSP or whatever you use and use the information in the .tfw file, along with columns & rows, to calculate the extent of your image (see below). The satellite images are available for the entire planet and a great source for setting up background bitmaps for Ground2K4 or other scenery design software. The ETM+ data have a 15-m greyscale band (Band 8) or you can download any three of the 30-m bands and combine them in your image editor into a RGB color image. For example, Band 1 as Blue, Band 2 as Green, Band 3 as Red, will yield a true-color image.---Here's a summary of the required steps (there might be other options):1. Go to http://glcf.umiacs.umd.edu/index.shtml , then "Download Data", then "Map Search", then check the "ETM+" box, then select the Lat/Long tab. Enter the bounding coordinates of your area and click on "Update map". "Preview and Download" will bring up all available image sets and you can check the previews to pick one or more. Make sure that the image Attributes are "Ortho, GeoCover" and the Type "GeoTiff". Click on download. The individual bands are named *nn*0.tif.gz - e.g., Band 1 is *nn10.tif.gz. Usable for scenery work are Bands 1-5, 7, and 8. The choice is yours. More information about the content of the bands is available here: http://rst.gsfc.nasa.gov/Sect1/Sect1_3.html2. Once you have one or more bands and/or images downloaded, unzip them and load and save/reproject each one with ERDAS ViewFinder.3. Use your image processing software (Photoshop, PSP, Gimp, etc.) to crop each band to the same size and combine them as color RGB, if desired. Important: write down the start and end column and row of the area you're subsetting. Then save the subset as bmp. Note that your area should not be bigger than approx. 4000x4000 (double that for Band8, if saved as 8-bit greyscale), otherwise Ground2K4 will have difficulties handling the large file size.4. Calculate the upper left and lower right corner coordinates for calibrating the image in Ground2K4. Open the ViewFinder .tfw file of your reprojected image in Wordpad or Notepad and use the X/Y resolution (the first line) and longitude and latitude (the two bottom lines) of the original image to calculate the subset image's corner coordinates as follows: N(subset) = N(original) - (Yres * Nrow) W(subset) = W(original) + (Xres * Wcolumn) S(subset) = N(original) - (Yres * Srow) E(subset) = W(original) + (Xres * Ecolumn)(use negative lat/long values for western longitudes and southern latitudes)5. Start Ground2K4 and initiate your new project.Hope this helps. Cheers, Holger

Share this post


Link to post
Share on other sites

Holger, thanks for reviving this thread. I'm struggling with providing viewfinder with data that presents the initial georeferencing needed to allow the reprojection to take place. Say I start with a terraserver raster image. Can you advise the steps to take?Bob B

Share this post


Link to post
Share on other sites

Hi Bob,I realized yesterday after typing this post that TerraServer doesn't allow saving an image in GeoTiff; didn't think, though, that my untested assumption would get tested this quickly ;-)While ViewFinder will read a .jpg file created with BigJpg.exe (of the USAPhotoMaps TerraServer image "grabber") it doesn't seem to allow for changing the UTM projection into something else.Fortunately, other people have had the need before us for a freeware solution to turning TerraServer output into GeoTiff format and Google helped me to track them down. Go to this website - http://www.digitalgrove.net/Toolbox_mappers.htm - and scroll down to "Zoner Draw 3" - there's a description about how to do this and whith what tools; as usual, freeware work-arounds involve about 25 tools at once ;-) Once you have a fully georeferenced GeoTiff TerraServer image you should (!) be able to use ViewFinder for the reprojection to lat/long.I won't have the time to test this procedure right away but if you're giving it a try please let us know if and how it works out.Good luck!Cheers, Holger

Share this post


Link to post
Share on other sites

Thanks Holger...times a tad short for me as well, but my interest is high. I will report once I've got something to say...others should jump in here also....no glory for getting there first!Bob B

Share this post


Link to post
Share on other sites

The instructions via the digital grove website is:<<1. Use Zoner Viewer to open a JPEG aerial photo made by USAPhotoMaps-BigJPEG. Tune up the contrast-brightness-sharpness to suit your needs. (If you wish, you can also add text, lines or symbols in Zoner Draw.)2. Convert the image to a TIFF format file with Zoner Viewer's "Convert" tool. 3. Use Properties Plus to rename the image's "jgw" world coordinate file so it has a "tfw" extension. 4. Use another free utility called GeoTIFF Examiner to change the paired TIFF and "tfw" files into a single GeoTIFF file. GeoTIFF Examiner will write the world coordinate calibration into the header of the TIFF file. (Note: Do not create the GeoTIFF file until you are done making adjustments with Zoner.)>>I'm working on step 3....looks like I must download a "jgw" world coordinate file from terraserver. B

Share this post


Link to post
Share on other sites

Hi Bob,the .jgw file contains the georeferencing information for the .jpg file. If you're working with USAPhotoMaps - http://jdmcox.com - the BigJpeg.exe module will create a .jpg with an associated .jgw file for you. If you're downloading directly off TerraServer you can make your own .jwg file. This is the structure:1.000000000000000000.00.0-1.00000000000000000273600.000000000005265400.0000000000Lines one and four contain the X and Y resolution in meters. Don't ask me why line 4 is negative; just enter your image's resolution as a negative number as well. Keep lines two and three as they are and change the last two lines to the upper left corner of your UTM TerraServer .jpg, first Easting (longitude) then Northing (latitude). I'm not entirely sure where the UTM Zone comes in but make sure you'll write it down somewhere.Cheers, Holger

Share this post


Link to post
Share on other sites

Holger, what's the file extension for a geotiff....my efforts are so far crashing viewfinder. I'm thinking I have a geotiff but the extension remains tif, and the file can't be opened by viewfinder.If the file extension isn't a clue, is there another way to verify the geotiff file is "good"?B

Share this post


Link to post
Share on other sites

Hi Bob,Hmmm.... the extension is the same as a regular tif but I don't know what information is stored in the header of the tif file. I thought it duplicating the data provided in the tfw file so one can use either the geotiff with header or a tif file with accompanying tfw file of the same name.Are you following the procedure with ZonerDraw and GeoTIFF Examiner described on the DigitalGrove website or what tools/methods are you using?Cheers, Holger

Share this post


Link to post
Share on other sites

<yes, except rather than use bigjpeg.exe, I'm just downloading a topo map from terraserver, and downloading the corresponding world file. I haven't rtfm very much.....lolB

Share this post


Link to post
Share on other sites

Howdy,well, that's odd: the procedure for georeferencing a TerraServer jpg as described on the website doesn't seem to be working. First off, there's no need to use that Zoner Draw program if you already have any graphics software that can translate a jpg to tif (most do). The problem is that the step with GeoTiff Examiner (writing the world file coordinates into the tif file) works but it's not complete. Apparently (???), the projection information (UTM, zone, and datum) is also stored in the geotiff .tif file but GeoTiff Examiner doesn't deal with that. However, it seems that ERDAS ViewFinder requires that information to correctly read the image and allow for reprojection when saving. I tested this by loading the tif file written by GeoTiff Examiner into my GIS (it asked me for the UTM zone and datum) and saved it as a tif; this geotiff version then worked in ViewFinder just like the satellite imagery.I looked for other free options/tools for appending tif formats to geotiff but haven't had any luck so far. Any other ideas anyone? Maybe it would be possible to add the information with a hex editor?Cheers, Holger

Share this post


Link to post
Share on other sites

Hi there,... and Derek scores again ;-) And the tutorial is even on the same website! Wonder why they have that apparently useless paragraph with the Zoner Draw utility but no crosslink to the complete tutorial? I haven't tried it yet but I'm hopeful. Just remember to set the compression value to minimum (1%) because you probably don't want any quality loss (minimal though it is) when processing TerraServer images.Thanks again, Derek!Cheers, Holger

Share this post


Link to post
Share on other sites

sweet success!Just tried a TerraServer 2-m composite made with USAPhotoMap, following the instructions in the website listed above by Derek and it worked like a charm. I visually compared the image to the output provided by my GIS and the amount of stretch and rotation appear identical!Once again, make sure that you know the UTM zone of your image (for the ECW Header Editor) and, in Step 4 of the tutorial, select Category "geographic" and Projection "WGS84". Also, for both steps in ViewFinder make sure to select "Cubic Convolution" as the Resample Method.Finally, before you close your reprojected image, click on Tools > Image Information and write down the image Width and Height (if you want to use the output for photoreal textures) as well as Lower Right X and Lower Right Y (you need those for Ground2K4; the Upper Left X and Y are already contained in the .tfw file of the same name).Go wild!Cheers, Holger

Share this post


Link to post
Share on other sites

ok, running into problems....it seems I have a successful .tif file with the utm zone 10 projection identified....http://forums.avsim.net/user_files/79379.jpgand attempt to save as "geographic" projection.....http://forums.avsim.net/user_files/79380.jpgbut I get this error....http://forums.avsim.net/user_files/79381.jpgAny one see the mistake? Clicking ok, just ends the save as op....The reporjection works fine using a different end goal projection...but I beleive that "geographic" is the right projection for flight sim....BPS...seems the color image is saved as black and white....I'm too new at this...need help at recombining the layers back into rgb channels...I don't see a way in viewfinder to isolate a layer for individual saving...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...