<?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: IPolyline.QueryPoint(...) and Snap in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401049#M10710</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've just realized that this may be due to "coordinate precision". See: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.ian-ko.com/resources/Topology_Problems_2.htm"&gt;http://www.ian-ko.com/resources/Topology_Problems_2.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for a good explanation. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Knowing how this happened and not wanting to creating an vertex on the original curve (which will slightly nudge the curve due to coordinate grid), I am wondering if and how I may apply some kind of "tolerance" to the spatial relationships? For example, I want anything falling within the tiny tolerance (the coordinate precision in my case) to be recognized as "touch", instead of "intersect" or "disconnect"... Please advise..Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Aug 2010 19:41:44 GMT</pubDate>
    <dc:creator>JianLiu</dc:creator>
    <dc:date>2010-08-30T19:41:44Z</dc:date>
    <item>
      <title>IPolyline.QueryPoint(...) and Snap</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401043#M10704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;According to the developer's help, IPolyline.QueryPoint(...) returns the Point at a given distance &lt;/SPAN&gt;&lt;STRONG&gt;along&lt;/STRONG&gt;&lt;SPAN&gt; the curve or extended curve. I expected that point was exactly &lt;/SPAN&gt;&lt;STRONG&gt;ON&lt;/STRONG&gt;&lt;SPAN&gt; the curve (or its extension), however it turns out there is always a small offset from the polyline itself (in other words, the queried point doesn't touch the line). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this a bug or by design? Anybody knows? Is the snapEnvironment the only way to fix it? I would prefer something without starting editing. Please advise. Any comments will be appreciated, thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Aug 2010 19:11:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401043#M10704</guid>
      <dc:creator>JianLiu</dc:creator>
      <dc:date>2010-08-27T19:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: IPolyline.QueryPoint(...) and Snap</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401044#M10705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is your data frame, curve geometry and return point geometry all in the same coordinate system?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Aug 2010 21:36:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401044#M10705</guid>
      <dc:creator>JeffMatson</dc:creator>
      <dc:date>2010-08-27T21:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: IPolyline.QueryPoint(...) and Snap</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401045#M10706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just checked, they (data frame, curve file and interpolated point file) are all in the same system. I use intermediate pointClass() in the program, do I need to set their spatial reference as well? If that is not set, could that cause the problem? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've also tested using the SnapEnvironment to snap the point to the curve, but even after reported successfully snapped, the points are not moved/snapped at all. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could this have anything to do with tolerance?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 14:25:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401045#M10706</guid>
      <dc:creator>JianLiu</dc:creator>
      <dc:date>2010-08-30T14:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: IPolyline.QueryPoint(...) and Snap</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401046#M10707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, I would first try projecting your intermediate point to match the curve geometry, and see if that helps.&amp;nbsp; Also, is any of your data Z aware?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regarding snapping, most likely the point is within the tolerance and that is why it is not moving.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If nothing is helping, perhaps you could zip up a small amount of data and your code and someone can take a look...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 14:54:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401046#M10707</guid>
      <dc:creator>JeffMatson</dc:creator>
      <dc:date>2010-08-30T14:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: IPolyline.QueryPoint(...) and Snap</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401047#M10708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Yes, I would first try projecting your intermediate point to match the curve geometry, and see if that helps. Also, is any of your data Z aware?&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Regarding snapping, most likely the point is within the tolerance and that is why it is not moving.&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;If nothing is helping, perhaps you could zip up a small amount of data and your code and someone can take a look...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Jeff. This is the code for a single feature: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//create a new intermediate point&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IPoint tempPoint = new PointClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tempPoint.SpatialReference = segment.SpatialReference;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//does the interpolation and assign it to tempPoint. It turns out tempPoint is &lt;/SPAN&gt;&lt;SPAN style="color:&amp;quot;Red&amp;quot;;"&gt;NOT ON&lt;/SPAN&gt;&lt;SPAN&gt; the curve&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;segment.QueryPoint(esriSegmentExtension.esriNoExtension, ((double)houseNumber - (double)from) / ((double)to - (double)from), true, tempPoint);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//tried IProximityOperator to move the point, to no avail&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IProximityOperator proxOp = segment as IProximityOperator;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;interpolatedPoint = proxOp.ReturnNearestPoint(tempPoint, esriSegmentExtension.esriNoExtension);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//also tried SnapEnvironment to move the point, to no avail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any advice will be appreciated. Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 17:08:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401047#M10708</guid>
      <dc:creator>JianLiu</dc:creator>
      <dc:date>2010-08-30T17:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: IPolyline.QueryPoint(...) and Snap</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401048#M10709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does your data contain true curves, or was it converted to shapefile from a dataset that did contain true curves?&amp;nbsp; If so you might be seeing a "display error" when zoomed in to a very large scale.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One thing you might try is to split the curve at your query point using , and then compare the X and Y values of the vertex from the polyline, and the point.&amp;nbsp; If they are equal then it might be the display issue, but if the values are not the same then there may be something else going on.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 19:09:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401048#M10709</guid>
      <dc:creator>JeffMatson</dc:creator>
      <dc:date>2010-08-30T19:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: IPolyline.QueryPoint(...) and Snap</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401049#M10710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've just realized that this may be due to "coordinate precision". See: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.ian-ko.com/resources/Topology_Problems_2.htm"&gt;http://www.ian-ko.com/resources/Topology_Problems_2.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for a good explanation. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Knowing how this happened and not wanting to creating an vertex on the original curve (which will slightly nudge the curve due to coordinate grid), I am wondering if and how I may apply some kind of "tolerance" to the spatial relationships? For example, I want anything falling within the tiny tolerance (the coordinate precision in my case) to be recognized as "touch", instead of "intersect" or "disconnect"... Please advise..Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 19:41:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ipolyline-querypoint-and-snap/m-p/401049#M10710</guid>
      <dc:creator>JianLiu</dc:creator>
      <dc:date>2010-08-30T19:41:44Z</dc:date>
    </item>
  </channel>
</rss>

