The question: How do I get a simple elevation profile for a line using QGIS 3.4 with height/distance in either meters or feet?
The problem: I have the same problem using both Profile Tool and qProf plugins: I get an elevation profile where the y axis is correctly in meters, and the x axis units are ???. In real life, we estimate the length of the line should be about 1/4 mile (or ~400 meters), but x coordinates read: 0.001, 0.002, up to nearly 0.005. (am I off a factor of 10,0000?)
I have spent quite a long time searching the internet for similar questions, but haven’t found the solution to my problem. Here’s a detailed description of how I got here:
1. Download Digital Elevation Model (DEM) file:
- select Data Download Application: Launch
- select Elevation Products (3DEP)
- select 1/3 arc-second DEM
- locate an area on the map on the right
- I chose: Use Map and Current Extent, then Find Products
- I chose and downloaded: USGS NED 1/3 arc-second n42w122 1 x 1 degree ArcGrid 2019
2. Understand CoordinateReferenceSystem (CRS) of DEM file
Unzip n42w123.zip, and load
hdr.adf into the qgis project (via select/drag from browser window). (I have also tried adding a raster layer and choosing the
Clicking the layer properties and information tab, I see that:
- the CRS is
EPSG:4269 - NAD83 - Geographic
- the unit is in degrees
- and I confirmed from a metafile somewhere that the height z axis is in meters
3. Change the CRS of the DEM layer
All the answers on the internet describe that you need to project to a flat UTM coordinate system for slope and elevation profile stuff to work. I’ve tried several:
- right click on the DEM layer
- Set CRS
- Set Layer CRS
NAD83 / California Zone 1 EPSG:26941(I’ve also tried
NAD83/California Zone 1 (ftUS) EPSG 2225and
NAD83/UTM zone 10N).
- view the layer properties again and confirm that units are now in meters
4. Load the line and convert CRS I had a kml file that I loaded and then exported to a shape file. Loading that shape file and viewing the layer properties, I see the default:
- CRS EPSG:4326 - WGS 84 - Geographic
- Geometry Line (MultiLineString)
- Unit degrees
- right click the layer and Set Layer CRS to match above:
NAD83 / California Zone 1 EPSG:26941
- review layer properties and confirm: crs has changed and unit is now meters.
5. Download QGIS plugins: -
- go to Plugins, then Manage and Install Plugins, and download
6. Profile Tool
- select Plugins, Profile Tool, Terrain Profile
- highlight DEM layer, then
Add Layerbutton in Profile Tool
- highlight line layer, then choose Options Selection
Selected layerin Profile Tool
- In the Profile view, I have an elevation profile where the Y axis looks to be correct elevation in meters, but the X axis has units 0, .001, .002… to just under maybe .006. WHAT IS THIS? It can’t be meters or kilometers — it doesn’t line up.
- Instead of selecting a line layer, choose Options Selection
Temporary poly line, then draw a line. Same X-axis units
- select Plugins, qProf, qProf
- DEM input: choose
Define source DEMsand select DEM layer
- select Line layer, choose layer, and select line layer
- leave line densify distance at 9.25..e-05 ?
- Read source data
- Calculate profile statistics (notably, it says Profile length: 0.004851)
- Create topographic profile, accept defaults, OK
- chart goes from 0 to just under .005 (so same results as Profile tool)
8. Other notes:
I changed the layers and the project CRS to
EPSG:26910 - NAD83 / UTM zone 10N and got the same results
When I switch to
NAD83/California Zone 1 (ftUS) EPSG 2225 CRS
I get a Profile length: 0.001479
(if I multiply that by 10,000, I get 1479 feet which is .28 mile which is roughly what I expect, but I don’t know if there’s a basis for the correlation)
But I notice the height (y axis) remains in meters, so it’s better not to use this projection.
Changing the project general properties to measure distance in meters (or something else) has no effect on the profile tool.
9. Repeat the question: What are the X units in the QGIS Profile Tool? How can I change them to meters, kilometers, or miles?