<?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 Create polyline from points passed in the Lambert coordinate spatialReference(102017) in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/create-polyline-from-points-passed-in-the-lambert/m-p/1398277#M5181</link>
    <description>&lt;P&gt;Hi, fellow GIS persons,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create a polyline&amp;nbsp;from points passed in the Lambert coordinate spatialReference(102017) and coordinate wgs 1984. One point in the pole, so I used coordinate Lambert&amp;nbsp;spatialReference(102017), another point in the Toronto, so I used&amp;nbsp;spatialReference::wgs(). But I can't use PolylineBuilder, it can only specify a coordinate system.&lt;BR /&gt;Here is the code.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Esri::ArcGISRuntime::Geometry Display_map_lambert::createPolyline(){&lt;/P&gt;&lt;P&gt;const SpatialReference spatialRefer_wgs(4326);&lt;BR /&gt;const SpatialReference spatialRefer_lambert(102017);&lt;/P&gt;&lt;P&gt;SimpleLineSymbol* lineSymbol = new SimpleLineSymbol(SimpleLineSymbolStyle::Solid, QColor("red"), 1.5f/*width*/, this);&lt;/P&gt;&lt;P&gt;PolylineBuilder polylineBuilder(spatialRefer_wgs);&lt;/P&gt;&lt;P&gt;// create point of lines&lt;BR /&gt;Point northPole(-111.8374, 77.5621, spatialRefer_lambert);&lt;BR /&gt;Point Toronto(-87.6828, 41.8379);&lt;/P&gt;&lt;P&gt;polylineBuilder.addPoint(northPole);&lt;BR /&gt;&lt;BR /&gt;polylineBuilder.addPoint(Toronto);&lt;/P&gt;&lt;P&gt;return polylineBuilder.toGeometry();&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2024 08:47:41 GMT</pubDate>
    <dc:creator>JiyuanChang</dc:creator>
    <dc:date>2024-03-20T08:47:41Z</dc:date>
    <item>
      <title>Create polyline from points passed in the Lambert coordinate spatialReference(102017)</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/create-polyline-from-points-passed-in-the-lambert/m-p/1398277#M5181</link>
      <description>&lt;P&gt;Hi, fellow GIS persons,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create a polyline&amp;nbsp;from points passed in the Lambert coordinate spatialReference(102017) and coordinate wgs 1984. One point in the pole, so I used coordinate Lambert&amp;nbsp;spatialReference(102017), another point in the Toronto, so I used&amp;nbsp;spatialReference::wgs(). But I can't use PolylineBuilder, it can only specify a coordinate system.&lt;BR /&gt;Here is the code.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Esri::ArcGISRuntime::Geometry Display_map_lambert::createPolyline(){&lt;/P&gt;&lt;P&gt;const SpatialReference spatialRefer_wgs(4326);&lt;BR /&gt;const SpatialReference spatialRefer_lambert(102017);&lt;/P&gt;&lt;P&gt;SimpleLineSymbol* lineSymbol = new SimpleLineSymbol(SimpleLineSymbolStyle::Solid, QColor("red"), 1.5f/*width*/, this);&lt;/P&gt;&lt;P&gt;PolylineBuilder polylineBuilder(spatialRefer_wgs);&lt;/P&gt;&lt;P&gt;// create point of lines&lt;BR /&gt;Point northPole(-111.8374, 77.5621, spatialRefer_lambert);&lt;BR /&gt;Point Toronto(-87.6828, 41.8379);&lt;/P&gt;&lt;P&gt;polylineBuilder.addPoint(northPole);&lt;BR /&gt;&lt;BR /&gt;polylineBuilder.addPoint(Toronto);&lt;/P&gt;&lt;P&gt;return polylineBuilder.toGeometry();&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 08:47:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/create-polyline-from-points-passed-in-the-lambert/m-p/1398277#M5181</guid>
      <dc:creator>JiyuanChang</dc:creator>
      <dc:date>2024-03-20T08:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create polyline from points passed in the Lambert coordinate spatialReference(102017)</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/create-polyline-from-points-passed-in-the-lambert/m-p/1398327#M5182</link>
      <description>&lt;P&gt;You likely want to use GeometryEngine::project to take your lambert point and transform it to wgs84.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-geometryengine.html#project" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-geometryengine.html#project&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;   QObject::connect(&amp;amp;polylineBuilder,
        &amp;amp;PolylineBuilder::errorOccurred,
       [=](Error loadError)
        {
           cout &amp;lt;&amp;lt; __LINE__ &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; loadError.message().toStdString()
                &amp;lt;&amp;lt; " " &amp;lt;&amp;lt; loadError.additionalMessage().toStdString()
                &amp;lt;&amp;lt; endl;
        });

   Point projectedPole = static_cast&amp;lt; Esri::ArcGISRuntime::Point &amp;gt;(GeometryEngine::project(northPole, spatialRefer_wgs));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Depending on the version of the Maps sdk you are using, you may need to do a geometry_cast to get a Point out of the Geometry parent class that is returned from the project call.&lt;/P&gt;&lt;P&gt;also you can connect to the PolylineBuilder's errorOccurred signal to try to see what it is complaining about with the point adds&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2024 12:06:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/create-polyline-from-points-passed-in-the-lambert/m-p/1398327#M5182</guid>
      <dc:creator>TroyFoster</dc:creator>
      <dc:date>2024-03-20T12:06:06Z</dc:date>
    </item>
  </channel>
</rss>

