Jump to content

interpolation with no elevation data


samifox

Recommended Posts

hi

 

im having a situation where i have a servy plan with no elevation data only numbrical values, 

 

as you can see, for example i have 230.50 as the start elevation point, and 231.00 as the  end elevation, 

for example i need to know the  door elevation 

 

is there a plugin program  that i can use for this?

22-11-2019 07-23-00.jpg

Link to comment
Share on other sites

Normally you would have two well established spot elevations to interpolate between.  That is not the case here so if you did attempt to interpolate between the two contours (231 and 230.50) you will get varying answers.  Are you familiar with interpolation?

Link to comment
Share on other sites

Linear interpolation is usually used to determine elevation from contour lines.  For a simple case like you have with only two contour lines you can do the following.

  1. Move the two contour lines to their respective Z values.
  2. Use LOFT to create a surface between the two contour polylines.
  3. Use the section command followed by YZ then click on the point for which you want to know the elevation.  This will yield the red line in the image below.
  4. Add a point using osnap nearest to the line or use the ID command with nearest to get the coordinates of a point on the section line.

image.thumb.png.bf702a8f2e30141bc0ef2f2e5c27c539.png

  

Link to comment
Share on other sites

The contours appear to me to be totally disconnected with the construction. I would assume that they be original ground level contours, before any construction would have taken place.

 

If they are relevant, I would have thought that eye-balling would give an adequate answer. A 3D line drawn from apexes of the contours and passing through the doorway would give a good result.

Link to comment
Share on other sites

"intertesting but not working . the interpulation look like a stright grid"

What does "not working" mean?  Were you not able to create the surface or the section cut?  If you look at the surface does it appear to be sloping from one contour line to the next?  The change in elevation between the two contour line is only 6".  The actual terrain could have a variety of shapes between the 2 contour lines.  Autodesk's Civil 3D would create a TIN (Triangulated Irregular Network) between contour lines which is a linear interpolation.  For your sample problem using LOFT will yield the same result as using a TIN.  In the image below a box at z=  220 was added to help visualize the shape. 

  image.png.d3dc750ab6584bfac013085260a54649.png

image.png.17e891dce076568181b833e9c2113f7a.png

 

 

 

image.png

image.png

Edited by lrm
Link to comment
Share on other sites

You could also just work in 2D to get the elevation by creating an xline through the point and taking the ratio of the distance from the lower contour line to the door and divide it by the distance between contour lines along the xline and multiply that by the difference in elevation of the two contour lines (0.5 ft) plus the elevation of the lower contour line

 

For example, 8.3588/13.8990 * 0.5 + 230.5 = 230.80 ft.

 image.png.1739cb37d8badbc177bc9ee4b071f310.png

 

Using a different xline yields: 8.115/14.6155 * 0.5 + 230.5 = 230.78

a difference of 1/4 inch. Well within tolerance for terrain. 

image.png.8d2edb6cd85106405fc1ec59cc436960.png

Link to comment
Share on other sites

thans irmimage.thumb.png.6a3ad46c083c3b754e0a65c663b94c66.png

 

i have lots of elevations i need to know with a cilck of a point, so this proccess wont work

 

if we look on that image , we see few elevation

what is the math needed to find the approximate red circle elevation?

Link to comment
Share on other sites

With that set of individual spot heights, without any reference to the shape of the land surface, you would be in deep trouble if you go for a purely mathematical solution.

 

Where are the fault lines?

Link to comment
Share on other sites

The mathematical solution was demonstrated in a previous post by IRM.  I think you would arrive at a different answer depending on which two elevations are used.

Link to comment
Share on other sites

As noted in my previous post, the common method for determining elevation values from a series of points or contour lines is to create a TIN. Civil 3D includes a feature to create a TIN from a set f 3D points or contour lines with appropriate z values.  A TIN assumes linear interpolation between points when creating the 3D Faces (triangular planes).  For example, your set of points might be subdivided into 3d faces as follows:

 image.png.27bb0affffc360ed6e3370367f06ec3d.png

or like this:

image.png.6884c21138452daaf422b0ec91985296.png

Either way you would get a similar value for the z coordinate of your red circle.

 

If you do not have access to Civil 3D you can use the following LISP program to find the z coordinate of a point given three 3D points and a 4th point that you want projected (in the z direction) to the plane defined by the 3 points.

 

Load the following program and give the "elz" command.

 

For geometry similar to your example the elevation of the red circle was found to be 9.77. 

image.png.78f16fb94e6806bd783c3e8725a21317.png

(defun c:elz (/ p1 p2 p3 p v12 v13 norm d un a paz pt )
; calculates the elevation of a point projected in the z direction
; onto a plane defined by three points.  
; LRM  11/26/2019
;  
(setq p1   (getpoint "\nPoint #1")
      p2   (getpoint p1 "\nPoint #2")
      p3   (getpoint p2 "\nPoint #3")
      p	   (getpoint "\nPoint to find elevation")
      v12  (mapcar '- p2 p1)
      v13  (mapcar '- p3 p1)
      norm (cross v12 v13)
      d	   (distance '(0 0 0) norm)
      un   (mapcar '/ norm (list d d d))
) 
(setq d (dot un p1)) ; distance to plane
(setq a (* -1 (+ (* (nth 0 un) (nth 0 p)) (* (nth 1 un) (nth 1 p)) (* -1 d))))
(setq paz (/ a (nth 2 un)))
  (princ "\nPoint coordinates: x = "  ) (princ (nth 0 p))
(princ ", y = ")(princ (nth 1 p))
(princ ", z = ")(princ paz)
(setq pt (list (nth 0 p) (nth 1 p) paz))
;;(command "_point" pt )  
(princ)   
) 

;;; Compute the dot product of 2 vectors a and b
(defun dot (a b / dd)
  (setq dd (mapcar '* a b))
  (setq dd (+ (nth 0 dd) (nth 1 dd) (nth 2 dd)))
)

;;; cross product of 2 vectors a and b
(defun cross (a b / crs)
  (setq	crs (list
	      (- (* (nth 1 a) (nth 2 b))
		 (* (nth 1 b) (nth 2 a))
	      )
	      (- (* (nth 0 b) (nth 2 a))
		 (* (nth 0 a) (nth 2 b))
	      )
	      (- (* (nth 0 a) (nth 1 b))
		 (* (nth 0 b) (nth 1 a))
	      )
	    )				;end list
  )					;end setq crs
)					;end cross

point_on_plane.zip

 

 

Link to comment
Share on other sites

I don't think that all possible solutions have been explored.

 

If the TIN has feature (valley or ridge) breaks, then the results can differ by over 0.5m.

 

The diagrams below show what I consider to be extreme scenarios. Either could be correct.

 

 

Ridge level.PNG

Valley level.PNG

Link to comment
Share on other sites

Of course with sparse point data it is possible that anything can happened between the points.  You could have a mountain peak or sink hole, or as you noted a ridge, at the red circle location. As noted, a TIN assumes a linear interpolation between points which may not be representative of the true surface.  Guessing that a ridge exists might be appropriate but would probably be based on additional information which was not initially provided. What happens between the data points is only a guess.  With the limited data provided a linear interpolation is a suitable guess.   

Link to comment
Share on other sites

1 hour ago, lrm said:

Of course with sparse point data it is possible that anything can happened between the points.....

 

That was the point I was trying to make earlier. I take nothing away from your excellent solution, but I did not want the OP to think lisp was the sole solution that magically gave the proper answer even when used out of context.

Edited by eldon
more thoughts
Link to comment
Share on other sites

Eldon your right I have spent to many years playing with TIN's Triangular Irregular Network, you are correct that a ridge line would be added as a breakline to a tin model a 2nd pass update. The shape shown has maybe 3 different patterns before adding the breakline.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...