<?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: Using Modelbuilder for a Monte Carlo Process in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/using-modelbuilder-for-a-monte-carlo-process/m-p/19769#M714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your responses so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what I mean when I talk about the line. I need to know when it falls completely within the polygon. Here is an example of a census tract I picked from Ohio:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]34140[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In that image, the line drawn between two points falls completely within the polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Below, they do not:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]34141[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 May 2014 16:24:09 GMT</pubDate>
    <dc:creator>EricShehadi</dc:creator>
    <dc:date>2014-05-28T16:24:09Z</dc:date>
    <item>
      <title>Using Modelbuilder for a Monte Carlo Process</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-modelbuilder-for-a-monte-carlo-process/m-p/19766#M711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to create a model or write a script that will complete the following geoprocess:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I have a layer of polygons, I need to place two random points in each polygon, create a line from those two points, and then check if that line falls within the polygon or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using ModelBuilder, and I am able to build a model that will create two random points within each polygon and then create a line between them. I am confident that I can figure out how to do the spatial join, but I am not sure how to use that to give me an output that essentially counts if it is inside the polygon or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am unsure how to correctly set up the for - function and collecting the output data that I need. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pseudocode:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for i=1 to 10000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create two random points inside each polygon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Create line between those two points&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Check if line falls completely within the polygon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Keep a count for each polygon if the line falls within polygon or not for each round through the loop&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;end&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I figured I would ask if anyone had any examples they might be able to share that accomplished something similar, or if anyone had any suggestions as to how to build this model. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Much appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 14:38:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-modelbuilder-for-a-monte-carlo-process/m-p/19766#M711</guid>
      <dc:creator>EricShehadi</dc:creator>
      <dc:date>2014-05-28T14:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using Modelbuilder for a Monte Carlo Process</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-modelbuilder-for-a-monte-carlo-process/m-p/19767#M712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Eric,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You say you create 2 random points in each polygon then create line between them. Under what scenario would that line actually be outside the polygon? I could see a scenario of a line partially in a polygon (e.g. donut polygon) but both ends would be in the polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you upload a sketch of what of a true and false scenario you are trying to test? It's not clear what you asking as your pseudo code appears to contradict your description?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 15:31:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-modelbuilder-for-a-monte-carlo-process/m-p/19767#M712</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2014-05-28T15:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using Modelbuilder for a Monte Carlo Process</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-modelbuilder-for-a-monte-carlo-process/m-p/19768#M713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If your scenario is something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]34135[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I would first use the Feature Vertices to points to extract one end of the line this can then be used to do a spatial join with your polygons. Having assigned the polygon ID to the point you spatial join that back to the polyline. This guarantees the correct ID for the line. You use that to quality control your output. Then its just an intersect tool with output set to LINE. If your line ID's are duplicated then you must be passing out/into the polygon.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 15:58:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-modelbuilder-for-a-monte-carlo-process/m-p/19768#M713</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2014-05-28T15:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using Modelbuilder for a Monte Carlo Process</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-modelbuilder-for-a-monte-carlo-process/m-p/19769#M714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your responses so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is what I mean when I talk about the line. I need to know when it falls completely within the polygon. Here is an example of a census tract I picked from Ohio:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]34140[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In that image, the line drawn between two points falls completely within the polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Below, they do not:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]34141[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 16:24:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-modelbuilder-for-a-monte-carlo-process/m-p/19769#M714</guid>
      <dc:creator>EricShehadi</dc:creator>
      <dc:date>2014-05-28T16:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using Modelbuilder for a Monte Carlo Process</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-modelbuilder-for-a-monte-carlo-process/m-p/19770#M715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you do a Select By Location specifying where the line is completely within the polygon? I don't work much with ModelBuilder, but that's what I'd do manually.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 18:32:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-modelbuilder-for-a-monte-carlo-process/m-p/19770#M715</guid>
      <dc:creator>Zeke</dc:creator>
      <dc:date>2014-05-28T18:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using Modelbuilder for a Monte Carlo Process</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/using-modelbuilder-for-a-monte-carlo-process/m-p/19771#M716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know how to do a select by location of that nature - but is there a way to do it so that I get an output whether or not is was successfully able to select the line in question?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much for your input!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 19:11:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/using-modelbuilder-for-a-monte-carlo-process/m-p/19771#M716</guid>
      <dc:creator>EricShehadi</dc:creator>
      <dc:date>2014-05-28T19:11:01Z</dc:date>
    </item>
  </channel>
</rss>

