Author Topic: DEMs render too far west, or...  (Read 11399 times)

Jon Sundquist

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
    • www.trailmap.us
DEMs render too far west, or...
« on: March 19, 2004, 10:32:26 PM »
..or alternatively maybe I am pushing the program too hard, and I need a workaround.

First of all, the 3D stuff is absolutely fantastic!

However, I have noticed one decrepancy which may be nitpicking, and if so, I need a workaround for something.

The "bug" is that the DEMs apply their elevation data slightly too far to the west.  For example, take a look at this screenshot from some of the trails we used at the IMBA Ellicottville Epic: http://www.trailmap.us/topo-drg-2.jpg   You can see the creek on the left sitting on the edge of the hillside rather than in the valley.  The switchback in the middle of the picture was laid out by the IMBA trail crew using a clinometer to get precisely a grade of 10%, but here it looks like it is on flat ground.  The valleys further to the right show creeks on the hillsides, which is seen better in this screenshot: http://www.trailmap.us/topo-drg-3.jpg  This screen shot also shows a V-shaped section of a trail that is supposed to be out on a spur (and is according to hte contours) but is shown off the east side of the spur instead (with contours "draped" over the spur!

Also, going back to here, you can see that the track is floating above the valley on the western sides, but is hidden "beneath the surface" on the eastern sides of the valley. (note, the brown track is an export of a shape file of my map, and has no elevation information, and thus its corresponding red track is located beneath the map surface (at sea level actually).  

Another, more dramatic example is this: http://www.trailmap.us/sp-drg-1.jpg where the contours describing the west side of the stream valley are instead lying on the valley floor, with the creek halfway up the eastern wall of the gorge.

I thought this may be an artifact of the DEMs that I downloaded from the CUGIR repository at http://cugir.mannlib.cornell.edu/, so I checked that by loading the DEMs into Arcview.  A 2D image of the DEMs and the shapefile that generated the non-GPS track is shown at http://www.trailmap.us/av-dem-1.jpg and I can see, for example, that the V-shaped section of trail is indeed on the spur as described by the DEM data.

May or may not be important: I made sure that the coordinate system I used fas the default for topofusion matched the coordinate system that the DEMs wre provided in, specifically, NAD27 datum with a UTM projection.  Could there be some possible hard-coded assumption that the DEM data are in NAD83?  This is just a wild guess, but I throw it out since the difference between the datums would be on the order of the error seen in these screenshots.  

I noticed a similar artifact is seen with the sample data provided with the beta distribution. (See http://www.trailmap.us/topo-sp-1.jpg )  But as fas as I can tell, the artifact is the reverse, with the DEM data being rendered too fact to the east, but in any event, we have the "draped" contour syndrome again.

Now as I mentioned above, I may be pushing the program to more accuracy than it is set up to do, which is OK.  The program still rocks!  I can live with it.  However, I was wondering if there was anyway to just show the "projection" of the track onto the surface, rather than the projection plus the actual 3D coordinate position.  As shown in my first screenshot, the GPS track (the one with the elevation data in the GPX file) is shown hovering above the surface on the west side of the valley while on the east side it is "underground".  If I wanted to publish some screenshot images, I would like to show just the projected image of the trail on the surface.

Thanks.

Jon Sundquist

Alan

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 165
    • View Profile
DEMs render too far west, or...
« Reply #1 on: March 19, 2004, 11:05:13 PM »
Regarding showing on the projected track and not the free flowing 3d, just turn off the appropriate checkbox in "Options->3d Settings".  The projected one can be turned on and off with the normal toggle button on the toolbar.

Regarding the DEM accuracy.  It looks like there's something wrong.  I know at Starr Pass (the Cat mountain sample DEM distributed with the beta), there is a problem with the maps from TerraServer being off that couldn't be affecting it.

TopoFusion can currently handle NAD27 and WGS84 DEM's.  There could (and probably are) errors in either the reprojection code or simply a misunderstanding of the DEM spec.

We're definitely committed to accuracy.  Thanks for bringing to our attention these inconsistencies.

Alan

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 165
    • View Profile
DEMs render too far west, or...
« Reply #2 on: March 20, 2004, 12:03:52 AM »
Indeed, there must be something wrong.  I'll get to looking at it soon.  Presently though, as a work around, use data from the NED at http://seamless.usgs.gov/viewer.htm

Notice the difference between the UTM dem


and the NED


Alan

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 165
    • View Profile
DEMs render too far west, or...
« Reply #3 on: March 20, 2004, 08:45:18 AM »
I just found the problem.  Early in development I had hard coded the NAD27 to WGS84 conversion (for DEMs) to use zone 12 since that's where all the the DEMs I was using were located.  I forgot to fix this before release.  We will be releasing a new beta soon including that fix.

Jon Sundquist

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
    • www.trailmap.us
DEMs render too far west, or...
« Reply #4 on: March 21, 2004, 06:09:55 PM »
OK, just another data point:

I got a great application for this: I have a project at work where we have a site where on one part of a hillside the owner had a sand quarry, while elsewhere on the hillside he had landfill.  We have to cap hte landfill, but need to determine exactly where the boundaries are.  We'll be test pitting, but a the USGS topos show the contours before the owner (since gone) started his operation.  A comparison of the (recent) aerial photo vs. the (old) terrain (DEMs digitized from the old topo) will show where he dug and where he filled.

To get more accurate, I fetched elevation data from the NED seamless server.  I didn't see all the options for file types that have been mentioned in other threads, but I was able to convert the Arcinfo Grid to geotiff with Arcview 8.2, and then used 3DEM to reproject to UTM (WGS84) and convert to ASCII DEM.  I then fired up topofusion, setting preferences to WGS84 UTM.  

The east-west error seems to be gone, but now I get a north south error:



As you can probably see, the intermittant creek (faint in this image) is higher up the hillside than the road (it is supposed to be in the trough, of course)

The rendering is better, though, than when I use the DEM downloaded from the NY spatial data repository at Cornell (CUGIR).

BTW, whereas the other images I was showing earlier in the thread were UTM zone 17, this site is UTM zone 18.

Like I said, just another data point.

Alan

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 165
    • View Profile
DEMs render too far west, or...
« Reply #5 on: March 22, 2004, 07:43:41 AM »
I think I mentioned this in another thread, but you shouldn't convert to UTM using 3DEM, it doesn't do a very good job.  I think you should also avoid the arcinfo grid -> geoTiff conversion.  On the NED server, when you're just about to download the file, there's a button called "modify data request" or something.  Click it and change the format from arcgrid to geotiff.  Open it in 3DEM and just save it as ASCII USGS DEM, no conversions.  TopoFusion now supports the geographic reference system in DEMs.

I don't have access to Arcview so I can't test the differences directly.  Try the above and let us know what you find.

One of other things: The preferences for NAD27/WGS84 in the options dialog box are only for display and data entry purposes, they do not affect the DEMs in any way.

Jon Sundquist

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
    • www.trailmap.us
DEMs render too far west, or...
« Reply #6 on: March 22, 2004, 08:06:21 PM »
Quote (Alan @ Mar. 22 2004,7:43)

I don't have access to Arcview so I can't test the differences directly.  Try the above and let us know what you find.


Ok, I did and much better:



Still some artifacts, but neither the DRG nor the DEM (i.e. what I am starting with) are perfect I would think (what's up with that plateau in the back with no contours?!  I think it is an error in the dem)

On another note, notice the quick transition from purple to green in the foreground track, even while still apparently on the plateau.  That is real, and shows how much sand has been mined away since the topo lines were drawn some yers ago.

Thanks for all the help.