Is easting and northing same as UTM metric?
Depends on the situation. In this case, it seems like easting and northing are absolute arc-seconds rather than relative meters from an arbitrary origin.
Are UTM coordinates supposed to be written as easting-northings or northing-eastings?
UTM coordinates are usually written as (easting, northing) to mirror the cartesian (x, y) convention.
What is the standard unit for UTM coord? meters? arc seconds? In the DEM file i have, I figured it is in arc seconds.
As far as I know, the standard unit for UTM coordinates is the meter.
How to I convert, specifically for this DEM (see above) I have, from the "4x2" array to meters?
Since the ground unit is arc-seconds:
SW Coord: -440100, 176400
NW Coord: -440100, 177300
NE Coord: -439200, 177300
SE Coord: -439200, 176400
Try dividing the coordinates by 3600 to get the values in degrees:
SW Coord: -122.25, 49.00
NW Coord: -122.25, 49.25
NE Coord: -122.00, 49.25
SE Coord: -122.00, 49.00
If we interpret this as 49N, 122W with 0.25-degree offsets we get a location on/near the border between WA and BC. Converting this to meters for use in Google Earth is a little trickier. I don't know what Google Earth expects (UTM or an arbitrary local tangent plane), but you can try using http://nearby.org.uk to convert to UTM (Zone:10U E/N:573142,5427937 for 49N, 122W).
Here's what the original NASA's SRTM document says (emphasis is mine):
File names refer to the latitude and longitude of the lower left
corner of the tile - e.g. N37W105 has its lower left corner at 37
degrees north latitude and 105 degrees west longitude. To be more
exact, these coordinates refer to the geometric center of the lower
left pixel, which in the case of SRTM3 data will be about 90 meters in
extent.
What you have is an ASCII grid file. I've seen two types of these: one type defines the grid using xllcorner
/yllcorner
, the other using xllcenter
/yllcenter
, but both are essentially the same.
So, with that in mind, and seeing that I need to map each elevation to
a point. Is it more accurate to say that the first value in the grid
represents the elevation at (xllcorner, yllcorner) or at (xllcorner +
cellsize / 2, yllcorner + cellsize / 2)?
SRTM height represents the (average) height of all points within the cell, which has a bounding box (xllcorner, yllcorner, xllcorner + cellsize, yllcorner + cellsize)
. The center of that cell is xllcorner + cellsize/2, yllcorner + cellsize/2
. So, basically, the answer to your question is: use the center of the cell to represent the height point.
I would also suggest running some TIN simplification algorithm on your mesh to reduce its size, that's what I did for my project.
Best Answer
I'm assuming you've loaded it to an array or some similar data structure, correct? A DEM is basically a grid/raster. Your problem now is to map the lon lat coordinates the cells in the grid. As the DEM has a fixed cell size, the precision of your coordinates like say your example
would have to be approximated to match the cells on the raster. Basically, you're doing coordinate conversion. From lon lat to x,y or the cell/pixel addresses.
If you do get tired of trying to do it from scrach, you can try using Sharpmap.
Happy coding :)