function getLayerBandHTML(layerID) { if(classifyLayerData[layerID].bands && classifyLayerData[layerID].type!='Classification'){ bandOutput = ""; bandOutput += ""; bandOutput += "
"+classifyLayerData[layerID].name+"
Bands: "; for(i=1; i<=classifyLayerData[layerID].bands; i++) { bandOutput += '
Bands: "; for(i=1; i<=classifyData[layerID].bands; i++) { bandOutput += '"+DNGPLists[classifyData[list.selectedIndex].sensor]; document.getElementById('sensors').value = classifyData[list.selectedIndex].sensor; document.getElementById('DNGP').value = list.options[list.selectedIndex].value; document.getElementById('layers').selectedIndex = 0; newUserLayer(list.options[list.selectedIndex].value, list.options[list.selectedIndex].label, "selectPic", "layerName", "image", "createZoneMap"); classifyData.splice(list.selectedIndex,1); } else { document.getElementById('layers').value = list.options[list.selectedIndex].value; document.getElementById('sensors').selectedIndex = 0; document.getElementById('DNGP').selectedIndex = 0; newUserLayer(list.options[list.selectedIndex].value, list.options[list.selectedIndex].label, "selectPic", "layerName", "layer", "createZoneMap"); classifyLayerData.splice(list.selectedIndex-document.getElementById('listDNGPLayers').childNodes.length,1); } document.getElementById('bands').innerHTML = ""; list.options[list.selectedIndex] = null; } function getImgBandString(layerID) { //var ImgBands:String; ImgBands = ""; if(NDVISensors.in_array(classifyData[layerID].sensor)) { if(classifyData[layerID].setBands[9]) { ImgBands = ",ndvi"; } } if(GNDVISensors.in_array(classifyData[layerID].sensor)) { if(classifyData[layerID].setBands[10]) { ImgBands += ",greenndvi"; } } for(i=1; i<=classifyData[layerID].bands; i++) { if(classifyData[layerID].setBands[i]) { ImgBands += ","+i; } } return(ImgBands.substring(1)); } function getLayerBandString(layerID) { //var ImgBands:String; ImgBands = ""; if(classifyLayerData[layerID].bands&&classifyLayerData[layerID].type!='Classification'){ for(i=1; i<=classifyLayerData[layerID].bands; i++) { if(classifyLayerData[layerID].setBands[i]) { ImgBands += ","+i; } } } else { ImgBands += ",1"; } return(ImgBands.substring(1)); } //-------------------------------------------------------------------------------- // buildClassifyURL: // This routine builds the classification URL and passes it to the routine // that will "include" it into the hiddenFrame source to execute the // classification on the remote server. // Arguments: // numZones - number of classifcation zones passed to classification model // targetId - string containing id of page element to fill with overlay image //-------------------------------------------------------------------------------- function buildClassifyURL(numZones, targetId) { // Check that there are layers/images to classify, else return if(!document.getElementById('classify').length) { alert("No layers to process!"); return; } // Check that resolution is either empty (use default 10) or is a valid number autoCalc = (numZones>10); // Check that resolution is either empty (use default 10) or is a valid number resolution = document.getElementById('resolution').value; auto_res = document.getElementById('auto_res').checked; if(resolution>""){ if(isNaN(resolution)||(resolution<10)||(resolution>500)) { alert("Resolution must be an integer between 10 and 500!"); document.getElementById('resolution').focus(); return; } } // Initialize number of zones and classification URL with user and AOI args numZones = typeof(numZones) != "undefined" ? numZones : 3; classifyURL = "/classification.php?"; if(autoCalc){ classifyURL += "AUTO=1"; } else { classifyURL += "C_NUM="+numZones; } if(auto_res) { classifyURL += "&AUTO_RES=true"; } if(resolution) { classifyURL += "&RES="+resolution; } // Loop through classification layers/images and build URL arg list bandList = ""; list = document.getElementById('classify'); layerCt = 0; for(k=0; k