vol·10

收录文章 8 篇、工具 3 个、数据 1 份。

文章 ​

1.从 GIS 到 CAD:三维场地下载 ​

【英文】链接 ESRI的博客,介绍如何选择三维模型图层并导出到专业的CAD软件中编辑。这项功能对规划师,建筑师来说应该蛮好用。

2.使用Landsat制作城市热岛地图 ​

【中文】链接 来自ESRI的博客,使用Landsat制作城市热岛地图。

3.Cesium调试技巧 - 百年内必成大牛 - 博客园 ​

【中文】Cesium调试技巧 - 百年内必成大牛 - 博客园 一篇总结Cesium调试技巧的博文。

466780360-4f63db88-f3ba-4b0b-acbd-452db172f8bd

4.cesium地形相关的分析 ​

传统的GIS地形分析,包括等高线,坡向,坡度等,在Cesium中可以用glob材质来做可视化,优点是内置功能,使用简单而缺点是材质计算在GPU一端进行,针对的是整个场景(画布),无法自定义感兴趣区域,另外材质计算后无法传递量化后的分析信息,仅仅只是视觉效果,所以无法在场景中对分析结果进行交互。

slope-github

contour-github

5.Using WebGL 2 by default - CesiumJS - Cesium Community ​

【英文】Using WebGL 2 by default - CesiumJS - Cesium Community Cesium官方团队关于WebGL版本变更的说明。

6.Cesium道路穿梭线效果 ​

链接 参考网上实现的道路穿梭线效果,我使用ts重写并适配了WebGL2。

Image

ts
  import { Event, JulianDate, Material, defined, Color } from 'cesium';
  const materialType = 'SpritelineMaterial';
  /**
   * @description 线段流动材质
   * @export
   * @class SpritelineMaterialProperty
   */
  export class SpritelineMaterialProperty {
    _definitionChanged = new Event();
    color: any;
    duration: number;
    image: any;
    _time = new Date().getMilliseconds();
    type: string = materialType;

    constructor(duration: number, image: string) {
      this.duration = duration;
      this.image = image;
    }
      
    get isConstant() {
      return false;
    }
      
    get definitionChanged() {
      return this._definitionChanged;
    }
      
    getType() {
      return this.type;
    }
      
    getValue(time: JulianDate, result: any) {
      if (!defined(result)) {
        result = {};
      }
      result.image = this.image;
      const dif = JulianDate.toDate(time).getMilliseconds() - this._time;
      result.time = (dif % this.duration) / this.duration;
      return result;
    }
      
    equals(e: SpritelineMaterialProperty) {
      return this === e || (e instanceof SpritelineMaterialProperty && this.duration === e.duration);
    }
  }

  const fs = `
  czm_material czm_getMaterial(czm_materialInput materialInput)
  {
    czm_material m = czm_getDefaultMaterial(materialInput);
    vec2 st = materialInput.st;
    vec4 colorImage = texture(image, vec2(fract(st.s - time), st.t));
    m.alpha = colorImage.a;
    m.diffuse = colorImage.rgb * 1.5 ;
    return m;
  }
  `;

  // @ts-ignore
  Material._materialCache.addMaterial(materialType, {
    fabric: {
      type: materialType,
      uniforms: {
        color: new Color(1, 0, 0, 0.5),
        image: '',
        transparent: true,
        time: 50,
      },
      source: fs,
    },
    translucent: function (material: Material) {
      return true;
    },
  });

7.Cesium可视域分析升级为WebGL2 ​

之前的可视域分析,依赖旧版本的Cesium(新旧版本以1.10为分界),升级到较新版本之后,运行出现异常,经查旧版使用WebGL1,而新版使用WebGL2,二者的着色器代码并不完全兼容。

下图为重构之后在1.123版本上的效果。

image-20250707150904535

8.台灣電力座標轉換與定位 ​

【中文】链接 台湾省内的电箱可以查询地理位置,我记得大陆的电箱和路灯上也有编号,不知道类似空间查询的功能有没有城市支持。如果路上发生了紧急事件,例如疾病发作,公众安全事件等,报警时直接报路灯电箱编号就能很快锁定位置。

下面这张图是编号的解释。

img

工具 ​

1.webgl20-reference-guide.pdf ​

webgl20-reference-guide.pdf 一份WebGL2.0的引用参考文档。

2.PostGIS中文版手册 ​

链接 PostGIS中文版手册,对应版本为3.5.4。

3.Conversion | MyGeodata Converter | MyGeodata Cloud ​

Conversion | MyGeodata Converter | MyGeodata Cloud 在线GIS数据格式转换

数据分享 ​

1.Telling Stories with Maps ​

ESRI出版的新书《用地图讲述故事》,值得一看。 我找到了英文版,分享地址(仅供学习交流):https://drive.google.com/file/d/1DQNVh_WPfOuXxkzYvhEeuPxpZg3X_uNQ/view?usp=drive_link