Select to view content in your preferred language

Intersect 3d line with a raster surface

6241
10
05-18-2011 08:52 PM
JustinFischer
Emerging Contributor
I have created a raster surface that is made up of elevation (z) values.  I also have pts  with z values that fall above and below this 3d surface.  These are consecutive pts that in certain instances pt 1 may be below the raster surface and pt 2 may be above.  What I need to do is connect these pts (and many others) with a line and find out where that line intersects the raster surface and extract that raster value for that cell.

Any help would be much appreciated.

Justin
Tags (1)
0 Kudos
10 Replies
EricRice
Esri Regular Contributor
Justin,

There are a couple of approaches you can consider. Line of Sight analysis (LOS), or Intersect 3D Line with Multipatch tool.  I think LOS is easier but doesn't work well with vertical lines.  If you connect your points and the resulting line is vertical, consider option 2.  Both workflows are outlined below.

LOS
1. Run Construct Sight Lines tool to create lines from your points.  You'll probably need a join field to ensure the right points get connected.
2. Run Line of Sight tool with raster surface and newly created lines.  Be sure to fill in the parameter for Output Obstruction Point Feature Class as this will be where the line actually hits the surface.
3. Take the obstruction points and run Add Z Information tool using the elevation raster as the surface.  You'll get an attribute of Z containing the surface height at that location.

Intersect 3D Line with Multipatch
1. Construct your sight lines as per above.
2. Convert your raster to a TIN.
3. Create a polygon that is big enough to contain all your points.  Hopefully this polygon won't have to cover the full extent of the raster.
4. Run Interpolate Polygon to Multipatch.  This tool requires a TIN surface (Hence step 2).
5. Intersect your sight lines with the multipatch using Intersect 3D Line with Multipatch tool.
6. With resulting points, run Add Z Information tool.

In the screenshots below, note that what appears to be a raster or TIN surface is actually the multipatch feature class I created.  Because I used a small example I was able to make my entire surface a multipatch.  I recommend minimizing your polygon to just the extent of the points if you have a large raster in terms of its extent.

Regards,
Eric
0 Kudos
JustinFischer
Emerging Contributor
Eric,

Thanks so much for the response.  Unfortunately, it has taken me this long to get back to this project.  It seems that I am stuck at the 'Construct Sight Lines' process, which is needed for each of the workflows you state below.  I have gotten it to work for only 2 points, the observer point and then the target point.  But the way my point files are set up is that I may have 100-200 pts per file.  The point files are sorted ascending based on date/time.  So what I need is to see if the newly created line connecting points 1 and 2 crosses my elevational surface.  Next I need to see if the newly created line connecting points 2 and 3 crosses my elevational surface, and so forth.  Is this possible?  And FYI, pretty sure that none of the points will result in vertical line files.   Thanks.

Justin
0 Kudos
EricRice
Esri Regular Contributor
Hi Justin,

I will get to how to manage the points, but I want to first suggest you download and install 10.1 Beta.  There is a new tool called Intersect 3D Line with Surface that greatly enhances the workflow I previously outlined.  Mainly you don't have to do steps 2 - 6 in the previous directions listed under "Intersect 3D Line with Multipatch".

You obviously don't have to do this, but you'd get to see some of the other new stuff and we always appreciate an opportunity to get feedback on new tools.

As for the points...  Are your input features and target features in Construct Site Lines the same?  It sounds like they are.  It seems like you want to connect record 1 to record 2 and record 2 to record 3 recursivley until all connections have been made.  Is this correct?  Is the data sorted by date/time because you opened the table and told it to sort on your date/time field, or is that how the data entry was actually done?  In other words, is FID/OID of 1, the record at the top when going by date/time?  If you could send a small subset of the  data (just 5 records)that would be easiest for me to understand the structure and get on the same page as you.  Also, it might help to know your license level, since some of the tricks up my sleave often require an ArcInfo license. 

If the data is in a single feature class and you need to 2 point lines from one record to the next I think we can accomplish that with the Points to Line tool and follow it up with Split Line at Vertices so that each line segment becomes its own record.  I'll know more when you get back to me.  If you can't send a subset, could you take some screenshots and send responses to my inquiries.

Thanks,
Eric
0 Kudos
JustinFischer
Emerging Contributor
Eric,

Sorry again for the delay.  I haven't had time to experiment with 10.1, but will try to get it installed later this week.  You are correct in that the input features and target features in Construct Lines are the same and yes I need to connect pts 1 to 2, 2 to 3, 3 to 4, etc.  The data was sorted in the original Excel file (raw data table).  I  also added a 'sort_ID' field to this table so I can always make sure it is sorted correctly.  Attached is an Excel file with 5 consectutive points.

And my license type is ArcInfo.

Thanks for all your help.

Justin
0 Kudos
TeriAnderson
New Contributor
Though this is a very old post, I was wondering if there was a way to do this in ArcEditor 9.3.2. I've got the visualization working well enough but I'd really like to be able to get the intersection points for my 3D lines and my surface. Thank you.
0 Kudos
EricRice
Esri Regular Contributor
Justin

Forget the Construct Site Lines tool.  All we need to do is run Points to Line (using your Sort ID field as the Sort Field parameter), and Splite Line at Vertices.  I do want to point out your original points are in geographic coordinates, and the z value (altitude?) is definitely not in units of DD.  So what I did was make an assumption that altitude was meters, and projected the points to UTM meters so that x,y,z were all the same units.  Then I created the lines and split them so each would be a unique record.

The attached zip file has the lines for you to check.

Eric
0 Kudos
EricRice
Esri Regular Contributor
Though this is a very old post, I was wondering if there was a way to do this in ArcEditor 9.3.2. I've got the visualization working well enough but I'd really like to be able to get the intersection points for my 3D lines and my surface. Thank you.


See the LOS workflow above.  Intersecting 3d lines with multipatches is new at 10.0, and intersecting 3d lines directly to surfaces is coming in 10.1. 

Regards,
Eric
0 Kudos
JustinFischer
Emerging Contributor
Eric,

I tried your method and the output from the Intersect 3D line with Multipatch Tool has no pts (or lines if I select this option), just an empty attribute table. 
As per your earlier instructions:
*I created lines using the pts to lines tool (with the Sort ID field and projected all data to UTM and then split the lines at the vertices
*I converted my raster grid file to a tin
*Created a polygon that encompassed all my pts
* And finally ran the Interpolate Polygon to Multipatch tool using the new tin

Hopefully this is just user error.   

I also can't seem to diplay your attached shapefile.  I get an 'Error opening feature class'.  I am also working on getting 10.0 beta installed.

Any thoughts?  Thanks,

Justin

Justin

Forget the Construct Site Lines tool.  All we need to do is run Points to Line (using your Sort ID field as the Sort Field parameter), and Splite Line at Vertices.  I do want to point out your original points are in geographic coordinates, and the z value (altitude?) is definitely not in units of DD.  So what I did was make an assumption that altitude was meters, and projected the points to UTM meters so that x,y,z were all the same units.  Then I created the lines and split them so each would be a unique record.

The attached zip file has the lines for you to check.

Eric
0 Kudos
EricRice
Esri Regular Contributor
Hi Justin,

I forgot the .shx part of the shapefile.  I reposted a fixed zip back in that old post.  It should work now.  Sorry.

When you created the points did you specify the Z value so the resulting points were PointZ?  The lines will then be PolylineZ.  If you didn't start with 3d points, then the lines would just be 2d also, and will not intersect the surface (multipatch). When you display the lines in ArcScene are they 3d? Do they visually intersect the surface? Can you send screenshots?

Do you have a maintenance contract with us so you can call Esri Support?  All of the analyst are familiar with doing this type of intersection. 

Regards,
Eric