When conducting analyses with National Elevation Dataset DEMs, projecting the raster correctly is key, otherwise you could end up with slopes greater than 1,000,000% or slope/aspect/hillshade outputs that look like this:
Using the "Project Raster" tool, the first important piece is to output the raster to a projected coordinate system. NED DEMs come from The National Map with a geographic coordinate system, and the linear unit is undefined. If you do an analysis on a raster that requires the use of a z-factor, outputs can look molten or overdone and the resulting cell values can be extreme. Projecting to a projected coordinate system defines a linear unit, avoiding this problem. See this blog post from ESRI for more information.
The next important piece for projecting the DEM is to use a Bilinear interpolation for the "Resampling Technique". ArcMap defaults to a nearest neighbor resampling, but if you do this and subsequently do a slope analysis on this raster, you often see strange grid lines show up in your output (as in the photo above). Selecting BILINEAR instead of NEAREST should avoid the grid-like artifacts that stem from resampling patterns.
Wednesday, April 1, 2015
Friday, November 14, 2014
Convert Multi-band Raster Images Into Single Band Classified Rasters
During the process of classifying imagery in ENVI for use in ArcGIS, you might come across the problem of having your classified .tif image displayed only in RGB format with no attribute table in ArcMap. This format is not useful if you are trying to analyze the unique land cover classifications in your image, so in order to convert the image into a raster with an attribute table that enables you to use the classified renderer in ArcMap, use the following steps:
1. Using the identifier tool in ArcMap, find out which two (out of the three) bands in your image give you a unique signature for each land cover class when added together. For example, an area classified as cropland may have the following RGB values: R=255 G=255 B=0. If the red and green bands added together give unique values for each class, then those two bands will be used in the next step.
2. In ArcCatalog, expand the raster image with three bands in order to be able to load in the bands separately. In this step you will only load in the two bands that when summed together give you a unique number for each land class in your classified image.
3. Once those two bands have been loaded into ArcMap, use the raster calculator tool to sum the two bands. Your output will be a single raster with unique numbers for each land cover class. This raster should contain an attribute table and should allow you to render the image as classified.
4. (Optional) In order to display the unique classes with a different set of numbers, you can use the reclassify tool and change the land class numbers (the result of summing two bands together) to your desired new values.
Wednesday, March 5, 2014
Expand polygon to many features in ArcMap
Use the Explode button in Advanced Editing toolbar after selecting all features in Layer!
Thursday, May 30, 2013
Geotagging photos
If you don't have a camera with GPS for geotagging photos, you can match the time stamp from the photos to that of GPS waypoints. Record a tracklog on your GPS while taking photos. Once the photos and tracklogs have been uploaded, download the EasyGPS software and open the track in the software. Under the Tools menu, select Add Photos. Photos with matching timestamps will be added to the map in the correct location. Geotag is another free software, which is open source and has more flexibility (edit time stamps, export to Google Earth). For this, you will also need to download ExifTool in order to edit and save photo metadata.
Friday, May 10, 2013
Tuesday, March 19, 2013
WGS84 to Web Mercator Transforms
Handy:
private void ToGeographic(ref double x, ref double y)
{
if (Math.Abs(x) < 180 && Math.Abs(y) < 90)
return;
if ((Math.Abs(x) > 20037508.3427892) || (Math.Abs(y) > 20037508.3427892))
return;
double x = x;
double y = y;
double num3 = x / 6378137.0;
double num4 = num3 * 57.295779513082323;
double num5 = Math.Floor((double)((num4 + 180.0) / 360.0));
double num6 = num4 - (num5 * 360.0);
double num7 = 1.5707963267948966 - (2.0 * Math.Atan(Math.Exp((-1.0 * y) / 6378137.0)));
x= num6;
y= num7 * 57.295779513082323;
}
private void ToWebMercator(ref double lon, ref double lat)
{
if ((Math.Abs(lon) > 180 || Math.Abs(lat) > 90))
return;
double num = lon* 0.017453292519943295;
double x = 6378137.0 * num;
double a = lat* 0.017453292519943295;
lon= x;
lat= 3189068.5 * Math.Log((1.0 + Math.Sin(a)) / (1.0 - Math.Sin(a)));
}
private void ToGeographic(ref double x, ref double y)
{
if (Math.Abs(x) < 180 && Math.Abs(y) < 90)
return;
if ((Math.Abs(x) > 20037508.3427892) || (Math.Abs(y) > 20037508.3427892))
return;
double x = x;
double y = y;
double num3 = x / 6378137.0;
double num4 = num3 * 57.295779513082323;
double num5 = Math.Floor((double)((num4 + 180.0) / 360.0));
double num6 = num4 - (num5 * 360.0);
double num7 = 1.5707963267948966 - (2.0 * Math.Atan(Math.Exp((-1.0 * y) / 6378137.0)));
x= num6;
y= num7 * 57.295779513082323;
}
private void ToWebMercator(ref double lon, ref double lat)
{
if ((Math.Abs(lon) > 180 || Math.Abs(lat) > 90))
return;
double num = lon* 0.017453292519943295;
double x = 6378137.0 * num;
double a = lat* 0.017453292519943295;
lon= x;
lat= 3189068.5 * Math.Log((1.0 + Math.Sin(a)) / (1.0 - Math.Sin(a)));
}
Tuesday, March 12, 2013
Geocoding
batchgeo.com provides easy batch geocoding.
- Copy and paste entries from an Excel document containing addresses (city and state is good enough).
- Click "Validate & Set Options" and select the desired settings.
- Click "Make Map."
- Once the map has been made, complete the fields and proceed.
- When the finalized map is displayed, scroll to the bottom and click "Download as KML."
- In ArcMap, import the KML as a point file.
- Add X,Y coordinates using XTools.
- Export to Excel using XTools.
Subscribe to:
Posts (Atom)