<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Sight lines and intervisibility in Python script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/sight-lines-and-intervisibility-in-python-script/m-p/249166#M19253</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to run several tools in a stand-alone Python script. The steps that I want to implement are the follow:&lt;/P&gt;&lt;P&gt;- load a point (observer points) and a building (target)&amp;nbsp;shapefiles.&lt;/P&gt;&lt;P&gt;- construct sight lines from each observer-point to each building, considering the height of the buildings&lt;/P&gt;&lt;P&gt;- extrude the buildings based on their max height&lt;/P&gt;&lt;P&gt;- use the same buildings, extruded, to check whether each &lt;SPAN&gt;sight lines&lt;/SPAN&gt; ha actually visibility or whether is obstructed (intervisibility analysis).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have issues in constructing the &lt;SPAN&gt;sight lines&lt;/SPAN&gt;. However, even though the following intervisibility method, applied to those lines, is successful, each line results visible. Do you have any suggestion? It looks like at the end the buildings are not extruded at all. I know that I may implement these steps manually, but I do prefer to have everything running from a stand-alone scripts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;arcpy.env.workspace = "../Outputs/tmp"&lt;/P&gt;&lt;P&gt;arcpy.CheckOutExtension("3D")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;observer_points = "nodes_copy.shp"&lt;BR /&gt;buildings = "buildingsBase.shp"&lt;BR /&gt;sightlines_file ="sightlines.shp"&lt;BR /&gt;height_observer = "height"&amp;nbsp;&lt;BR /&gt;heigth_buildings = "height"&lt;BR /&gt;join_field = None&lt;BR /&gt;sampling = 10&lt;BR /&gt;direction = "NOT_OUTPUT_THE_DIRECTION"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;transforming shapefile in layer, extrude it and save it as 3d feature class&lt;/P&gt;&lt;P&gt;buildings_layer = arcpy.MakeFeatureLayer_management(buildings, "as_layer").getOutput(0)&lt;BR /&gt;buildings_layer.extrusion("BASE_HEIGHT", "height")&lt;BR /&gt;arcpy.Layer3DToFeatureClass_3d(buildings_layer, "buildings_extruded")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#sight lines&lt;BR /&gt;arcpy.ddd.ConstructSightLines(observer_points, buildings, sightlines_file,&lt;BR /&gt; height_observer, heigth_buildings, join_field, sampling, direction)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#intervisibility&lt;BR /&gt;arcpy.ddd.Intervisibility(sightlines_file, obstructions= "buildings_extruded.shp", visible_field="Visibility")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2018 14:03:55 GMT</pubDate>
    <dc:creator>GabrieleFilomena</dc:creator>
    <dc:date>2018-03-28T14:03:55Z</dc:date>
    <item>
      <title>Sight lines and intervisibility in Python script</title>
      <link>https://community.esri.com/t5/python-questions/sight-lines-and-intervisibility-in-python-script/m-p/249166#M19253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to run several tools in a stand-alone Python script. The steps that I want to implement are the follow:&lt;/P&gt;&lt;P&gt;- load a point (observer points) and a building (target)&amp;nbsp;shapefiles.&lt;/P&gt;&lt;P&gt;- construct sight lines from each observer-point to each building, considering the height of the buildings&lt;/P&gt;&lt;P&gt;- extrude the buildings based on their max height&lt;/P&gt;&lt;P&gt;- use the same buildings, extruded, to check whether each &lt;SPAN&gt;sight lines&lt;/SPAN&gt; ha actually visibility or whether is obstructed (intervisibility analysis).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't have issues in constructing the &lt;SPAN&gt;sight lines&lt;/SPAN&gt;. However, even though the following intervisibility method, applied to those lines, is successful, each line results visible. Do you have any suggestion? It looks like at the end the buildings are not extruded at all. I know that I may implement these steps manually, but I do prefer to have everything running from a stand-alone scripts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;arcpy.env.workspace = "../Outputs/tmp"&lt;/P&gt;&lt;P&gt;arcpy.CheckOutExtension("3D")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;observer_points = "nodes_copy.shp"&lt;BR /&gt;buildings = "buildingsBase.shp"&lt;BR /&gt;sightlines_file ="sightlines.shp"&lt;BR /&gt;height_observer = "height"&amp;nbsp;&lt;BR /&gt;heigth_buildings = "height"&lt;BR /&gt;join_field = None&lt;BR /&gt;sampling = 10&lt;BR /&gt;direction = "NOT_OUTPUT_THE_DIRECTION"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#&amp;nbsp;transforming shapefile in layer, extrude it and save it as 3d feature class&lt;/P&gt;&lt;P&gt;buildings_layer = arcpy.MakeFeatureLayer_management(buildings, "as_layer").getOutput(0)&lt;BR /&gt;buildings_layer.extrusion("BASE_HEIGHT", "height")&lt;BR /&gt;arcpy.Layer3DToFeatureClass_3d(buildings_layer, "buildings_extruded")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#sight lines&lt;BR /&gt;arcpy.ddd.ConstructSightLines(observer_points, buildings, sightlines_file,&lt;BR /&gt; height_observer, heigth_buildings, join_field, sampling, direction)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#intervisibility&lt;BR /&gt;arcpy.ddd.Intervisibility(sightlines_file, obstructions= "buildings_extruded.shp", visible_field="Visibility")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2018 14:03:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/sight-lines-and-intervisibility-in-python-script/m-p/249166#M19253</guid>
      <dc:creator>GabrieleFilomena</dc:creator>
      <dc:date>2018-03-28T14:03:55Z</dc:date>
    </item>
  </channel>
</rss>

