Showing posts with label GIS. Show all posts
Showing posts with label GIS. Show all posts

Saturday, May 16, 2009

LIDAR contours

The map took a major step forward this week with the acquisition of LIDAR contour data from the Coweta County GIS department. LIDAR is the latest and greatest method of generating contours (and other data) using airborne radar and digital signal processing. This is great news, and should make the finished product much better.

Getting it into a usable form took most of a day. The county supplied two foot contours in a shape file. I had to use qgis, wich is an open source GIS program (free) to translate it from lat/long coordinates to UTM WGS84 in zone 16N. Then I used a demo program to convert from shape to dxf. The dxf file still needed some massaging, which I did with sed in OS X. After all that I was able to import the dxf and have it magicall line up with the geo-referenced aerial photos.

Here's an example.The purple lines are the lidar data. The green lines are the USGS contours from the DRG. The blue lines are contours generated from the USGS DEM. There's a lot of difference.

[caption id="attachment_64" align="alignright" width="425" caption="LIDAR Contour Example"]LIDAR Contour Example[/caption]

Monday, March 9, 2009

GPS -> DXF -> OCAD

The next piece of the puzzle that I needed to solve was how to et the GPS waypoints into OCAD easily. The scenario is that I mark a waypoint of a boundary marker or a boulder or that old abandoned corn combine while I am out field checking. Then, when I get back in front of the computer I magically transfer that point into OCAD.

OCAD is not a full featured GIS application, at least not version 8. It only acepts DXF files, which are an ancient output format of autocad. Wikipedia has a nice page explaining the format and a link to the official definition. OCAD doesn't need a full fledged file, ust the points section. Here's an example with just two points:

0
SECTION
2
ENTITIES
0
POINT
8
cbwaypoints
10
688166
20
3701504
30
0
0
POINT
8
cbwaypoints
10
688222
20
3701658
30
0
0
ENDSEC
0
EOF

I was able to take the gpsx file from the GPS, and using GPSBabel and a perl program I wrote for my Mac, massage it into the correct format. As long as I name the waypoints in a certain format, I can grep them and convert to a dxf fle.

OCAD imports these in a gray color, marked with a plus sign, with no symbol defined. It's necessary to select them and convert them to the appropriate symbol.

Now it remains to be seen how accurate they are. This is the first time I have attempted to use GPS for making an orienteering map. I guess I will report back in May on the success or failure of this experiment.

Thursday, January 15, 2009

DEM -> contours -> OCAD

Using a USGS digital elevation model (DEM) to generate contours for an orienteering map might be described as "garbage in, garbage out." The USGS DEM is crude at best, at least from the viewpoint of an orienteering map.

But what this technique does offer is the ability to generate contours at a different interval than a USGS quadrangle map. For the Chattahoochee Bend map, I need countours at a 3 meter interval. The USGS quad has 20 foot contours. The object is to take the DEM, run it through some utility programs, and generate contours at a 3 meter interval that I can use a a crude base map.

Every contour must be redrawn during field checking to more accurately match the terrain, but there is an advantage to having contours at the correct interval to start from.

So I got a DEM of the area, for free, from the Georgia GIS Data Clearinghouse. This came in NAD27, which is what I was using with the DOQQ and NAIP photographs, so my OCAD map is already using those coordinates. If I were using some other coordinate wywtem I would have to convert so hat all my data sources are on the same page of the hymnal.

I use the GDAL utilities to do coordinate transformations and to generate the contours. These are command-line programs that are available for almost every operating system. I'm using a mac - not that it matters. The program to generate contours from a DEM is gdal_contour. The command looks like this:
gdal_contour -a contour -i 3 e3384d8.dem whitesburg.shp

The default output is a shape file. Unfortunately, the GDAL utilities don't seem to be able to generate DXF files, which is what OCAD needs. So I had to find a program on the net to do the conversion. I used Arcv2cad, which had a demo version. The dxf file is then imported into OCAD and the contours converted to a symbol. I actually copied the contour symbol and changed the color to gray.

So how does the output look? And how does it compare to the USGS quad contours? Here's an excerpt of the map:

[caption id="attachment_26" align="alignnone" width="341" caption="USGS contours and DEM contours"]USGS contours and DEM contours[/caption]

The USGS contours are in brown, and are at a 20 foot interval. The DEM contours are in gray at a 3 meter interval. So there should be about twice as many DEM contours. Note also that the DEM contours are points connected by straight line segements, and the USGS contours, which are taken from the DRG, are smooth lines.

This excerpt is about 850 meters east to west and 600 meters north to south, so you can see that there is not a lot of elevation chage on this map.

So is this useful? I would like to have both in the field, so that I can contrast and compare. The DEM gives me a clue where the extra contour line should go.

This would not be useful in a map with relief detail that could be obtained with photogrammetry. Photogrammetry would be a vast improvement when there is more relief and there is detail to be discovered. But this is such a "gentle" area that the photogrammetry is not going to reveal much, and comprehensive field checking is needed anyway. It is during the field checking that the detail will be added and the contours smoothed.