<?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 Javascript create Laz and zLas files in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/javascript-create-laz-and-zlas-files/m-p/1128583#M21726</link>
    <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;I have custom widget which can drawing geometry and upload SHP file. In booth&amp;nbsp; sceneries graphics i must to use for creating .Laz or zLas files. The code for reading SHP zip file and present on the map is:&lt;/P&gt;&lt;P&gt;var fileToRead = document.getElementById("shpFileUpload");&lt;BR /&gt;if (fileToRead != null)&lt;BR /&gt;fileToRead.addEventListener("change", function (event) {&lt;BR /&gt;apiUrl = _that.appConfig.apiCallsUrl;&lt;BR /&gt;var fileUpload = $("#shpFileUpload").get(0);&lt;BR /&gt;var files = fileUpload.files;&lt;BR /&gt;var data = new FormData();&lt;BR /&gt;if (files[0].name.indexOf(".zip") !== -1) {&lt;BR /&gt;var portal = new arcgisPortal.Portal('&lt;A href="https://aknlidarappprod.katastar.gov.mk/portal/" target="_blank"&gt;https://aknlidarappprod.katastar.gov.mk/portal/&lt;/A&gt;');&lt;BR /&gt;var fileName = files[0].name;&lt;BR /&gt;document.getElementById("chooseFileId").innerHTML = fileName;&lt;BR /&gt;var name = fileName.split(".");&lt;BR /&gt;name = name[0].replace("c:\\fakepath\\", "");&lt;BR /&gt;var params = {&lt;BR /&gt;'name': name,&lt;BR /&gt;'targetSR': _this.map.spatialReference,&lt;BR /&gt;'maxRecordCount': 1000,&lt;BR /&gt;'enforceInputFileSizeLimit': true,&lt;BR /&gt;'enforceOutputJsonSizeLimit': true&lt;BR /&gt;};&lt;BR /&gt;var extent = scaleUtils.getExtentForScale(_this.map, 40000);&lt;BR /&gt;var resolution = extent.getWidth() / _this.map.width;&lt;BR /&gt;params.generalize = true;&lt;BR /&gt;params.maxAllowableOffset = resolution;&lt;BR /&gt;params.reducePrecision = true;&lt;BR /&gt;params.numberOfDigitsAfterDecimal = 0;&lt;/P&gt;&lt;P&gt;/* data.append(files[0].name, files[0]);*/&lt;BR /&gt;data.append("file", files[0]);&lt;BR /&gt;var job = {&lt;BR /&gt;map: _this.map,&lt;BR /&gt;sharingUrl: portal.portalUrl,&lt;BR /&gt;baseFileName: name,&lt;BR /&gt;fileName: files[0].name,&lt;BR /&gt;fileType: "Shapefile",&lt;BR /&gt;publishParameters: params,&lt;BR /&gt;generalize: true,&lt;BR /&gt;numFeatures: 0&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;_this._analyze(job, data).then(function (response) {&lt;/P&gt;&lt;P&gt;return _this._generateFeatures(job, data);&lt;/P&gt;&lt;P&gt;}).then(function (response) {&lt;BR /&gt;array.forEach(response.featureCollection.layers, function (layer) {&lt;BR /&gt;var featureLayer = new FeatureLayer(layer, {&lt;BR /&gt;outFields: ["*"]&lt;BR /&gt;});&lt;BR /&gt;featureLayer.xtnAddData = true;&lt;BR /&gt;if (featureLayer.graphics) {&lt;BR /&gt;graphic = new esri.Graphic(featureLayer.graphics[0].geometry, sfs, {&lt;BR /&gt;keeper: true&lt;BR /&gt;});&lt;BR /&gt;_this.map.graphics.clear();&lt;BR /&gt;_this.map.graphics.add(graphic);&lt;BR /&gt;_this.map.setExtent(featureLayer.graphics[0].geometry.getExtent());&lt;BR /&gt;/* $('#shpFileUpload').val("");*/&lt;BR /&gt;job.numFeatures += featureLayer.graphics.length;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt;})&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;else&lt;BR /&gt;alert(i18nStrings.zipFile)&lt;/P&gt;&lt;P&gt;}, false);&lt;/P&gt;&lt;P&gt;My question is, if it possible to create .Laz and .zLas file similar of presented code above? Can I create custom PointCloudLayers which will create .Laz or .zLas files?In attached file is video of my custom widget, and when i click on "Add to Cart", can I create .Laz&amp;nbsp;or .zLas file using javascript esri api?&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6288290830001w1004h540r719" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6288290830001" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6288290830001w1004h540r719');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6288290830001"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Dec 2021 11:17:53 GMT</pubDate>
    <dc:creator>KiroAndreevGDI</dc:creator>
    <dc:date>2021-12-23T11:17:53Z</dc:date>
    <item>
      <title>Javascript create Laz and zLas files</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/javascript-create-laz-and-zlas-files/m-p/1128583#M21726</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;I have custom widget which can drawing geometry and upload SHP file. In booth&amp;nbsp; sceneries graphics i must to use for creating .Laz or zLas files. The code for reading SHP zip file and present on the map is:&lt;/P&gt;&lt;P&gt;var fileToRead = document.getElementById("shpFileUpload");&lt;BR /&gt;if (fileToRead != null)&lt;BR /&gt;fileToRead.addEventListener("change", function (event) {&lt;BR /&gt;apiUrl = _that.appConfig.apiCallsUrl;&lt;BR /&gt;var fileUpload = $("#shpFileUpload").get(0);&lt;BR /&gt;var files = fileUpload.files;&lt;BR /&gt;var data = new FormData();&lt;BR /&gt;if (files[0].name.indexOf(".zip") !== -1) {&lt;BR /&gt;var portal = new arcgisPortal.Portal('&lt;A href="https://aknlidarappprod.katastar.gov.mk/portal/" target="_blank"&gt;https://aknlidarappprod.katastar.gov.mk/portal/&lt;/A&gt;');&lt;BR /&gt;var fileName = files[0].name;&lt;BR /&gt;document.getElementById("chooseFileId").innerHTML = fileName;&lt;BR /&gt;var name = fileName.split(".");&lt;BR /&gt;name = name[0].replace("c:\\fakepath\\", "");&lt;BR /&gt;var params = {&lt;BR /&gt;'name': name,&lt;BR /&gt;'targetSR': _this.map.spatialReference,&lt;BR /&gt;'maxRecordCount': 1000,&lt;BR /&gt;'enforceInputFileSizeLimit': true,&lt;BR /&gt;'enforceOutputJsonSizeLimit': true&lt;BR /&gt;};&lt;BR /&gt;var extent = scaleUtils.getExtentForScale(_this.map, 40000);&lt;BR /&gt;var resolution = extent.getWidth() / _this.map.width;&lt;BR /&gt;params.generalize = true;&lt;BR /&gt;params.maxAllowableOffset = resolution;&lt;BR /&gt;params.reducePrecision = true;&lt;BR /&gt;params.numberOfDigitsAfterDecimal = 0;&lt;/P&gt;&lt;P&gt;/* data.append(files[0].name, files[0]);*/&lt;BR /&gt;data.append("file", files[0]);&lt;BR /&gt;var job = {&lt;BR /&gt;map: _this.map,&lt;BR /&gt;sharingUrl: portal.portalUrl,&lt;BR /&gt;baseFileName: name,&lt;BR /&gt;fileName: files[0].name,&lt;BR /&gt;fileType: "Shapefile",&lt;BR /&gt;publishParameters: params,&lt;BR /&gt;generalize: true,&lt;BR /&gt;numFeatures: 0&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;_this._analyze(job, data).then(function (response) {&lt;/P&gt;&lt;P&gt;return _this._generateFeatures(job, data);&lt;/P&gt;&lt;P&gt;}).then(function (response) {&lt;BR /&gt;array.forEach(response.featureCollection.layers, function (layer) {&lt;BR /&gt;var featureLayer = new FeatureLayer(layer, {&lt;BR /&gt;outFields: ["*"]&lt;BR /&gt;});&lt;BR /&gt;featureLayer.xtnAddData = true;&lt;BR /&gt;if (featureLayer.graphics) {&lt;BR /&gt;graphic = new esri.Graphic(featureLayer.graphics[0].geometry, sfs, {&lt;BR /&gt;keeper: true&lt;BR /&gt;});&lt;BR /&gt;_this.map.graphics.clear();&lt;BR /&gt;_this.map.graphics.add(graphic);&lt;BR /&gt;_this.map.setExtent(featureLayer.graphics[0].geometry.getExtent());&lt;BR /&gt;/* $('#shpFileUpload').val("");*/&lt;BR /&gt;job.numFeatures += featureLayer.graphics.length;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt;})&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;else&lt;BR /&gt;alert(i18nStrings.zipFile)&lt;/P&gt;&lt;P&gt;}, false);&lt;/P&gt;&lt;P&gt;My question is, if it possible to create .Laz and .zLas file similar of presented code above? Can I create custom PointCloudLayers which will create .Laz or .zLas files?In attached file is video of my custom widget, and when i click on "Add to Cart", can I create .Laz&amp;nbsp;or .zLas file using javascript esri api?&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-6288290830001w1004h540r89" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="6288290830001" data-account="6161463677001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6161463677001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-6288290830001w1004h540r89');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.esri.com/t5/video/gallerypage/video-id/6288290830001"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Dec 2021 11:17:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/javascript-create-laz-and-zlas-files/m-p/1128583#M21726</guid>
      <dc:creator>KiroAndreevGDI</dc:creator>
      <dc:date>2021-12-23T11:17:53Z</dc:date>
    </item>
  </channel>
</rss>

