I got a shapefile with contours, but no elevation data is present. We can assume as known info, that the contours mark elevations at known steps (say, 20 m). Is it still possible to restore the elevation information and build the DEM model of relief, assigning arbitrarily the 0 elevation value to some starting contour? (either in ArcMap, or in QGis/Grass)

  • You'd need ancillary information to make this possible, otherwise there'd be a very large number of potential assignments (starting with 0,20,0,20,..). – Vince Dec 11 '15 at 22:30
  • Which GIS software are you more likely to use to try and do this? Asking for multiple options in one question makes this too broad. – PolyGeo Dec 11 '15 at 22:34
  • I would do this in Qgis (2.4, 2.8) under Linux as first option, but ArcMap (10.2 Desktop) is OK as well.Should I rather split this question to ask separately for solutions in qgis and ArcMap? – astrsk Dec 11 '15 at 22:39
  • 1
    You could split them at the outset but I would research/ask about your preferred option first because an answer to that may enable you to find the answer for the other for yourself. – PolyGeo Dec 11 '15 at 22:56
  • 1
    If you were really lucky and the lines were sortable by some attribute (even their OID) that was in the same order as increasing or decreasing elevation value, maybe you could auto-increment a new z field. But the odds are heavily against this working. More likely you'd have to manually assign a z value to each line, one at a time (especially if there are sinks or ridges). It should be relatively easy to write a script that fills in an attribute with an incrementing value for each select/assign, select next. Or at least it sounds like it should be, to someone who doesn't script. – Chris W Dec 12 '15 at 19:05

One solution would be to convert your contours into points at a certain interval (I'm not sure how to select the interval objectively) and do a co-kriging interpolation, using an auxilary layer like a remotely sensed image of the area or other closely related variable with elevation (land cover might do too).

  • Don't we loose our last chance to even guess the elevation values by turning the lines into points? – underdark Dec 12 '15 at 17:44
  • @underdark not really, assuming the points retain an attribute that links them to their source line. Even if they don't, an intersect or similar overlay operation could create/restore one. Whether points or lines, the z values have to be taken from some ancillary source or assigned, so converting the lines to points really has more to do with the method you use for that step (ie point sampling, spatial joining, or overlay operation). – Chris W Dec 12 '15 at 19:13
  • @ChrisW ok, so this answer skips the more interesting part of the question :-) the remainder has been answered multiple times on gis.se – underdark Dec 12 '15 at 20:20
  • 2
    @underdark Eh, depends on your definition of interesting. :) I'd certainly agree that manually assigning a z value to a bunch of lines (one possible solution) is definitely uninteresting. The idea of 'co-kriging interpolation' with non-elevation specific ancillary data sounds interesting, but I couldn't say if it were practical, effective, or efficient. But yes, once you have z values on the lines, going to DEM has been covered in several questions. – Chris W Dec 12 '15 at 22:38
  • I agree with @ChrisW. The choice for the point spatial class is for the benefit of the variogram analysis and kriging, with appropriate sampling we shouldn't be losing much information. After we have our points with the elevation from the contour line as z- values, we can either do an IDW as suggested by the previous answer in SE, or we can go a bit further and account for spatial dependency through kriging. It will be even better to randomly select points from the converted point cloud to calculate the semi-variance parameters so that we can capture the spatial auto-correlation pattern. – yanes Dec 12 '15 at 23:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.