js正射影像图提取高程点如何在cad中使用

JavaScript05

js正射影像图提取高程点如何在cad中使用,第1张

在工程应用”-“高程点生成数据文件”-“ga.dat中使用。

工程应用-高程点生成数据文件-无编码高程点,操作时需要指定高程值注记文字所在的图层名称,且该图层必须只能有高程点和高程注记文字,不能包含其他图形元素和文字注记。才能够提取出高程值。

如果高程点和高程文字注记图层已经不是独立的图层,已经与其他图形元素和文字注记合并为单一的图层,就需要人工提取独立的高程点和文字注记至独立的图层。或者使用【工程应用】-【指定点生成数据文件】功能,逐个用鼠标点选各个高程点并同时录入高程值。

<!DOCTYPE html>

<html>

<head>

  <meta charset="utf-8">

  <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">

  <title>ImageryLayer - client side pixel filter - 4.6</title>

  <link rel="stylesheet" href="https://js.arcgis.com/4.6/esri/css/main.css">

  <script src="https://js.arcgis.com/4.6/"></script>

  <style>

    html,

    body,

    #viewDiv {

      padding: 0

      margin: 0

      height: 100%

      width: 100%

    }

  </style>

  <script>

    require([

      "esri/Map",

      "esri/views/MapView",

      "esri/layers/ImageryLayer",

      "esri/layers/support/RasterFunction",

      "esri/layers/support/DimensionalDefinition",

      "esri/layers/support/MosaicRule",

      "esri/core/watchUtils",

      "dojo/domReady!"

    ], function(

      Map, MapView, ImageryLayer,

      RasterFunction, DimensionalDefinition, MosaicRule, watchUtils

    ) {

      // The URL to an image layer representing sea temperature

      var url =

        "https://sampleserver6.arcgisonline.com/arcgis/rest/services/ScientificData/SeaTemperature/ImageServer"

      var map = new Map({

        basemap: "dark-gray"

      })

      var view = new MapView({

        container: "viewDiv",

        map: map,

        zoom: 3,

        center: [-32, 28],

        popup: {

          actions: []

        },

      })

      /**********************************************************************************************

       * Variable water_temp describes the water temperature, it has both depth and time dimensions.

       * This snippet sets water_temp to a specific depth and a specific time by defining the

       * multidimensionalDefinition property of a MosaicRule object.

       **********************************************************************************************/

      var dimInfo = [] // Define dimensional definition as array

      // Multidimensional information of image service can be viewed at thisService/multiDimensionalInfo

      // DEPTH: show only temperatures at sea surface

      dimInfo.push(new DimensionalDefinition({

        dimensionName: "StdZ", // Water depth

        values: [0], // Sea surface or 0ft

        isSlice: true

      }))

      // TIME: only show temperatures for the week of April 7, 2014

      dimInfo.push(new DimensionalDefinition({

        dimensionName: "StdTime", // time temp was recorded

        values: [1396828800000], // Week of April 7, 2014

        isSlice: true

      }))

      var mr = new MosaicRule({

        multidimensionalDefinition: dimInfo

      })

      /******************************************

       * Set the rendering rule to the

       * "None" raster function. This will allow

       * us to gain access to the temperature

       * value assigned to each pixel

       *****************************************/

      var rf = new RasterFunction({

        functionName: "None"

      })

      /**********************************************************

       * The PixelFilter. This function is used to color the

       * pixels. By default, each pixel has one band containing

       * a temperature value. Without the pixelFilter

       * the layer would render in a grayscale. We will

       * replace the single band with three bands - red,

       * green, and blue to give color to the layer. This

       * will overwrite the original temperature value. See

       * the getTemp() function for converting the RGB values

       * back to the original temperature value.

       *********************************************************/

      function colorize(pixelData) {

        var pixelBlock, factor, minValue, maxValue

        if (pixelData === null || pixelData.pixelBlock === null ||

          pixelData.pixelBlock.pixels === null) {

          return

        }

        // The pixelBlock stores the values of all pixels visible in the view

        pixelBlock = pixelData.pixelBlock

        // Get the min and max values of the data in the current view

        minValue = pixelBlock.statistics[0].minValue

        maxValue = pixelBlock.statistics[0].maxValue

        // The pixels visible in the view

        var pixels = pixelBlock.pixels

        // The number of pixels in the pixelBlock

        var numPixels = pixelBlock.width * pixelBlock.height

        // Calculate the factor by which to determine the red and blue

        // values in the colorized version of the layer

        factor = 255.0 / (maxValue - minValue)

        // Get the pixels containing temperature values in the only band of the data

        var tempBand = pixels[0]

        // Create empty arrays for each of the RGB bands to set on the pixelBlock

        var rBand = []

        var gBand = []

        var bBand = []

        // Loop through all the pixels in the view

        for (i = 0 i < numPixels i++) {

          // Get the pixel value (the temperature) recorded at the pixel location

          var tempValue = tempBand[i]

          // Calculate the red value based on the factor

          var red = (tempValue - minValue) * factor

          // Sets a color between blue (coldest) and red (warmest) in each band

          rBand[i] = red

          gBand[i] = 0

          bBand[i] = 255 - red

        }

        // Set the new pixel values on the pixelBlock

        pixelData.pixelBlock.pixels = [rBand, gBand, bBand]

        pixelData.pixelBlock.pixelType = "U8" // U8 is used for color

      }

      var layer = new ImageryLayer({

        url: url,

        renderingRule: rf,

        pixelFilter: colorize,

        mosaicRule: mr,

        // The popup will display the temperature at the clicked location

        popupTemplate: { // autocasts as new PopupTemplate()

          title: "Sea Surface Temperature",

          content: "{Raster.ServicePixelValue}° Celsius"

        }

      })

      // Add sea temperature layer to the map

      map.add(layer)

      // Display popup when the layer view loads

      view.whenLayerView(layer).then(function(layerView) {

        watchUtils.whenFalseOnce(layerView, "updating", function(newVal) {

          view.popup.open({

            title: "Sea Surface Temperature",

            content: "Click anywhere in the oceans to view the sea temperature at that location.",

            location: view.center

          })

        })

      })

    })

  </script>

</head>

<body>

  <div id="viewDiv"></div>

</body>

</html>

DJ是DISCO JOCIKEY(唱片骑士)的英文缩写,以DISCO为主,DJ这两个字现在已经代表了最新、最劲、最毒、最HIGH的Muisc。

引申为广播电台主持音乐节目的主持人。

近年来一些大型的派对中,VJ这名词经常可见,但这里指的VJ并非大家认知的音乐频道主持人,VJ指的是Visual Jockey(影像骑师),简单来说,就是负责提供Party影像的人,DJ提供音乐;VJ提供影像。如Fatboy Slim的Brighton Beach现场邀请MV导演Tim Fleming担任VJ;Underworld与Tomato的合作等等,都显示出未来Party的新趋势---音乐与视觉的结合。VJ的做法就如同DJ的概念一般,将影像、动画等视觉元素作即时的剪接,并添加效果,由於近年来电脑科技的发达,一台laptop搭配软体几乎可以应付完整的演出,大大降低担任VJ的门槛。

欧美VJ文化的发展

端看这几年的大型派对,几乎无不出现VJ的踪迹,甚至跨界到传统歌手演唱会,而且多位百大DJ们,也开始尝试与VJ合作发行DVD,就可以知道VJ在欧美蓬勃的盛况了。如Underworld与Tomato的合作的"Everything, Everything"现场实况;Ninja Tune旗下DJ的专辑多附上影像创作,以及电音大厂Moonshine的AV:X系列等等。另外著名的英国当代视觉影像展[ onedotzero ],这一两年也专注在VJ领域的探讨。

亚洲VJ文化发展

相较於欧美,亚洲的VJ发展更是不落人后,甚至是影响VJ文化发展的关键之一。影像王国的日本,这几年研发了许许多多的VJ软体,其中Motion Dive软体,几乎已成为VJ的标准工具。其中参与研发的的视觉团体glamoove也因此声名大噪,受邀到各国演出。今年glamoove与日本知名制作人DJ Mondo Grosso合作,制作了一张以VJ为概念的DVD。

反观台湾, VJ的观念虽然不怎麼普及,但这几年仍然可以在大型派对中看到VJ的踪迹,而多家知名的舞厅也开始加入VJ的配置,前景看好。由知名音乐创作人DJ monbaza等人所发请的Art Project,是台湾首先有系统的介绍VJ观念的组织,但可惜碍於经费与场地,目前暂时停止活动。知名派对组织The LOOP,也邀请过几位国外VJ来台交流,如fatboy slim的MV导演Tim Fleming就成来台演出过,让台湾的VJ留下深刻的印象。

由此可见,在未来的几年来,VJ 将会越来越受到瞩目,所以下次在club时,别忘了留意一下VJ们精心准备的视觉影像喔( pioneer girl )