June 30, 200421 yr VERY interesting threads, folks. I am quite interested in creating some new coastlines with the advent of USA Roads, and this thread is helping me.I used USAPhotoMaps to whip up a quick representation of the area I wish to recreate, but upon my exact entering of the coast data, I notice that inside MSFS the layout is off. I can only presume it is due to not adjusting my source file's projection.Here's what I did, and I am looking to find out if I am on the right track:* Used USAPhotoMaps, and had it create a BIGJPEG.* Using the ECW Compressor, I created an ECW file from the JPG.* Using the ECW Header Editor, I tweaked the header to contain the geographic information for my source file (NAD83, NUTM19, and the other numbers found in the "JPW" file - still don't fully understand their use, but I put 'em in! X/Y, etc) * Using ERDAS Viewer (w/ECW Plugin) I opened the ECW, "Save As..." to a TIFF file and entered the output projection information (WGS84, UTM19)* Now I have a TIFF file and a TFW file. WHAT'S NEXT!?I'd like to use the resulting file to base my Ground2k4 work on.Do I simply convert the TIFF to BMP and bring it into Ground2k4? Is there an easy way to tell Ground2K4 the coordinates of the resulting image? That's where I am currently stuck. :) Your help is greatly appreciated!-Greg
June 30, 200421 yr Author >WHAT'S NEXT!?I believe I opened my geo referenced tiff file in ECW compressor, and saved it as a bmp - this keeps the header info intact for use with G2k4 - right?Best,sg [email protected] | 32gb RAM | EVGA GTX1080 8gb | Mostly P3Dv5 (also IL2:BoX, DCS, XP11)
June 30, 200421 yr Commercial Member Hi Greg,1. make sure that your output projection is geographic (with units set to degrees), not UTM2. as Scott says, load your tif in a graphic program and save as bmp, noting the width and height (in pixels)3. fire up G2K4 and load the bitmap, then enter the NW / SE coordinates as described above (N and W are in the tfw file, S and E need to be calculated form the image width/height and X/Y resolution). Hope that helps.Cheers, Holger
June 30, 200421 yr Thanks Holger...I'll make sure the output is in units "Degrees" (vs. the metric I was using), and geographic.I'll convert the TIFF to BMP, and take careful note of the pixel dimensions. I'll run G2K4 and import the BMP, and use the formulas above to calculate the S/E corner coordinates from the N/W coordinates found in the TFW file! Seems straightforward!With a long thread like this, it's sometimes difficult to get your hands around all the concepts - especially those which you gurus are already well-versed in.Thanks once again for the help!-GregEDIT: Rather than mucking around with forumulas, I'll probably snag the fGIS program and use it to quickly calculate the locations.
June 30, 200421 yr Here's my current hiccup - and after this, I think I'll have it.I've gone all the way through and I am now attempting to import my BMP into G2K4. I used Scott's idea about fGIS to "Save" the project and get automatically created XY/XY dimensions for plugging in G2K4, but that's where I am getting messed up.It would appear that my units are stuck in Metric. The numbers for the corners are...Units=METERfGIS.XMin=291639.583333333fGIS.YMin=4611376.08333333fGIS.XMax=305160.416666667fGIS.YMax=4620271.91666667...and plugging them into G2k4 is friutless. Where in the process do I switch the BigJPEG-created "easting and northing (?)" units to degrees?
June 30, 200421 yr Author You may need to start over from the BigJpeg - check the tutorial that Derek posted:http://www.digitalgrove.net/image_reprojec..._with_erdas.htmThe first image on that page:http://www.digitalgrove.net/images/ecw2.gifYour projection should be UTM of the appropriate band instead of LOCAL, then change Units in the next box to degrees. Does that look like what you've done so far, and still get meters for corners? Best,sg [email protected] | 32gb RAM | EVGA GTX1080 8gb | Mostly P3Dv5 (also IL2:BoX, DCS, XP11)
July 1, 200421 yr OK, it took me a few hours to get through this whole thread and get everything working. It got very confusing, between the gaps in the Digitalgrove tutorial and conflicting information between it and the forum. So, here it is, my entire detailed soup-to-nuts process to get USGS data into Ground2K4. First, make sure you have the following software installed:USA PhotomapsBigJpegECW CompressorECW Header EditorECW Plugin for ERDAS ViewfinderERDAS ViewfinderGraphics editing software of your choice.Start USA PhotomapsLocate area to importSelect File - "Boundaries for BigJpeg"Select areaClick View - Lat/Long and select UTMIn the title bar, you will see coordinates for Easting/Northing and a Zone number. Make a note of that zone number.Exit USA PhotomapsRun BigJpegMove Jpeg file to working directoryRun ECW CompressorInput file should be your JPEGSet Compression ratio to 1Click ApplyExit ECW CompressorRun ECW Header EditorClick File - Open and select the ECW file you created.Change Datum to NAD83Change Projection to NUTMXX or SUTMXX, where XX is the zone number you wrote down from USA Photomaps. NUTMXX is for the northern hemisphere, SUTMXX is for the southern hemisphere.Change Units to Meters.Click File - SaveExit ECW Header EditorRun ERDAS ViewfinderChange File Type to "ECW Image Format"Select your ECW File.Click OKClick File - Save AsNavigate to the directory you want to save in.Change File Type to .img (to avoid confusing this temporary step with the final TIFF file)Give your file a name, without any extension.Click OK ONCE (nothing will happen)Click the "Output File Options" tabDo NOT select "Change Output Pixel Size"Click Change Output ProjectionChange Catagory to "UTM WGS 84 North"Change Projection to the UTM Zone you wrote down from USA PhotomapsChange Resample Method to "Cubic Convolution".Click OKA new ERDAS Viewfinder window will open with the photo in .img format.Click File - Save AsNavigate to the directory you want to save in.Change File Type to TIFFGive your file a name, without any extension.Click OK ONCE (nothing will happen)Click the "Output File Options" tabClick "Change Output Pixel Size"Change Units to DegreesMake sure "Auto Convert" is selectedClick "Change Output Projection"Change Catagory to "Geographic"Change Projection "Lat/Lon (WGS 84)"Change Resample Method to "Cubic Convolution".Click OKA new ERDAS window will open with your final TIFF.Click Tools - "Image Information"Note that Units are in degrees, and the Upper/Lower corner information is now in degrees.Note that the Projection is geographic, and the spheroid and datum are WGS84.Write down the corner information for use in Ground2K4.Using the image editor of your choice, convert the TIFF to a BMP, without trimming or resizing.That's it, you're ready to use the image in Ground2K4.Dan
July 1, 200421 yr Author Very nicely done! I'll be printing that one out for when I do this again with a larger background...Thanks for that...Best,sg [email protected] | 32gb RAM | EVGA GTX1080 8gb | Mostly P3Dv5 (also IL2:BoX, DCS, XP11)
July 1, 200421 yr Slacktide:THAT'S what I'm talkin' about. :) Nice writeup - it's basically what I wanted to do in the end, but you beat me to it. Being at work, I can't step through it to test it out, but it looks good. I see where I made my mistakes - I missed the "double opening" of the file in the ERDAS viewer (one to format, another to set up degrees), which probably led to my problems. I *was* able to use a 3rd party program to convert the northing and easting to degrees, but it was painful.I'll give this writeup a shot tonight (presuming I get time from the girlfriend!) and take it from there!Thanks!-Greg
July 1, 200421 yr Fantastic!I just ran home on lunch and tested it out...Works like a CHARM.The one thing I was about to question is - When entering the NW/SE coordinates, do I have to move the "selection" point in Ground2K4 to the corner of the image file, or the corner of the image as displayed. The projection twists the picture and leaves black space around it, and I didn't know if the corner measurements were of the black-bordered image, or the image itself.I left Ground2k4 alone and had it place the coordinates at the default location in the absolute corners of the .BMP file, and it seemed to work.I quickly whipped up a lake which sits next to KPVD in the center of my photo background, and the USA Roads provided a great reference - they skirted right around the pond as it should be. EXCELLENT steps, Slacktide.-Greg, who now has a big enough BMP to spend a few weeks drawing the coasts of Rhode Island.
July 1, 200421 yr Yeah, that was the breakthrough. ERDAS apparantly can't handle converting units until it's header information is fully filled out. For the life of me, I couldn't get it to do it in one step. It kept saying that I needed 2000 gigs of free disk space to comple this operation. :)Dan
July 24, 200421 yr Hi Dan,Great thread!I have been following this also and having a reasonable degree of success, my main interest is using the USA Photo map output - and it works!I have one major intermittent problem with ERDAS Viewefinder - it crashes most of the time when exporting the image, and I can't figure out why, its not the size (I tried both big and small images) I followed your instructions carefully "Click OK once, then set the projection etc"Bottom line is that I probably have to do the operation about 10 times and then on the tenth occasion it works!Really wierd, I have tried it on a couple of different machines,Any ideas?Thanks again,Geoff
July 24, 200421 yr Hrm, not sure. ERDAS never did this to me. I've switched to another tool for doing my reprojections, though... It's an open-source toolkit called GDAL (Geospatial Data Abstraction Library) Their website is at http://www.remotesensing.org/gdal/ I like it because you don't have to worry about converting between intermediate formats and mucking around with the file headers, because you can specify the projection on the command line, and it supports a TON of different projections. (Close to 2400 listed in the documentation)Dan
July 25, 200421 yr Hi Dan.In fact that package contains a nice DOS binary called "gdalwarp.exe" that will do a decent job of reprojection from a bat file.I made a file called "WGS84_Test.bat":gdalwarp -t_srs WGS84 -rcs utm.tif MyWGS84.tif...and it will reproject the "utm.tif" file to WGS84 lat-long projection "MyWGS84.tif". It's very quick. The -rcs forces the use of cubic spline resampling for the reprojection.Nice find.Dick
Create an account or sign in to comment