<?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 How can I use geometry method snapToLine to find new coordinates? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569850#M44660</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using 10.3.1.&lt;/P&gt;&lt;P&gt;From &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-classes/geometry.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-classes/geometry.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Geometry—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/179659_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm probably missing something basic here, but given a polyline, and a point geometry....&lt;STRONG&gt;how do I use snapToLine(in_point) and how do I capture the new point (in a python script)?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested using arcpy.Near_analysis, which will work, but the description sounds more like what I need.&amp;nbsp; This is a small part of a bigger script.....which I'm now trying using a numpy array.&amp;nbsp; A general description, given my FC of classified points, I grab the first point...create the contour....snap the point to the contour and split at the point...then go a given distance in each direction along the line, split and create a transect...capture the coordinates at the three points. Previously I had this in Avenue and I'm updating, and adding new features, of course.&amp;nbsp; There's a bit more to it, but that's a general description for anyone interested. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fwiw, I'll include my test script (I'll clean it up once I get this figured out...lots of stuff not being used in in this part.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import os
import numpy as np
from numpy.lib import recfunctions as rfn&amp;nbsp; 
import arcpy
from arcpy import env
from arcpy.sa import *
#from ADFGUtils import *
#from gpdecorators import *

# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")

# Set the Geoprocessing environment...
initialSR = arcpy.SpatialReference(3338)
geoSR = arcpy.SpatialReference(4269)

theWorkspace = r'C:\_beartest\Prep.gdb'
arcpy.env.workspace = theWorkspace
arcpy.env.overwriteOutput = True&amp;nbsp;&amp;nbsp;&amp;nbsp; 
inStudy = r'C:\_beartest\Prep.gdb\Unit20A_boundary'
arcpy.env.Extent = inStudy

inDEM = r"C:\_beartest\Unit20Araster.gdb\elevExtent"&amp;nbsp; # clip later or \elevClip ..
rasterGDB, rasterFile = os.path.split(inDEM)
arcpy.env.snapRaster = inDEM
outContour = arcpy.os.path.join(theWorkspace, "c3")
outContour2 = arcpy.os.path.join(theWorkspace, "c4")

inPts = r'C:\_beartest\Prep.gdb\Pts1_3338'&amp;nbsp;&amp;nbsp; # arcpy.ListFeatureClasses("Pts*3338*", "Point")
minTrans = '5000 Meters'&amp;nbsp;&amp;nbsp;&amp;nbsp; 
maxTrans = '20000 Meters'
length, unit = maxTrans.split(" ")
halfTrans = int(length) / 2
flatOption = "fishnet"&amp;nbsp;&amp;nbsp;&amp;nbsp; 

nearSearchRadius = "1000 Meters"
location = "LOCATION"&amp;nbsp;&amp;nbsp;&amp;nbsp; 
angle = "ANGLE"
tmpPt = arcpy.os.path.join(theWorkspace, "tmpPt")

tmpRoute = arcpy.os.path.join(theWorkspace, "tmpRoute")&amp;nbsp;&amp;nbsp;&amp;nbsp; 

field_names = "*"
arr = arcpy.da.FeatureClassToNumPyArray(inPts, field_names, "", initialSR)
dtypes = arr.dtype
arr2 = (np.array(arr, dtype=dtypes)).view(np.recarray) 

cnt = 0
while&amp;nbsp; cnt &amp;lt; 10:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print("{0} PtID {1} elev: {2}".format(cnt, arr2.PtID[cnt], arr2.elev_ft[cnt]))
&amp;nbsp;&amp;nbsp;&amp;nbsp; transtype = arr2.TransType[cnt]
&amp;nbsp;&amp;nbsp;&amp;nbsp; ptID = arr2.PtID[cnt]
&amp;nbsp;&amp;nbsp;&amp;nbsp; elevM = arr2.elev_m[cnt]
&amp;nbsp;&amp;nbsp;&amp;nbsp; origX = arr2.Shape[cnt][0]
&amp;nbsp;&amp;nbsp;&amp;nbsp; origY = arr2.Shape[cnt][0]
&amp;nbsp;&amp;nbsp;&amp;nbsp; if transtype == "Riparian":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("this is a Riparian")
&amp;nbsp;&amp;nbsp;&amp;nbsp; elif cnt == 9:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("this is a {0}".format(transtype))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ContourList(inDEM, outContour, elevM) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ptGeom = arcpy.PointGeometry(arcpy.Point(origX, origY, 0, 0, ptID))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #nearPt = arcpy.Near_analysis(ptGeom, outContour, nearSearchRadius, "LOCATION", "ANGLE")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #newPt = outContour.snapToLine(ptGeom)
&amp;nbsp;&amp;nbsp;&amp;nbsp; cnt += 1&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;variables of interest:&amp;nbsp; ptGeom, outContour&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully it is something I'm just overlooking.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 00:31:53 GMT</pubDate>
    <dc:creator>RebeccaStrauch__GISP</dc:creator>
    <dc:date>2021-12-12T00:31:53Z</dc:date>
    <item>
      <title>How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569850#M44660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using 10.3.1.&lt;/P&gt;&lt;P&gt;From &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-classes/geometry.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-classes/geometry.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Geometry—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/179659_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm probably missing something basic here, but given a polyline, and a point geometry....&lt;STRONG&gt;how do I use snapToLine(in_point) and how do I capture the new point (in a python script)?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tested using arcpy.Near_analysis, which will work, but the description sounds more like what I need.&amp;nbsp; This is a small part of a bigger script.....which I'm now trying using a numpy array.&amp;nbsp; A general description, given my FC of classified points, I grab the first point...create the contour....snap the point to the contour and split at the point...then go a given distance in each direction along the line, split and create a transect...capture the coordinates at the three points. Previously I had this in Avenue and I'm updating, and adding new features, of course.&amp;nbsp; There's a bit more to it, but that's a general description for anyone interested. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fwiw, I'll include my test script (I'll clean it up once I get this figured out...lots of stuff not being used in in this part.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import os
import numpy as np
from numpy.lib import recfunctions as rfn&amp;nbsp; 
import arcpy
from arcpy import env
from arcpy.sa import *
#from ADFGUtils import *
#from gpdecorators import *

# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")

# Set the Geoprocessing environment...
initialSR = arcpy.SpatialReference(3338)
geoSR = arcpy.SpatialReference(4269)

theWorkspace = r'C:\_beartest\Prep.gdb'
arcpy.env.workspace = theWorkspace
arcpy.env.overwriteOutput = True&amp;nbsp;&amp;nbsp;&amp;nbsp; 
inStudy = r'C:\_beartest\Prep.gdb\Unit20A_boundary'
arcpy.env.Extent = inStudy

inDEM = r"C:\_beartest\Unit20Araster.gdb\elevExtent"&amp;nbsp; # clip later or \elevClip ..
rasterGDB, rasterFile = os.path.split(inDEM)
arcpy.env.snapRaster = inDEM
outContour = arcpy.os.path.join(theWorkspace, "c3")
outContour2 = arcpy.os.path.join(theWorkspace, "c4")

inPts = r'C:\_beartest\Prep.gdb\Pts1_3338'&amp;nbsp;&amp;nbsp; # arcpy.ListFeatureClasses("Pts*3338*", "Point")
minTrans = '5000 Meters'&amp;nbsp;&amp;nbsp;&amp;nbsp; 
maxTrans = '20000 Meters'
length, unit = maxTrans.split(" ")
halfTrans = int(length) / 2
flatOption = "fishnet"&amp;nbsp;&amp;nbsp;&amp;nbsp; 

nearSearchRadius = "1000 Meters"
location = "LOCATION"&amp;nbsp;&amp;nbsp;&amp;nbsp; 
angle = "ANGLE"
tmpPt = arcpy.os.path.join(theWorkspace, "tmpPt")

tmpRoute = arcpy.os.path.join(theWorkspace, "tmpRoute")&amp;nbsp;&amp;nbsp;&amp;nbsp; 

field_names = "*"
arr = arcpy.da.FeatureClassToNumPyArray(inPts, field_names, "", initialSR)
dtypes = arr.dtype
arr2 = (np.array(arr, dtype=dtypes)).view(np.recarray) 

cnt = 0
while&amp;nbsp; cnt &amp;lt; 10:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print("{0} PtID {1} elev: {2}".format(cnt, arr2.PtID[cnt], arr2.elev_ft[cnt]))
&amp;nbsp;&amp;nbsp;&amp;nbsp; transtype = arr2.TransType[cnt]
&amp;nbsp;&amp;nbsp;&amp;nbsp; ptID = arr2.PtID[cnt]
&amp;nbsp;&amp;nbsp;&amp;nbsp; elevM = arr2.elev_m[cnt]
&amp;nbsp;&amp;nbsp;&amp;nbsp; origX = arr2.Shape[cnt][0]
&amp;nbsp;&amp;nbsp;&amp;nbsp; origY = arr2.Shape[cnt][0]
&amp;nbsp;&amp;nbsp;&amp;nbsp; if transtype == "Riparian":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("this is a Riparian")
&amp;nbsp;&amp;nbsp;&amp;nbsp; elif cnt == 9:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("this is a {0}".format(transtype))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ContourList(inDEM, outContour, elevM) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ptGeom = arcpy.PointGeometry(arcpy.Point(origX, origY, 0, 0, ptID))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #nearPt = arcpy.Near_analysis(ptGeom, outContour, nearSearchRadius, "LOCATION", "ANGLE")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #newPt = outContour.snapToLine(ptGeom)
&amp;nbsp;&amp;nbsp;&amp;nbsp; cnt += 1&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;variables of interest:&amp;nbsp; ptGeom, outContour&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully it is something I'm just overlooking.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:31:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569850#M44660</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-12T00:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569851#M44661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rebecca... I can't find the numpy stuff right now, but I did do some stuff for lessons on vector projection of a point to a line.&amp;nbsp; Attached is one of those package things that contains the results.&amp;nbsp; I have attached the script as a zip file and her are some results for the results... they will make more sense when you open the project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; Points 
 A: 2 2 NaN NaN
 B: 10 6 NaN NaN
 C: 6 7 NaN NaN
 D: 7.2 4.6 NaN NaN
Distances
 A-B:&amp;nbsp; 8.9442719100 
 A-C:&amp;nbsp; 6.4031242374 
 B-C:&amp;nbsp; 4.1231056256 
 C-D:&amp;nbsp; 2.6832815730&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically A and B form a line.&amp;nbsp; Point C is the point near the line and D is the intersection point.,&lt;/P&gt;&lt;P&gt;If you are interested and in no rush, I have Near replicated in a couple of variants, one of the obvious is the arcpy python route and the other entailed numpy (can't remember the details yet.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should give you some ideas.&amp;nbsp; The only trick is in limiting the search radius of the from point to&amp;nbsp; the candidate to features.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:31:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569851#M44661</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T00:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569852#M44662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan,&lt;/P&gt;&lt;P&gt;That should be helpful.&amp;nbsp; I think it doesn't like the variable/objects going in to the command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; newPt = (outContour.snapToLine(ptGeom))
Runtime error
Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;string&amp;gt;", line 1, in &amp;lt;module&amp;gt;
AttributeError: 'str' object has no attribute 'snapToLine'
&amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm thinking it doesn't like my outContour feature class.&amp;nbsp; But I need to digest the vector_projection_arcpy script a little more and see what geometry worked for you.&amp;nbsp; I think I just need to step away from it for a while.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:31:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569852#M44662</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2021-12-12T00:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569853#M44663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PS &lt;/P&gt;&lt;P&gt;You might be interested in this... which is part of the bigger Near picture.&amp;nbsp; It entails using Numpy to determine euclidean distances between point objects&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migration-blogpost/55171"&gt;16 ... NumPy vs SciPy... making a point&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I tended to focus more on the speed issue between pure numpy and the implementation in SciPy... which wasn't available unless you did a special install... partial conclusion for 50,000,000 million origin-destination points... and my rant&lt;/P&gt;&lt;P&gt;......&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;SPAN style="font-style: inherit; font-size: 8pt; font-family: 'courier new', courier; color: #303030;"&gt;1 e7 0.196187973&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.137131929&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #e23d39; font-family: 'courier new', courier; font-size: 8pt; font-style: inherit;"&gt;5 e8 0.960922956&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.664637804&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;SPAN style="font-style: inherit; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Ok ... are you missing something like me?&amp;nbsp; Look at the last line... 50 million (50,000,000) Euclidean origin - destination calculations ... one origin and 50,000,000 destinations... yes with a square root calculation too... and in real world (MTM zone 9 coordinates) covering random points in a 50 km x 50 km range. Hmmm.... Ok!&amp;nbsp; I get it Numpy using einsum takes 44.5% longer to calculate!! That must be it!&amp;nbsp; Now I am onboard with all those time testers extolling the virtues of one algorithm over an other or one piece of software as being the latest in time saving efforts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;SPAN style="font-style: inherit; font-size: 12pt; font-family: arial, helvetica, sans-serif;"&gt;Einsum isn't the only implementation for distance, and now that pro comes with scipy, determining distances is trivial&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 03:26:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569853#M44663</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-02-09T03:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569854#M44664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are you using python 2.7? I am using 3.4.x&amp;nbsp; I will have to look at it in the morning and I get off the iThingy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS&amp;nbsp;&amp;nbsp; The demo works with points I created in the script... it is not the version for using with other files!&amp;nbsp; It just demonstrates the principle, you will have to change the output file names in the script.&amp;nbsp; This package thing might be an issue, the shapefiles where in a folder called shapefiles in the folder that the mxd was in.&amp;nbsp; Also, I don't use the arcmap python IDE, I have used the script in pyscripter and pythonwin and the script must be in the same folder as the mxd...if that package thing produces one... it is the first time I used them&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 03:28:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569854#M44664</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-02-09T03:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569855#M44665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ya...the speed difference in this case isn't that critical....it's getting the data out.....and making sure I have it documented enough so the next person can understand it.&amp;nbsp; Sometimes sticking to the standard arcpy commands are the best way to make sure it is readable to others....especially if the next person is an =ologist type, not a GIS person. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm thinking my issue is one of two things..&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14549888122521282 jive_text_macro" data-renderedposition="113_8_913_16" jivemacro_uid="_14549888122521282"&gt;&lt;P&gt;ptGeom = arcpy.PointGeometry(arcpy.Point(origX, origY, 0, 0, ptID))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so I tried a temp point with just the arcpy.Point part of it.&amp;nbsp; Or more likely it doesn't like line the contour.&amp;nbsp; You example shows&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14549888768636762 jive_text_macro" data-renderedposition="171_8_913_16" jivemacro_uid="_14549888768636762"&gt;&lt;P&gt;baseLine = arcpy.Polyline(arcpy.Array([A,B]),SR)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I'm thinking I need to isolate the contour line segments and grab the geometry of that...instead of having it be a featureclass.&amp;nbsp; I may give that a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 03:35:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569855#M44665</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-02-09T03:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569856#M44666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, using python 2.7 with Desktop 10.3.1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And yes, I realize you are hardcoding the points/lines in the demo.&amp;nbsp; Just need to translate my generated contour line as input.&amp;nbsp; I do think that is the issue....that is, the polyline geometry, not the point.&amp;nbsp; looked at it too long this afternoon.....brain is shot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 03:49:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569856#M44666</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-02-09T03:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569857#M44667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rebecca,&lt;/P&gt;&lt;P&gt;in those geometry methods, outContour would have to be a geometry object, not an entire feature class.&lt;/P&gt;&lt;P&gt;I would load those 2 sets of geometries into a dict or something then get the logic right of cycling through them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 07:39:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569857#M44667</guid>
      <dc:creator>NeilAyres</dc:creator>
      <dc:date>2016-02-09T07:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569858#M44668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Attached project and a folder with 2 shapefiles and a script to demo how to get the below.&lt;/P&gt;&lt;P&gt;All it demonstrates is how to get the lines connecting a bunch of random points to a polyline...&lt;/P&gt;&lt;P&gt;This is not a full implementation obviously but it is part of the thought process.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="near_demo.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/179494_near_demo.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 11:08:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569858#M44668</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-02-09T11:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569859#M44669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Neil.&amp;nbsp; The outContour is actually created on the fly....the ptGeom object I am creating as I cycle thru the points.&amp;nbsp; The Near_analysis gets me the coord I want in the Near_X, Near_Y fields, and I could use this to split the line and go from there, but then I need to copy all the attributes over.....do my other steps...then the final transect out to a new file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The snapToLine looked promising since it looks to 1) actually move the point...which would be helpful, but not mandatory, and 2) keep the attributes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my sleep (where many of my programming problems are solved) I think I know how I should approach it (getting the outContour to a geom object, as you mentioned).&amp;nbsp; I'll give that a go.&amp;nbsp; Thanks for your input.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 15:56:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569859#M44669</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-02-09T15:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569860#M44670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the script, I'll take a look at it a bit more.&amp;nbsp; I did have a&amp;nbsp; couple SearchCursor in one of my versions, but was rethinking it trying to use the numpy arrays.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 16:04:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569860#M44670</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-02-09T16:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569861#M44671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the numpy version.... just can't find it yet, it is in my notes.&amp;nbsp; I worked on the searchcursor logic first, then speed things up using numpy.&amp;nbsp; I hope this is not mission critical but an incremental for interest need, since I am on a variety of other tangents. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 16:47:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569861#M44671</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-02-09T16:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569862#M44672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Only mission critical for me, and I have enough to go on now.&amp;nbsp; Fresh day.....fresher mind.&amp;nbsp;&amp;nbsp; Many ways to get any task done.&amp;nbsp; If you eventually write something up on your blog...that would be a good read.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 16:54:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569862#M44672</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-02-09T16:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569863#M44673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you seen this thread &lt;A href="http://gis.stackexchange.com/questions/154708/standalone-python-script-to-split-a-polyline-with-a-point-layer" title="http://gis.stackexchange.com/questions/154708/standalone-python-script-to-split-a-polyline-with-a-point-layer"&gt;arcpy - Standalone Python script to split a polyline with a point layer - Geographic Information Systems Stack Exchange&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 20:09:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569863#M44673</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-02-09T20:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569864#M44674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I did see that one yesterday in my many searches.&amp;nbsp; What it will come down to is a combo of a few....and I'm starting to swing back the direction of using Near_analysis and then maybe Join Field.&amp;nbsp; But, keep having other things pop up, so a start and stop testing session.&amp;nbsp; The line I snap to will be created on the fly, (contour) which is why most of the semi- OTB (out of the box) solutions won't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll post what I end up with.&amp;nbsp; But thanks for the link.&amp;nbsp; It doesn't hurt for me to look at it again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 20:18:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569864#M44674</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-02-09T20:18:17Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use geometry method snapToLine to find new coordinates?</title>
      <link>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569865#M44675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm marking Dan's response as the closest to the answer, since he had a script&amp;nbsp; that helped me figure it out.&amp;nbsp; I also found some of my older python scripts that I was doing something similar. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I find the description and examples in the Help lacking.&amp;nbsp; For me, sample code goes a long way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all the suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: btw, no code cleaned up enough to make if worth posting yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 16:19:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-can-i-use-geometry-method-snaptoline-to-find/m-p/569865#M44675</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2016-02-10T16:19:59Z</dc:date>
    </item>
  </channel>
</rss>

