<?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: Non-unique primary keys, creating coincident points based on secondary key in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/non-unique-primary-keys-creating-coincident-points/m-p/512304#M17028</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have a point shapefile of survey locations.&amp;nbsp; I also have a table of data corresponding to said survey locations.&amp;nbsp; The problem is that many of these survey points have been surveyed multiple times or with different equipment.&amp;nbsp; Each point has a unique primary key, and in the table, there are multiple entries with that same primary key, but it has another column that serves as a secondary key.&lt;BR /&gt;&lt;BR /&gt;Is there a way to join the point shapefile to the data table by primary key, but make it create duplicate coincident points for each unique secondary key?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Depends on the version of ArcGIS that you have.&amp;nbsp; Prior to 10.1 there were only two ways to do this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alternative 1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Use the Make Query Table tool, which requires that the points and the table reside in the same geodatabase.&amp;nbsp; This output does not refresh from the sources without rerunning the Make Query Table tool and the tool output is not editable without being exported.&amp;nbsp; The exported features are disconnected from the sources and have to be recreated to reflect updates to the sources.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alternative 2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.a.&amp;nbsp; Add two fields to the points that contain the X/Y coordinates&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.b.&amp;nbsp; Use the Geometry Calculator to calculate the actual X/Y values to the fields in each point&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.c.&amp;nbsp; Using the table in Table View Mode (in Model Builder this requires the use of the Make Table View tool) as the source table create a join of the points so that the points are the join table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now you have two options:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.d.1. With the Join in place use the Make X/Y Event Layer tool to use the X/Y coordinate fields of the points to convert the table to an in-memory point feature class.&amp;nbsp; All of the fields of the table and the points will be visible in this layer.&amp;nbsp; Updates to the source points or table directly will become immediately visible in this layer.&amp;nbsp; Edits done to the in-memory layer itself become immediately visible in the source table, but the source points are not editable through this layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.d.2.a&amp;nbsp;&amp;nbsp; Add the same two fields to the table to hold the X/Y coordinate values of the points&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.d.2.b.&amp;nbsp; Use the field calculator to transfer the X/Y coordinates of the points to the table records.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.d.2.c.&amp;nbsp; Remove the join.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.d.2.d.&amp;nbsp; Use the Make X/Y Event Layer tool to make the X/Y coordinates of the table into a in-memory point feature layer.&amp;nbsp; Only the attributes of the table will be visible in this layer.&amp;nbsp; Edits done to the source table are reflected in the in-memory points layer with a simple refressh, but the fields and features of the source points are not editable or visible through this layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.e.&amp;nbsp; Optionally export the in-memory layer to a permanent feature class to make it a permanent point feature class.&amp;nbsp; This is disconnected from the original source tables and needs to be recreated to reflect updates to the sources.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At 10.1 and later you have a 3rd option.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alternative 3 at 10.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp; Like the Make Query Table option, both the points and the table must reside in the same geodatabase.&amp;nbsp; You can just create a join of the points layer without any special coordinate fields to the table using the points as the source and the table as the join. The one-to-many relationship is not visible or editable through the join.&amp;nbsp; But you can export the features to a new point feature class.&amp;nbsp; The export will duplicate records as necessary so that the one-to-many relationship will output a point feature class that has been converted to a one-to-one relationship.&amp;nbsp; This export output is not connected to the source features and has to be recreated to reflect updates to the sources.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Oct 2013 17:54:20 GMT</pubDate>
    <dc:creator>RichardFairhurst</dc:creator>
    <dc:date>2013-10-11T17:54:20Z</dc:date>
    <item>
      <title>Non-unique primary keys, creating coincident points based on secondary key</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/non-unique-primary-keys-creating-coincident-points/m-p/512303#M17027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a point shapefile of survey locations.&amp;nbsp; I also have a table of data corresponding to said survey locations.&amp;nbsp; The problem is that many of these survey points have been surveyed multiple times or with different equipment.&amp;nbsp; Each point has a unique primary key, and in the table, there are multiple entries with that same primary key, but it has another column that serves as a secondary key.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to join the point shapefile to the data table by primary key, but make it create duplicate coincident points for each unique secondary key?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 15:30:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/non-unique-primary-keys-creating-coincident-points/m-p/512303#M17027</guid>
      <dc:creator>IsaacBoates</dc:creator>
      <dc:date>2013-10-11T15:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Non-unique primary keys, creating coincident points based on secondary key</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/non-unique-primary-keys-creating-coincident-points/m-p/512304#M17028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I have a point shapefile of survey locations.&amp;nbsp; I also have a table of data corresponding to said survey locations.&amp;nbsp; The problem is that many of these survey points have been surveyed multiple times or with different equipment.&amp;nbsp; Each point has a unique primary key, and in the table, there are multiple entries with that same primary key, but it has another column that serves as a secondary key.&lt;BR /&gt;&lt;BR /&gt;Is there a way to join the point shapefile to the data table by primary key, but make it create duplicate coincident points for each unique secondary key?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Depends on the version of ArcGIS that you have.&amp;nbsp; Prior to 10.1 there were only two ways to do this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alternative 1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Use the Make Query Table tool, which requires that the points and the table reside in the same geodatabase.&amp;nbsp; This output does not refresh from the sources without rerunning the Make Query Table tool and the tool output is not editable without being exported.&amp;nbsp; The exported features are disconnected from the sources and have to be recreated to reflect updates to the sources.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alternative 2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.a.&amp;nbsp; Add two fields to the points that contain the X/Y coordinates&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.b.&amp;nbsp; Use the Geometry Calculator to calculate the actual X/Y values to the fields in each point&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.c.&amp;nbsp; Using the table in Table View Mode (in Model Builder this requires the use of the Make Table View tool) as the source table create a join of the points so that the points are the join table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now you have two options:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.d.1. With the Join in place use the Make X/Y Event Layer tool to use the X/Y coordinate fields of the points to convert the table to an in-memory point feature class.&amp;nbsp; All of the fields of the table and the points will be visible in this layer.&amp;nbsp; Updates to the source points or table directly will become immediately visible in this layer.&amp;nbsp; Edits done to the in-memory layer itself become immediately visible in the source table, but the source points are not editable through this layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.d.2.a&amp;nbsp;&amp;nbsp; Add the same two fields to the table to hold the X/Y coordinate values of the points&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.d.2.b.&amp;nbsp; Use the field calculator to transfer the X/Y coordinates of the points to the table records.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.d.2.c.&amp;nbsp; Remove the join.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.d.2.d.&amp;nbsp; Use the Make X/Y Event Layer tool to make the X/Y coordinates of the table into a in-memory point feature layer.&amp;nbsp; Only the attributes of the table will be visible in this layer.&amp;nbsp; Edits done to the source table are reflected in the in-memory points layer with a simple refressh, but the fields and features of the source points are not editable or visible through this layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.e.&amp;nbsp; Optionally export the in-memory layer to a permanent feature class to make it a permanent point feature class.&amp;nbsp; This is disconnected from the original source tables and needs to be recreated to reflect updates to the sources.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At 10.1 and later you have a 3rd option.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Alternative 3 at 10.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp; Like the Make Query Table option, both the points and the table must reside in the same geodatabase.&amp;nbsp; You can just create a join of the points layer without any special coordinate fields to the table using the points as the source and the table as the join. The one-to-many relationship is not visible or editable through the join.&amp;nbsp; But you can export the features to a new point feature class.&amp;nbsp; The export will duplicate records as necessary so that the one-to-many relationship will output a point feature class that has been converted to a one-to-one relationship.&amp;nbsp; This export output is not connected to the source features and has to be recreated to reflect updates to the sources.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Oct 2013 17:54:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/non-unique-primary-keys-creating-coincident-points/m-p/512304#M17028</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-10-11T17:54:20Z</dc:date>
    </item>
  </channel>
</rss>

