<?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: How to cut a polyline by a single point? in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757438#M3767</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the sense behind cutting a polyline by a single point?&lt;/P&gt;&lt;P&gt;Is the single point an element of that polyline?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so you can access all points of a polyline using&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ImmutablepartCollection Polyline::parts()&lt;/LI&gt;&lt;LI&gt;Immutablepart ImmutablepartCollection::part(index)&lt;/LI&gt;&lt;LI&gt;Point Immutablepart::point(pointIndex)&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;polyline.parts().part(0).pointCount() // pointCount of first part&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe the operator== is not sufficiant, give qFuzzyCompare a try....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Oct 2018 12:38:35 GMT</pubDate>
    <dc:creator>NorbertThoden</dc:creator>
    <dc:date>2018-10-12T12:38:35Z</dc:date>
    <item>
      <title>How to cut a polyline by a single point?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757437#M3766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; 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; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;The GeometryEngine in runtime 100.1 onwards has a cut method that cuts a geometry using a polyline.&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; 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; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; 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; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;However, what would be the best and safest way to split an actual polyline by a single point?&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; 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; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; 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; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Currently, I would need to create a polyline as the cutter. Since all I have is a single point, then technically, without knowing ahead of time the geometry of the polyline I want to cut, I would have to add another random point to my known point to create a polyline, then use that as the cutter to cut my initial polyline. No matter where I add that second random point, I could never be sure that it wouldn't intersect the initial polyline twice.&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; 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; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; 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; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;The only safe way is the way I previously did it, where I create a brand new polyline and add all the points up to that cut/split point and use that new polyline.&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; 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; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; 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; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;Is there a better way I'm missing? Or is this perhaps a suggestion for a variation of the cut method specifically for this task?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2018 08:48:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757437#M3766</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-10-12T08:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to cut a polyline by a single point?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757438#M3767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the sense behind cutting a polyline by a single point?&lt;/P&gt;&lt;P&gt;Is the single point an element of that polyline?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so you can access all points of a polyline using&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ImmutablepartCollection Polyline::parts()&lt;/LI&gt;&lt;LI&gt;Immutablepart ImmutablepartCollection::part(index)&lt;/LI&gt;&lt;LI&gt;Point Immutablepart::point(pointIndex)&lt;/LI&gt;&lt;/UL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;polyline.parts().part(0).pointCount() // pointCount of first part&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe the operator== is not sufficiant, give qFuzzyCompare a try....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2018 12:38:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757438#M3767</guid>
      <dc:creator>NorbertThoden</dc:creator>
      <dc:date>2018-10-12T12:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to cut a polyline by a single point?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757439#M3768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By definition a point is dimension-less.&amp;nbsp; I can't see how one can 'cut' an areal object with one that has no dimension...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2018 13:48:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757439#M3768</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2018-10-12T13:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to cut a polyline by a single point?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757440#M3769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like you want something like the split workflow from Desktop? &lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.3/manage-data/editing-existing-features/ways-to-split-a-line-feature.htm" title="http://desktop.arcgis.com/en/arcmap/10.3/manage-data/editing-existing-features/ways-to-split-a-line-feature.htm"&gt;Methods for splitting line features—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&amp;nbsp;We don't really have anything like that at the moment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Oct 2018 14:42:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757440#M3769</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2018-10-12T14:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to cut a polyline by a single point?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757441#M3770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Norbert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You ask what is the sense of cutting a polyline by a single point - perhaps 'cut' is the wrong term, but the concept is valid. Perhaps a use case would help understand:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. I have a polyline that represents a waterway. I have a user standing beside that waterway. Given their gps location, I then find the nearest coordinate on the waterway polyline. I now have a 'point' on that polyline. I want to then obtain a section of that line, say, from the beginning of the line up to that point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I mention above, my current approach is to create a new line and copy all the points across from the original line up to the point in question. This works fine. My question is whether there is or should be a runtime method that can achieve this more efficiently.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers.&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2018 20:59:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757441#M3770</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-10-14T20:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to cut a polyline by a single point?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757442#M3771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See my reply to Norbert above. Perhaps 'cut' is not the correct term.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2018 21:00:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757442#M3771</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-10-14T21:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to cut a polyline by a single point?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757443#M3772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah I think you're on to it. Not terribly important, but could be useful in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;-Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 14 Oct 2018 21:01:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/757443#M3772</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-10-14T21:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to cut a polyline by a single point?</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/1093980#M4399</link>
      <description>&lt;P&gt;I also have a similar use case.&amp;nbsp; It's also pretty clear what @Anonymous User&amp;nbsp;was asking and there's really no need to get too technical about the definition of a point.&amp;nbsp; I've done this in the past using several of the GeometryEngine functions in the ArcGIS for JavaScript API.&amp;nbsp; You should find similar functions in the ArcGIS Runtime.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Buffer the point with the GeometryEngine &lt;EM&gt;Geodesic Buffer&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;Get the &lt;EM&gt;Intersection&lt;/EM&gt; of the buffered point and the polyline&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Rotate&lt;/EM&gt; the intersection geometry 90 degrees&lt;/LI&gt;&lt;LI&gt;Use GeometryEngine &lt;EM&gt;Cut&lt;/EM&gt; to get the keep geometry and discard geometry&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 31 Aug 2021 13:40:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/how-to-cut-a-polyline-by-a-single-point/m-p/1093980#M4399</guid>
      <dc:creator>AndyWhitaker1</dc:creator>
      <dc:date>2021-08-31T13:40:59Z</dc:date>
    </item>
  </channel>
</rss>

