<?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 JSON Parser error when loading TPK as an Elevation Source. QT WINDOWS 10 in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/json-parser-error-when-loading-tpk-as-an-elevation/m-p/1033730#M3987</link>
    <description>&lt;P&gt;I been having issues loading a TPK file into my application for QT.&amp;nbsp; To start from a know quantity i used the&amp;nbsp;MontereyElevation.tpk file that is in the examples.&amp;nbsp; &amp;nbsp;&lt;A href="https://developers.arcgis.com/qt/cpp/sample-code/create-terrain-surface-from-a-local-tile-package/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/qt/cpp/sample-code/create-terrain-surface-from-a-local-tile-package/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;from the Example executables i could not run the file with a 3d topology.&amp;nbsp; Instead it displays a flat map.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my own code samples i use the following lines:&lt;/P&gt;&lt;P&gt;-----------------------&lt;/P&gt;&lt;P&gt;const QString tile_elevation_package_path = QString{"d://temp/export/MontereyElevation.tpk"};&lt;/P&gt;&lt;P&gt;// Before attempting to add any layers, check that the file for the elevation source exists at all.&lt;BR /&gt;const bool src_elevation_file_exists = QFileInfo::exists(tile_elevation_package_path);&lt;/P&gt;&lt;P&gt;if(src_elevation_file_exists) {&lt;BR /&gt;qInfo() &amp;lt;&amp;lt; "elevation source package found";&lt;BR /&gt;ArcGISTiledElevationSource* elevationsrc=new ArcGISTiledElevationSource{QUrl("file:"+tile_elevation_package_path), this};&lt;BR /&gt;// When the elevation source is finished loading, call the elevationSrcFinishedLoading callback, so we can tell if it loaded succesfully.&lt;BR /&gt;connect(elevationSrc, &amp;amp;ArcGISTiledElevationSource::doneLoading, this, &amp;amp;Add_layers_to_a_3d_scene::packageLoaded);&lt;/P&gt;&lt;P&gt;// add the elevation source to the scene to display elevation&lt;BR /&gt;m_scene-&amp;gt;baseSurface()-&amp;gt;elevationSources()-&amp;gt;append(elevationSrc);&lt;BR /&gt;} else {&lt;BR /&gt;qInfo() &amp;lt;&amp;lt; "elevation source file not found";&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;----------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void Add_layers_to_a_3d_scene::packageLoaded(const Error&amp;amp; e)&lt;BR /&gt;{&lt;BR /&gt;if (!e.isEmpty())&lt;BR /&gt;{&lt;BR /&gt;qDebug() &amp;lt;&amp;lt; QString("Package load error: %1 %2").arg(e.message(), e.additionalMessage());&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the error code i receive:&lt;/P&gt;&lt;P&gt;"Package load error: JSON parser invalid start of JSON. Error processing service metadata response.\nP : 0"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have experienced this same error with&amp;nbsp; my own LERC TPK&amp;nbsp;&lt;SPAN&gt;generated from ARCGIS Pro.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 06 Mar 2021 21:21:45 GMT</pubDate>
    <dc:creator>SPI_LLC_1</dc:creator>
    <dc:date>2021-03-06T21:21:45Z</dc:date>
    <item>
      <title>JSON Parser error when loading TPK as an Elevation Source. QT WINDOWS 10</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/json-parser-error-when-loading-tpk-as-an-elevation/m-p/1033730#M3987</link>
      <description>&lt;P&gt;I been having issues loading a TPK file into my application for QT.&amp;nbsp; To start from a know quantity i used the&amp;nbsp;MontereyElevation.tpk file that is in the examples.&amp;nbsp; &amp;nbsp;&lt;A href="https://developers.arcgis.com/qt/cpp/sample-code/create-terrain-surface-from-a-local-tile-package/" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/qt/cpp/sample-code/create-terrain-surface-from-a-local-tile-package/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;from the Example executables i could not run the file with a 3d topology.&amp;nbsp; Instead it displays a flat map.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in my own code samples i use the following lines:&lt;/P&gt;&lt;P&gt;-----------------------&lt;/P&gt;&lt;P&gt;const QString tile_elevation_package_path = QString{"d://temp/export/MontereyElevation.tpk"};&lt;/P&gt;&lt;P&gt;// Before attempting to add any layers, check that the file for the elevation source exists at all.&lt;BR /&gt;const bool src_elevation_file_exists = QFileInfo::exists(tile_elevation_package_path);&lt;/P&gt;&lt;P&gt;if(src_elevation_file_exists) {&lt;BR /&gt;qInfo() &amp;lt;&amp;lt; "elevation source package found";&lt;BR /&gt;ArcGISTiledElevationSource* elevationsrc=new ArcGISTiledElevationSource{QUrl("file:"+tile_elevation_package_path), this};&lt;BR /&gt;// When the elevation source is finished loading, call the elevationSrcFinishedLoading callback, so we can tell if it loaded succesfully.&lt;BR /&gt;connect(elevationSrc, &amp;amp;ArcGISTiledElevationSource::doneLoading, this, &amp;amp;Add_layers_to_a_3d_scene::packageLoaded);&lt;/P&gt;&lt;P&gt;// add the elevation source to the scene to display elevation&lt;BR /&gt;m_scene-&amp;gt;baseSurface()-&amp;gt;elevationSources()-&amp;gt;append(elevationSrc);&lt;BR /&gt;} else {&lt;BR /&gt;qInfo() &amp;lt;&amp;lt; "elevation source file not found";&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;----------------------------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void Add_layers_to_a_3d_scene::packageLoaded(const Error&amp;amp; e)&lt;BR /&gt;{&lt;BR /&gt;if (!e.isEmpty())&lt;BR /&gt;{&lt;BR /&gt;qDebug() &amp;lt;&amp;lt; QString("Package load error: %1 %2").arg(e.message(), e.additionalMessage());&lt;BR /&gt;return;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the error code i receive:&lt;/P&gt;&lt;P&gt;"Package load error: JSON parser invalid start of JSON. Error processing service metadata response.\nP : 0"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have experienced this same error with&amp;nbsp; my own LERC TPK&amp;nbsp;&lt;SPAN&gt;generated from ARCGIS Pro.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Mar 2021 21:21:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/json-parser-error-when-loading-tpk-as-an-elevation/m-p/1033730#M3987</guid>
      <dc:creator>SPI_LLC_1</dc:creator>
      <dc:date>2021-03-06T21:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Parser error when loading TPK as an Elevation Source. QT WINDOWS 10</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/json-parser-error-when-loading-tpk-as-an-elevation/m-p/1034268#M3988</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/460548"&gt;@SPI_LLC_1&lt;/a&gt;, unfortunately I'm having trouble replicating your issue. Are you able to run the unmodified &lt;A href="https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_CppSamples/Scenes/CreateTerrainSurfaceFromLocalTilePackage" target="_self"&gt;Create terrain surface from local tile package sample&lt;/A&gt; provided from our GitHub repo? You'll need to add the &lt;A href="https://www.arcgis.com/home/item.html?id=cce37043eb0440c7a5c109cf8aad5500" target="_self"&gt;Monterey Elevation TPK&lt;/A&gt; to the file path like `&amp;lt;username&amp;gt;&lt;SPAN&gt;/ArcGIS/Runtime/Data/tpk/MontereyElevation.tpk`.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And also, just to double check, what version of Qt and version of ArcGIS Runtime are you using?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm thinking that either there's a problem on the back end with Qt or the Runtime API being out of date, or it's something to do with these lines of code where you load the file:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;const QString tile_elevation_package_path = QString{"d://temp/export/MontereyElevation.tpk"};

ArcGISTiledElevationSource* elevationsrc=new ArcGISTiledElevationSource{QUrl("file:"+tile_elevation_package_path), this};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In our sample, we use the following syntax, but I confirmed that either works.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;// CreateTerrainSurfaceFromLocalTilePackage.cpp

const QString montereyTileElevationPath = QString{defaultDataPath() + "/ArcGIS/Runtime/Data/tpk/MontereyElevation.tpk"}; // defaultDataPath() is defined on lines 39-52

ArcGISTiledElevationSource* elevationsrc=new ArcGISTiledElevationSource{montereyTileElevationPath, this};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sorry I can't be of more help initially, but I'm hoping we can resolve this soon!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;- Tanner&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 00:58:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/json-parser-error-when-loading-tpk-as-an-elevation/m-p/1034268#M3988</guid>
      <dc:creator>Tanner_Yould</dc:creator>
      <dc:date>2021-03-09T00:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Parser error when loading TPK as an Elevation Source. QT WINDOWS 10</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/json-parser-error-when-loading-tpk-as-an-elevation/m-p/1034351#M3989</link>
      <description>&lt;P&gt;Thanks the error was trivial&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"d://temp/export/MontereyElevation.tpk&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;the double // kills the loading.&amp;nbsp; Which leads me to follow up.&amp;nbsp; The monterrey.tpk loads fine.&amp;nbsp; But when generating my own it has errors.&amp;nbsp; Is a tutorial that shows how to make a monterrey.tpk file so that i can learn to generate my own compatible tpk file?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;i have tried following tutorials to generate a using lerc encoding.&amp;nbsp; My package throws and error tiling scheme resolution unsupported.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 07:22:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/json-parser-error-when-loading-tpk-as-an-elevation/m-p/1034351#M3989</guid>
      <dc:creator>SPI_LLC_1</dc:creator>
      <dc:date>2021-03-09T07:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Parser error when loading TPK as an Elevation Source. QT WINDOWS 10</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/json-parser-error-when-loading-tpk-as-an-elevation/m-p/1034570#M3990</link>
      <description>&lt;P&gt;I'm glad to see it was an easy fix. As for generating your own elevation tpks, I don't believe we have a tutorial for that at the Runtime level because that's generally done through ArcGIS Pro.&lt;/P&gt;&lt;P&gt;Are you able to read the tpk files you create in ArcGIS Pro? If not, perhaps it would be worth following up in that forum? I did some initial searching for you and perhaps this tutorial on how to &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/sharing/overview/tile-package.htm" target="_self"&gt;share a tile package&lt;/A&gt;&amp;nbsp;may be worthwhile if you haven't already seen it.&lt;/P&gt;&lt;P&gt;If it does work in Pro but not in the Runtime API, please let me know because that's something that I'll want to bring up to the team.&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Tanner&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 18:08:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/json-parser-error-when-loading-tpk-as-an-elevation/m-p/1034570#M3990</guid>
      <dc:creator>Tanner_Yould</dc:creator>
      <dc:date>2021-03-09T18:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Parser error when loading TPK as an Elevation Source. QT WINDOWS 10</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/json-parser-error-when-loading-tpk-as-an-elevation/m-p/1034698#M3991</link>
      <description>&lt;P&gt;Thanks yes I am using ArcGIS Pro.&amp;nbsp; And I can read both TPK's without problems, but Have no idea what the requirements or difference with the packages.&amp;nbsp; I do not know what makes my generated TPK not compatible with the runtime SDK&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 21:19:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/json-parser-error-when-loading-tpk-as-an-elevation/m-p/1034698#M3991</guid>
      <dc:creator>SPI_LLC_1</dc:creator>
      <dc:date>2021-03-09T21:19:26Z</dc:date>
    </item>
  </channel>
</rss>

