当前位置: 首页 > news >正文

布吉做棋牌网站建设有哪些公司免费引流人脉推广软件

布吉做棋牌网站建设有哪些公司,免费引流人脉推广软件,销帮帮crm,长安做网站公司文章目录 前言几何形体点线面体 标签文字图标 几何文件GeoJsonKMLCZML 三维模型总结 前言 本文介绍Cesium如何加载空间数据,空间数据即明确定义在三维空间中的数据,空间数据包括以下几类:1、几何形体(点、线、面、体)…

文章目录

  • 前言
  • 几何形体
    • 线
  • 标签
    • 文字
    • 图标
  • 几何文件
    • GeoJson
    • KML
    • CZML
  • 三维模型
  • 总结


前言

本文介绍Cesium如何加载空间数据,空间数据即明确定义在三维空间中的数据,空间数据包括以下几类:1、几何形体(点、线、面、体)2、标签(文字图标等)3、几何文件(geojson、kml、czml)4、三维模型(gltf、gltf)。3D Tiles 作为Cesium提出的处理大型三维数据的格式暂不在本文介绍。


几何形体

在前一篇文章中讲到,Entity 是由 Primitive 封装而来API,空间几何数据的实现几乎是由他们提供,几何要素从类型上区分可划分为点、线、面、体等,如下表所示。

功能Entity APIPrimitive API
创建点要素,可控制点颜色、轮廓等PointGraphics-
创可设定宽度的折线PolylineGraphicsPolylineGeometry
各种几何要素轮廓线、不可设置宽度,轮廓线种类包括:立方体、圆/椭圆、廊、圆柱/锥、球/椭球、矩形、多边形、面、墙、管状线等-SimplePolylineGeometry
圆形面要素-CircleGeometry
廊状面要素CorridorGraphicsCorridorGeometry
椭圆状面要素EllipseGraphicsEllipseGeometry
矩形面要素RectangleGraphicsRectangleGeometry
多边形面要素PolygonGraphicsPolygonGeometry
平面要素PlaneGraphicsPlaneGeometry
立方体要素BoxGraphicsBoxGeometry
圆柱、圆锥体要素CylinderGraphicsCylinderGeometry
椭圆体要素EllipsoidGraphicsEllipseGeometry
管状体要素PolylineGraphicsPolylineGeometry
球体要素-SphereGeometry
墙体要素WallGraphicsWallGeometry

Entity支持的属性如下,Entity添加几何体后返回Viewer对象
在这里插入图片描述

  const point = viewer.entities.add({// 定位点position: Cesium.Cartesian3.fromDegrees(117, 40, 100),// 点point: {pixelSize: 10,// 大小color: Cesium.Color.RED, //点的颜色outlineWidth: 4, // 外框大小outlineColor: Cesium.Color.WHITE, //外框颜色},});

在这里插入图片描述

线

  • 普通线
  const line = viewer.entities.add({name: "red_line",polyline: {positions: Cesium.Cartesian3.fromDegreesArray([117, 40, 118, 40]), //线位置width: 5, // 宽度material: Cesium.Color.RED, // 材质clampToGround: true, // 贴地}});

在这里插入图片描述

  • 轮廓线——通过Entity
  const outlineOnly = viewer.entities.add({name: "red_box_outline",position: Cesium.Cartesian3.fromDegrees(117.2, 40.0, 300.0),box: {// 维度dimensions: new Cesium.Cartesian3(300.0, 300.0, 300.0),fill: false, // 填充面outline: true, // 开启边框outlineColor: Cesium.Color.RED ,// 边框颜色},});

在这里插入图片描述

  • 轮廓线——通过Primitive
  const box = Cesium.BoxOutlineGeometry.fromDimensions({dimensions: new Cesium.Cartesian3(500000.0, 500000.0, 500000.0),});const geometry = Cesium.BoxOutlineGeometry.createGeometry(box);// 创建boxOutline的几何实例let boxOutlineInstance = new Cesium.GeometryInstance({geometry: geometry,modelMatrix: Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(170, 40)),new Cesium.Cartesian3(0.0, 0.0, 1000.0),new Cesium.Matrix4()),id: "boxOutline",attributes: {color: Cesium.ColorGeometryInstanceAttribute.fromColor(Cesium.Color.RED),},});// 创建图元let primitive = new Cesium.Primitive({geometryInstances: boxOutlineInstance,appearance: new Cesium.PerInstanceColorAppearance({flat: true,faceForward: true,translucent: false,closed: false,}),asynchronous: false,show: true,modelMatrix: Cesium.Matrix4.IDENTITY,vertexCacheOptimize: false,interleave: false,compressVertices: true,releaseGeometryInstances: true,allowPicking: true,cull: true,debugShowBoundingVolume: false,shadows: Cesium.ShadowMode.DISABLED,});viewer.scene.primitives.add(primitive);

在这里插入图片描述

  const redPlane = viewer.entities.add({name: "red_plane",position: Cesium.Cartesian3.fromDegrees(117.1, 40.0, 300.0),plane: {plane: new Cesium.Plane(Cesium.Cartesian3.UNIT_Y, 0.0),dimensions: new Cesium.Cartesian2(500.0, 300.0),material: Cesium.Color.RED.withAlpha(0.5),outline: true,outlineColor: Cesium.Color.BLACK,},});

在这里插入图片描述

  const redBox = viewer.entities.add({name: "red_box",position: Cesium.Cartesian3.fromDegrees(117.3, 40.0, 400.0),box: {dimensions: new Cesium.Cartesian3(400.0, 200.0, 300.0),material: Cesium.Color.RED.withAlpha(0.5),outline: true,outlineColor: Cesium.Color.BLACK,},});

在这里插入图片描述

标签

文字

  const label = viewer.entities.add({position: Cesium.Cartesian3.fromDegrees(117.4, 40, 1500),label: {text: "这是一团火",font: "24px sans-serif", // 大小 字型fillColor: Cesium.Color.WHITE, //字体颜色outlineColor: Cesium.Color.BLACK, //字体外框颜色outlineWidth: 4, // 字边宽style: Cesium.LabelStyle.FILL_AND_OUTLINE, // FILL填充文字,OUTLINE勾勒标签,FILL_AND_OUTLINE填充文字和勾勒标签pixelOffset: new Cesium.Cartesian2(0, -24),// 设置文字的偏移量  horizontalOrigin: Cesium.HorizontalOrigin.CENTER, // 设置文字的显示位置,LEFT /RIGHT /CENTERverticalOrigin: Cesium.VerticalOrigin.BOTTOM,       // 设置文字的显示位置},});

图标

  const label = viewer.entities.add({position: Cesium.Cartesian3.fromDegrees(117.4, 40, 1500),billboard: {image: "../texture/Fire.png",width: 50,height: 50,verticalOrigin: Cesium.VerticalOrigin.TOP, //垂直显示位置horizontalOrigin: Cesium.HorizontalOrigin.CENTER,  // 水平显示位置},});

在这里插入图片描述

几何文件

常见的几何文件包括GeoJson、KML,除此外,Cesium还在JSON数据的基础上扩充了CZML类型来自持更大的数据流。DataSoureCollection 是 Cesium中加载矢量数据的主要方式之一,最大特点是支持加载矢量数据集与外部文件的调用,主要分为CzmlDataSourceKmlDataSourceGeoJsonDataSource三种,分别对应加载CZMLKMLGeoJSON 格式数据。

更多代码示例见官网:https://sandcastle.cesium.com/?src=KML.html&label=DataSources

GeoJson

  // geojsonconst chinaGeoJson = Cesium.GeoJsonDataSource.load("https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json",{stroke: Cesium.Color.RED, // 边线默认色fill: Cesium.Color.SKYBLUE.withAlpha(0.5), // 默认填充色strokeWidth: 4, // 多边形线条和多边形轮廓的默认宽});chinaGeoJson.then((dataSources) => { // geojson加载完成的回调viewer.dataSources.add(dataSources);const entities = dataSources.entities.values;entities.forEach((entity, i) => {entity.polygon.material = new Cesium.ColorMaterialProperty(Cesium.Color.fromRandom({ // 每个json随机赋色alpha: 1,}));entity.polygon.outline = false;entity.polygon.extrudedHeight = 1000 // 拉伸高});});

在这里插入图片描述

KML

  const kmlDataPromise = Cesium.KmlDataSource.load(kmlUrl, {camera: viewer.scene.camera,canvas: viewer.scene.canvas,screenOverlayContainer: viewer.container,});kmlDataPromise.then(function (dataSource) {viewer.dataSources.add(dataSource);});

在这里插入图片描述

CZML

CZML的使用可见 Cesium_CZML

三维模型

  // 创建模型function createModel(url, height) {const position = Cesium.Cartesian3.fromDegrees(117, 40.01, height);const heading = Cesium.Math.toRadians(135);const pitch = 0;const roll = 0;const hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);const orientation = Cesium.Transforms.headingPitchRollQuaternion(position,hpr);const entity = viewer.entities.add({name: url,position: position,orientation: orientation,model: {uri: url,minimumPixelSize: 128,maximumScale: 20000,},});viewer.trackedEntity = entity;}createModel("../model/Air.glb", 1000)createModel("../Assets/CesiumMilkTruck.glb",150)

在这里插入图片描述

总结

  • 几何形体:点、线、面、体

  • 标签:文字、图标

  • 几何文件:GeoJson、KML、CZML

  • 三维模型:glb/gltf


文章转载自:
http://inflatable.gthc.cn
http://acting.gthc.cn
http://isolex.gthc.cn
http://telemeter.gthc.cn
http://conspicuously.gthc.cn
http://vehicle.gthc.cn
http://logway.gthc.cn
http://hackery.gthc.cn
http://microweld.gthc.cn
http://novillero.gthc.cn
http://rosaceous.gthc.cn
http://antehall.gthc.cn
http://yamalka.gthc.cn
http://obliquity.gthc.cn
http://dehorn.gthc.cn
http://cataclysmic.gthc.cn
http://unprecedented.gthc.cn
http://oesophageal.gthc.cn
http://synchronizer.gthc.cn
http://kriegie.gthc.cn
http://tangle.gthc.cn
http://prodigalise.gthc.cn
http://datary.gthc.cn
http://inserted.gthc.cn
http://wageworker.gthc.cn
http://resaddle.gthc.cn
http://integrate.gthc.cn
http://shepherdless.gthc.cn
http://eda.gthc.cn
http://preignition.gthc.cn
http://transracial.gthc.cn
http://psychology.gthc.cn
http://yale.gthc.cn
http://peracid.gthc.cn
http://haler.gthc.cn
http://balanceable.gthc.cn
http://lathwork.gthc.cn
http://dantesque.gthc.cn
http://piker.gthc.cn
http://alkoran.gthc.cn
http://footfault.gthc.cn
http://choreography.gthc.cn
http://habatsu.gthc.cn
http://bearberry.gthc.cn
http://tribal.gthc.cn
http://afterpeak.gthc.cn
http://cocain.gthc.cn
http://ikebana.gthc.cn
http://althea.gthc.cn
http://expositorily.gthc.cn
http://shema.gthc.cn
http://manifestation.gthc.cn
http://premeiotic.gthc.cn
http://caithness.gthc.cn
http://signalment.gthc.cn
http://homemaker.gthc.cn
http://reinflame.gthc.cn
http://flukey.gthc.cn
http://nikolayevsk.gthc.cn
http://pinniped.gthc.cn
http://flickeringly.gthc.cn
http://tombarolo.gthc.cn
http://ballflower.gthc.cn
http://luge.gthc.cn
http://spiry.gthc.cn
http://zingaro.gthc.cn
http://hypoxemia.gthc.cn
http://refashion.gthc.cn
http://cherrapunji.gthc.cn
http://rubenesque.gthc.cn
http://hallmark.gthc.cn
http://bout.gthc.cn
http://butyrin.gthc.cn
http://giddyhead.gthc.cn
http://kantian.gthc.cn
http://lucid.gthc.cn
http://watercart.gthc.cn
http://isostatic.gthc.cn
http://reseau.gthc.cn
http://shapka.gthc.cn
http://luxemburg.gthc.cn
http://galician.gthc.cn
http://scaphocephaly.gthc.cn
http://borrow.gthc.cn
http://hutted.gthc.cn
http://autotrophic.gthc.cn
http://kia.gthc.cn
http://berdache.gthc.cn
http://overburden.gthc.cn
http://redoubtable.gthc.cn
http://notation.gthc.cn
http://crispbread.gthc.cn
http://mortgagor.gthc.cn
http://archaism.gthc.cn
http://rill.gthc.cn
http://uranian.gthc.cn
http://kappa.gthc.cn
http://silicomanganese.gthc.cn
http://matelot.gthc.cn
http://gallicize.gthc.cn
http://www.15wanjia.com/news/76867.html

相关文章:

  • 南平建设集团有限公司网站seo网站有哪些
  • 网站备案拍照是什么百度链接地址
  • 西部数码网站管理软件百度引流免费推广怎么做
  • 河源市做网站郑州seo哪家好
  • 美食地图网站开发内部优化
  • 滨州建设局网站关键词排名软件
  • 桂林dj网站重庆网站seo公司
  • 朝阳区社区建设网站360安全浏览器
  • phpcms做视频网站口碑营销什么意思
  • 常州哪有做网站北京网优化seo公司
  • 建站之星极速版个人免费域名注册网站
  • 那个网站做图片好seo优化服务
  • 客服电话24小时人工服务热线seo是做什么的
  • 个人网站建设视频教学百度关键词下拉有什么软件
  • 网络运营外包托管青岛自动seo
  • 哪些网站的登陆界面做的好看优化落实疫情防控
  • 手机网站模版免费下载网页优化seo广州
  • 做nba直播网站有哪些厦门人才网招聘最新信息
  • 提供秦皇岛网站建设哪里有google安卓版下载
  • 做网站的草图 用什么画百度域名注册官网
  • 做公司宣传册的网站长沙好的seo外包公司
  • 学校网站建设注意点seo优化什么意思
  • 芜湖酒店网站建设外贸怎么找客户资源
  • 公司网站建设包括推广联盟平台
  • 东莞疫情严重的地方正规的关键词优化软件
  • 怎样到国外做合法博彩法网站大数据网站
  • 佛山网站建设服务器优化设计答案六年级上册语文
  • 怀化订水网站图片外链
  • 做网站设计用到的软件做百度网站一年多少钱
  • 反网站搭建一条龙无锡网站建设