<?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: ArcyPy: Select By Location with no selection_type and using invert_spatial_relationship in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcypy-select-by-location-with-no-selection-type/m-p/513555#M40326</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All i needed to do was omit the two parameters I was not using: Search Distance and Selection Type.&lt;/P&gt;&lt;P&gt;See below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GeoChanges = arcpy.SelectLayerByLocation_management(LaterSOIselection, "ARE_IDENTICAL_TO", EarlierSOIselection, " ", " ", "INVERT")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Jan 2018 22:38:47 GMT</pubDate>
    <dc:creator>PhilBeilin1</dc:creator>
    <dc:date>2018-01-03T22:38:47Z</dc:date>
    <item>
      <title>ArcyPy: Select By Location with no selection_type and using invert_spatial_relationship</title>
      <link>https://community.esri.com/t5/python-questions/arcypy-select-by-location-with-no-selection-type/m-p/513552#M40323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want my script to find geometry changes in 2 parcel datasets of differing months. To do this manually I used Select by Location on the earlier dataset using the later dataset using the "are identical to the source layer feature" option. Once the identical features are selected i invert the selection to find my geometry changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to get this done using python snippet below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GeometryChanges = arcpy.SelectLayerByLocation_management(LaterParcelDataset, "ARE_IDENTICAL_TO", EarlierParcelDatset, 0, "NEW_SELECTION", "INVERT")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives me inaccurate results and I'm pretty sure this is because I have {selection_type} set as "NEW_SELECTION" but if I remove it I get an error. Esri's documentation says this:&lt;/P&gt;&lt;P&gt;INVERT —The result of the query will be inverted. If a selection_type option is used, the inversion occurs before the selection is combined with existing selections&lt;BR /&gt;So I'm totally confused on how to continue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 00:07:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcypy-select-by-location-with-no-selection-type/m-p/513552#M40323</guid>
      <dc:creator>PhilBeilin1</dc:creator>
      <dc:date>2018-01-03T00:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: ArcyPy: Select By Location with no selection_type and using invert_spatial_relationship</title>
      <link>https://community.esri.com/t5/python-questions/arcypy-select-by-location-with-no-selection-type/m-p/513553#M40324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;from the help&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4d4d4d; font-family: 'Lucida Grande','Segoe UI','Arial',sans-serif; font-size: 13.93px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;SWITCH_SELECTION —Switches the selection. All records that were selected are removed from the selection, and all records that were not selected are added to the selection. The &lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #4d4d4d; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,&amp;amp;quot;courier new&amp;amp;quot;,courier,monospace; font-size: 13.93px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;select_features&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4d4d4d; font-family: 'Lucida Grande','Segoe UI','Arial',sans-serif; font-size: 13.93px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt; and &lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #4d4d4d; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,&amp;amp;quot;courier new&amp;amp;quot;,courier,monospace; font-size: 13.93px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;overlap_type&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4d4d4d; font-family: 'Lucida Grande','Segoe UI','Arial',sans-serif; font-size: 13.93px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt; parameters are ignored when this option is selected. &lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then this one&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4d4d4d; font-family: 'Lucida Grande','Segoe UI','Arial',sans-serif; font-size: 13.93px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;INVERT —The result of the query will be inverted. If the &lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #4d4d4d; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;andale mono&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,&amp;amp;quot;monaco&amp;amp;quot;,&amp;amp;quot;courier new&amp;amp;quot;,courier,monospace; font-size: 13.93px; font-style: normal; font-variant: normal; font-weight: bold; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;selection_type&lt;/SPAN&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4d4d4d; font-family: 'Lucida Grande','Segoe UI','Arial',sans-serif; font-size: 13.93px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt; option is used, the inversion occurs before the selection is combined with existing selections. &lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which makes it sound like you do a select by location with new selection first with the two feature classes, then run it again removing the selector file (since it is optional) and just invert the selection.&lt;/P&gt;&lt;P&gt;Don't have time to try, but it looks confusing that .... combined with existing selection ...&lt;/P&gt;&lt;P&gt;Does that mean if you don't specify a selection type then the inversion is done right???&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;don't have anything to test, but try the two liner approach first, splitting the SBL into two steps if it doesn't work in one go (which it should)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 03:36:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcypy-select-by-location-with-no-selection-type/m-p/513553#M40324</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-01-03T03:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: ArcyPy: Select By Location with no selection_type and using invert_spatial_relationship</title>
      <link>https://community.esri.com/t5/python-questions/arcypy-select-by-location-with-no-selection-type/m-p/513554#M40325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"NEW_SELECTION" with "INVERT" is probably the setting you would want.&amp;nbsp; When you "remove it" and get an error, are you selecting another option, like "ADD_TO_SELECTION" (this defaults to new selection when omitted)?&amp;nbsp; Have you tried to set the search distance to something other than 0? Or just omitting it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, can you elaborate on the inaccurate results.&amp;nbsp; Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 03:51:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcypy-select-by-location-with-no-selection-type/m-p/513554#M40325</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2018-01-03T03:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: ArcyPy: Select By Location with no selection_type and using invert_spatial_relationship</title>
      <link>https://community.esri.com/t5/python-questions/arcypy-select-by-location-with-no-selection-type/m-p/513555#M40326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All i needed to do was omit the two parameters I was not using: Search Distance and Selection Type.&lt;/P&gt;&lt;P&gt;See below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GeoChanges = arcpy.SelectLayerByLocation_management(LaterSOIselection, "ARE_IDENTICAL_TO", EarlierSOIselection, " ", " ", "INVERT")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jan 2018 22:38:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcypy-select-by-location-with-no-selection-type/m-p/513555#M40326</guid>
      <dc:creator>PhilBeilin1</dc:creator>
      <dc:date>2018-01-03T22:38:47Z</dc:date>
    </item>
  </channel>
</rss>

