<?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 Re: Adding impedance to edge of road net work data set from another shapefile 'z' val in ArcGIS Network Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-impedance-to-edge-of-road-net-work-data-set/m-p/250000#M2501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In order to add the appropriate z value as impedance, you will have to first transfer the Z value from the shape field to a regular field (most likely of type double) in your streets shapefile. Then in your network dataset, you can create a network cost attribute based on this field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are multiple ways to transfer the Z value from shape field to an attribute. Before suggesting them, I would want to know&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;What ArcGIS version you are using?&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Do you also have a license for 3D Analyst Extension?&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Does your lines have the same Z value for all vertices that make up a line? If not, then do you want to store mean Z, or max Z or min Z for each line? &lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Deelesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Aug 2010 23:28:07 GMT</pubDate>
    <dc:creator>DeeleshMandloi</dc:creator>
    <dc:date>2010-08-18T23:28:07Z</dc:date>
    <item>
      <title>Adding impedance to edge of road net work data set from another shapefile 'z' value</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-impedance-to-edge-of-road-net-work-data-set/m-p/249999#M2500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am looking for an optimum path where road/edge impedance is a variable and that is available in shape file formate (x(longitude),y(latitude),z(value)). I want to add z value to network data set as impedance. Kindly help me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 17:33:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-impedance-to-edge-of-road-net-work-data-set/m-p/249999#M2500</guid>
      <dc:creator>jisjose</dc:creator>
      <dc:date>2010-08-17T17:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Adding impedance to edge of road net work data set from another shapefile 'z' val</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-impedance-to-edge-of-road-net-work-data-set/m-p/250000#M2501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In order to add the appropriate z value as impedance, you will have to first transfer the Z value from the shape field to a regular field (most likely of type double) in your streets shapefile. Then in your network dataset, you can create a network cost attribute based on this field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are multiple ways to transfer the Z value from shape field to an attribute. Before suggesting them, I would want to know&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;What ArcGIS version you are using?&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Do you also have a license for 3D Analyst Extension?&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Does your lines have the same Z value for all vertices that make up a line? If not, then do you want to store mean Z, or max Z or min Z for each line? &lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Deelesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 23:28:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-impedance-to-edge-of-road-net-work-data-set/m-p/250000#M2501</guid>
      <dc:creator>DeeleshMandloi</dc:creator>
      <dc:date>2010-08-18T23:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Adding impedance to edge of road net work data set from another shapefile 'z' val</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-impedance-to-edge-of-road-net-work-data-set/m-p/250001#M2502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In order to add the appropriate z value as impedance, you will have to first transfer the Z value from the shape field to a regular field (most likely of type double) in your streets shapefile. Then in your network dataset, you can create a network cost attribute based on this field.&lt;BR /&gt;&lt;BR /&gt;There are multiple ways to transfer the Z value from shape field to an attribute. Before suggesting them, I would want to know&lt;BR /&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;What ArcGIS version you are using?&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Do you also have a license for 3D Analyst Extension?&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Does your lines have the same Z value for all vertices that make up a line? If not, then do you want to store mean Z, or max Z or min Z for each line? &lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt; &lt;BR /&gt;&lt;BR /&gt;Deelesh&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Deelesh for reply&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My ArcGIS version is 9.1 and have license for 3D Analyst Extension.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Z value is not constant and it is a function of latitude and longitude.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to store average z which are near to the road segment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Romal&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Aug 2010 05:05:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-impedance-to-edge-of-road-net-work-data-set/m-p/250001#M2502</guid>
      <dc:creator>jisjose</dc:creator>
      <dc:date>2010-08-19T05:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Adding impedance to edge of road net work data set from another shapefile 'z' val</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-impedance-to-edge-of-road-net-work-data-set/m-p/250002#M2503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here are the steps to add the average Z value for each street as an attribute. You will have to unzip the MeanZ.zip file to get the MeanZ.cal field calculator expression file. &lt;/SPAN&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Add a new field called "AverageZ" of type Double to your line shapefile&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Right-Click the field and select "Calculate Values"&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;In the Field Calculator dialog, Click the Load button and browse to the&amp;nbsp; MeanZ.cal expression file.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;This will load the VBA script that does the calculations to determine average Z. Click OK to run the script. &lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;SPAN&gt;The script is getting the Z values from each vertex that make up a line and then calculating the average z value.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script's VBA code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim meanZ as Double
Dim totalZ as Double
Dim pointCount as Double
Dim pLine as IPointCollection
Dim pPoint as IPoint
Dim i as Integer
Set pLine = [Shape]
pointCount = pLine.PointCount
For i = 0 to pointCount -1
&amp;nbsp;&amp;nbsp; set pPoint = pLine.Point(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp; totalZ = totalZ + pPoint.Z
Next 
meanZ = totalZ / pointCount
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;For others that might come across this thread, Field Calculator at ArcGIS 10 no longer supports the ability to run VBA scripts. So this same workflow can be achieved by writing a python script or by using the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Add_Z_Information/00q90000005z000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;Add Z information&lt;/A&gt;&lt;SPAN&gt; geoprocessing tool available with 3D Analyst Extension.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Deelesh&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:25:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-impedance-to-edge-of-road-net-work-data-set/m-p/250002#M2503</guid>
      <dc:creator>DeeleshMandloi</dc:creator>
      <dc:date>2021-12-11T12:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Adding impedance to edge of road net work data set from another shapefile 'z' val</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-impedance-to-edge-of-road-net-work-data-set/m-p/250003#M2504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Here are the steps to add the average Z value for each street as an attribute. You will have to unzip the MeanZ.zip file to get the MeanZ.cal field calculator expression file. &lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Add a new field called "AverageZ" of type Double to your line shapefile&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;Right-Click the field and select "Calculate Values"&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;In the Field Calculator dialog, Click the Load button and browse to the&amp;nbsp; MeanZ.cal expression file.&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;This will load the VBA script that does the calculations to determine average Z. Click OK to run the script. &lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;The script is getting the Z values from each vertex that make up a line and then calculating the average z value.&lt;BR /&gt;&lt;BR /&gt;The script's VBA code&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim meanZ as Double
Dim totalZ as Double
Dim pointCount as Double
Dim pLine as IPointCollection
Dim pPoint as IPoint
Dim i as Integer
Set pLine = [Shape]
pointCount = pLine.PointCount
For i = 0 to pointCount -1
&amp;nbsp;&amp;nbsp; set pPoint = pLine.Point(i)
&amp;nbsp;&amp;nbsp;&amp;nbsp; totalZ = totalZ + pPoint.Z
Next 
meanZ = totalZ / pointCount
&lt;/PRE&gt;&lt;BR /&gt;For others that might come across this thread, Field Calculator at ArcGIS 10 no longer supports the ability to run VBA scripts. So this same workflow can be achieved by writing a python script or by using the &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Add_Z_Information/00q90000005z000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;Add Z information&lt;/A&gt; geoprocessing tool available with 3D Analyst Extension.&lt;BR /&gt;&lt;BR /&gt;Deelesh&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Deelesh &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The code gives an error message "User Interrupt" . &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Z values are in another shapefile/table .I want to calculate average Z value from the nearest Z values lying on either side of street and assign the average Z value to the street (another shape file)as attribute.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:25:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/adding-impedance-to-edge-of-road-net-work-data-set/m-p/250003#M2504</guid>
      <dc:creator>jisjose</dc:creator>
      <dc:date>2021-12-11T12:25:38Z</dc:date>
    </item>
  </channel>
</rss>

