- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们有一些KML文件,其中包含一些定义非常严格的折线(主要用于绘制文本,但并非唯一)。当我们将相同的KML文件提取到Cesium(1.6或1.7),OpenLayers或GoogleEarth中时,得到的结果是相同的:
铯以非常锯齿的方式呈现文本。
OpenLayers和GoogleEarth均可流畅地呈现文本。
我们研究了我们认为负责数据“精简”的removeDuplicates()
方法。如果我们将EPSILON设置为较高的值,则“文本折线”会很好地呈现。我们可以在某处覆盖removeDuplicatesEpsilon
变量吗?
在removeDuplicates()
方法内部,一旦确定要删除至少1个点,就可以将每个后续点与列表中的上一个点进行比较。它不应该将每个点与以前接受的点进行比较吗? (与列表中的上一个点相对,后者也可能不包括在内)。
铯代码:
var removeDuplicatesEpsilon = CesiumMath.EPSILON7;
PolylinePipeline.removeDuplicates = function(positions) {
if (!defined(positions)) {
throw new DeveloperError('positions is required.');
}
var length = positions.length;
if (length < 2) {
return undefined;
}
var i;
var v0;
var v1;
for (i = 1; i < length; ++i) {
v0 = positions[i - 1];
v1 = positions[i];
if (Cartesian3.equalsEpsilon(v0, v1, removeDuplicatesEpsilon)) {
break;
}
}
if (i === length) {
return undefined;
}
var cleanedPositions = positions.slice(0, i);
for (; i < length; ++i) {
v0 = positions[i - 1];
v1 = positions[i];
if (!Cartesian3.equalsEpsilon(v0, v1, removeDuplicatesEpsilon)) {
cleanedPositions.push(Cartesian3.clone(v1));
}
}
return cleanedPositions;
};
<?xml version="1.0" encoding="utf-16"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Document id="c7e47ca6-242c-4e1a-b4ca-02aff9d98ee4">
<name>Letters</name>
<Placemark id="c00e3314-bc14-4a1e-aa66-d3d70e217cda1">
<name>C</name>
<styleUrl>#S0</styleUrl>
<LineString>
<coordinates>-93.7997582661072,28.2156338033321,0 -93.7997341817777,28.2156233335357,0 -93.7997105791612,28.2156025354265,0 -93.7996990187067,28.215581878842,0 -93.7997036750268,28.2155796151045,0 -93.7997150749106,28.2155995642938,0 -93.7997375535976,28.215619372004,0 -93.7997595506083,28.2156291343859,0 -93.7998041869331,28.2156291344279,0 -93.7998263445402,28.2156193720874,0 -93.7998486627121,28.2155995644193,0 -93.799860223207,28.2155798982196,0 -93.7998713020103,28.2155500452192,0 -93.799871302029,28.2154999600916,0 -93.7998602232594,28.215470107084,0 -93.7998486627993,28.2154504408918,0 -93.79982634469,28.2154306331999,0 -93.7998041871417,28.2154208708285,0 -93.799759550904,28.2154208707865,0 -93.7997375539044,28.2154306331165,0 -93.7997150751844,28.2154504407663,0 -93.799703675239,28.215470389905,0 -93.7996990189326,28.2154681261704,0 -93.7997105794524,28.2154474696035,0 -93.7997341821035,28.2154266715762,0 -93.7997582664183,28.2154164848056,0 -93.7998056322006,28.21541648485,0 -93.7998295559378,28.2154266716658,0 -93.7998533191013,28.2154474697376,0 -93.7998647189985,28.2154684092942,0 -93.7998766005805,28.2154993941569,0 -93.7998766005639,28.2155506111568,0 -93.7998647189493,28.2155815960297,0 -93.7998533190173,28.2156025355605,0 -93.7998295557876,28.2156233336253,0 -93.7998056319859,28.2156338033766,0 -93.7997582661072,28.2156338033321,0 </coordinates>
</LineString>
</Placemark>
<Placemark id="c00e3314-bc14-4a1e-aa66-d3d70e217cda2">
<name>O - outer</name>
<styleUrl>#S0</styleUrl>
<LineString>
<coordinates>-93.7995333556067,28.2156193715947,0 -93.7995556738038,28.2155995639742,0 -93.7995672343623,28.2155798977991,0 -93.7995783132305,28.2155500448223,0 -93.7995783133866,28.2154999596947,0 -93.7995672347159,28.2154701066634,0 -93.7995556743001,28.2154504404467,0 -93.7995333562743,28.2154306327072,0 -93.7995111987138,28.2154208702886,0 -93.7994665624956,28.2154208701515,0 -93.7994445654692,28.2154306324346,0 -93.7994220866754,28.2154504400365,0 -93.7994106866767,28.2154701061829,0 -93.7993994471974,28.2154999591456,0 -93.7993994469574,28.2155500442731,0 -93.7994106861621,28.2155798973185,0 -93.7994220859925,28.215599563564,0 -93.7994445646446,28.2156193713221,0 -93.7994665616286,28.2156291337509,0 -93.7995111979339,28.215629133888,0 -93.7995333556067,28.2156193715947,0 </coordinates>
</LineString>
</Placemark>
<Placemark id="c00e3314-bc14-4a1e-aa66-d3d70e217cda3">
<name>O - inner</name>
<styleUrl>#S0</styleUrl>
<LineString>
<coordinates>-93.7994652771049,28.2156338026944,0 -93.7994411928333,28.2156233328466,0 -93.7994175902544,28.2156025346871,0 -93.7994060298579,28.21558159511,0 -93.7993941484081,28.2155506101895,0 -93.7993941486561,28.2154993931896,0 -93.7994060303933,28.2154684083745,0 -93.7994175909711,28.2154474688642,0 -93.7994411936987,28.2154266708872,0 -93.7994652780122,28.2154164841678,0 -93.7995126438043,28.2154164843132,0 -93.7995365675037,28.21542667118,0 -93.7995603306005,28.2154474693023,0 -93.7995717304402,28.2154684088833,0 -93.7995836119713,28.2154993937713,0 -93.7995836118142,28.2155506107712,0 -93.7995717300805,28.2155815956187,0 -93.7995603300911,28.2156025351253,0 -93.7995365668139,28.2156233331395,0 -93.7995126429933,28.2156338028398,0 -93.7994652771049,28.2156338026944,0 </coordinates>
</LineString>
</Placemark>
<Placemark id="c00e3314-bc14-4a1e-aa66-d3d70e217cda4">
<name>N</name>
<styleUrl>#S0</styleUrl>
<LineString>
<coordinates>-93.7993079697249,28.215631538367,0 -93.7991525469176,28.2154261036618,0 -93.7991525454582,28.2156315375975,0 -93.7991472468299,28.2156315375682,0 -93.7991472483541,28.2154184635286,0 -93.7991528680389,28.2154184635597,0 -93.7993084514863,28.2156238982652,0 -93.7993084526457,28.2154184643294,0 -93.7993135906132,28.2154184643519,0 -93.799313589421,28.2156315383915,0 -93.7993079697249,28.215631538367,0 </coordinates>
</LineString>
</Placemark>
<Placemark id="c00e3314-bc14-4a1e-aa66-d3d70e217cda5">
<name>D - outer</name>
<styleUrl>#S0</styleUrl>
<LineString>
<coordinates>-93.7990499914568,28.2154208681741,0 -93.7989722794574,28.2154208676656,0 -93.7989387219477,28.2154306297883,0 -93.7989167247776,28.215450437311,0 -93.7989051640743,28.2154701034143,0 -93.7988940850263,28.2154999563369,0 -93.7988940845493,28.2155500414644,0 -93.7989051630401,28.2155798945499,0 -93.798916723389,28.2155995608385,0 -93.7989387202291,28.2156193686758,0 -93.7989722776264,28.2156291312649,0 -93.7990499897774,28.2156291317735,0 -93.7990499914568,28.2154208681741,0 </coordinates>
</LineString>
</Placemark>
<Placemark id="c00e3314-bc14-4a1e-aa66-d3d70e217cda6">
<name>D - inner</name>
<styleUrl>#S0</styleUrl>
<LineString>
<coordinates>-93.7989716353721,28.2156338002082,0 -93.7989361511849,28.2156233301936,0 -93.7989120670252,28.2156025319439,0 -93.7989006673004,28.2155815923255,0 -93.7988887859973,28.2155506073613,0 -93.7988887864877,28.2154993903614,0 -93.7989006683714,28.21546840559,0 -93.7989120684759,28.215447466121,0 -93.7989361529804,28.2154266682341,0 -93.798971637284,28.2154164816816,0 -93.7990551294986,28.2154164822266,0 -93.7990551277566,28.2156338007532,0 -93.7989716353721,28.2156338002082,0 </coordinates>
</LineString>
</Placemark>
<Placemark id="c00e3314-bc14-4a1e-aa66-d3d70e217cda7">
<name>S</name>
<styleUrl>#S0</styleUrl>
<LineString>
<coordinates>-93.798701722344,28.2156337980995,0 -93.7986662382611,28.2156233280153,0 -93.7986424752182,28.2156028126893,0 -93.7986464893054,28.215599275651,0 -93.7986688072375,28.2156193665025,0 -93.7987023646879,28.2156291291575,0 -93.7987476432453,28.215629129548,0 -93.7987812009125,28.2156193674718,0 -93.7988030375251,28.2156001259057,0 -93.7988030377204,28.2155813086054,0 -93.7987917986145,28.2155619252865,0 -93.7987808804753,28.2155524458179,0 -93.7987585624292,28.2155422588161,0 -93.7986895208716,28.2155220260795,0 -93.7986657578042,28.2155118390668,0 -93.7986537158051,28.2155010862216,0 -93.7986418344649,28.2154800050847,0 -93.798641834845,28.2154480298286,0 -93.7986662405537,28.2154266660558,0 -93.7987017248053,28.2154164795729,0 -93.7987484483853,28.2154164799759,0 -93.7987839324884,28.2154266670708,0 -93.7988075349079,28.2154471823538,0 -93.7988036813654,28.2154507194153,0 -93.7987812029095,28.2154306285844,0 -93.7987476455143,28.2154208659486,0 -93.7987023670453,28.2154208655581,0 -93.7986688094332,28.215430627615,0 -93.7986471333646,28.2154498691614,0 -93.798647133023,28.2154787317685,0 -93.7986582115585,28.2154982565818,0 -93.7986691296813,28.2155077360687,0 -93.7986914477116,28.2155179230851,0 -93.7987604891892,28.2155381558207,0 -93.7987842522715,28.215548342817,0 -93.7987964549006,28.2155590956521,0 -93.7988081757464,28.2155801767744,0 -93.7988081755213,28.2156019652309,0 -93.7987839304126,28.2156233290302,0 -93.7987484460192,28.2156337985024,0 -93.798701722344,28.2156337980995,0 </coordinates>
</LineString>
</Placemark>
</Document>
<Style id="S0">
<LineStyle>
<color>ff007fff</color>
</LineStyle>
<PolyStyle>
<color>ff004080</color>
</PolyStyle>
</Style>
</Document>
</kml>
最佳答案
这确实是Cesium中的错误。我已经打开pull request #2609进行修复。
关于kml - KML文件渲染问题-平滑文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29122444/
在我的 OpenGL 程序中,我按顺序执行以下操作: // Drawing filled polyhedrons // Drawing points using GL_POINTS // Displa
我想传递一个包含原始页面的局部变量,这个变量只包含一个带有值的符号。 当我使用此代码时,它运行良好,可以在部分中访问 origin 变量: render :partial => "products",
为什么这个 HTML/脚本(来自“JavaScript Ninja 的 secret ”)不渲染? http://jsfiddle.net/BCL54/
我想在阅读完 View 后返回到特定的网页位置(跳转到页内 anchor )。换句话说,在 views.py 中,我想做类似的事情: context={'form':my_form} return r
我有一个包含单条折线的 PathGeometry,并以固定的间隔向该线添加一个新点(以绘制波形)。使用 Perforator 工具时,我可以看到每次向直线添加一个点时,WPF 都会将整个 PathGe
尝试了解如何消除或最小化网站上不同 JavaScript 库的渲染延迟。 例如,如果我想加载来自许多社交网络的“即时”关注按钮,它们似乎会相互阻止渲染,并且您会收到令人不快的弹出窗口。 (func
我有以 xyz 点格式表示 3D 表面(即地震断层平面)的数据。我想创建这些表面的 3D 表示。我使用 rgl 和 akima 取得了一些成功,但是它无法真正处理可能会自行折叠或在同一 x,y 点具有
我正在用 Libgdx 编写一个小游戏。 我有一个 Render[OpenGL] 线程,它不断对所有对象调用 render() 和一个更新线程不断对所有对象调用 update(double delta
我有一个 .Rmd 文件包含: ```{r, echo=FALSE, message=FALSE, results='asis'} library(xtable) print(xtable(group
关闭。这个问题是opinion-based .它目前不接受答案。 想要改进这个问题? 更新问题,以便 editing this post 可以用事实和引用来回答它. 关闭 9 年前。 Improve
请不要评判我,我只是在学习 Swift。 最近我安装了 MetalPetal 框架,并按照说明操作: https://github.com/MetalPetal/MetalPetal#example-
如果您尝试渲染 Canvas 宽度和高度之外的图像,计算机是否仍会尝试渲染它并使用资源来尝试渲染它?我只是想找出在尝试渲染图像之前检查图像是否在 Canvas 内是否更好。 最佳答案 我相信它仍然在无
我在 safari 中渲染时遇到问题。 在 firefox、chrome 和 IE 上。如下图所示: input.searchbox{-webkit-border-radius:10px;-moz-b
我正在尝试通过远程桌面在 Windows7 下运行我在 RHEL7 服务器中制作的 java 程序。 服务器中的所有java程序都无法通过远程桌面呈现。如果我在服务器位置访问服务器本身,它们看起来没问
我正处于一个新项目的设计阶段,该项目将采用数据集并将其加载到文档中,然后围绕模板呈现文档。呈现的文件可以是 CSV 数据集、PDF 营销信函、电子邮件……很多东西。数据不会是数学方程式,我只是在寻找一
有没有办法在不同的 div 下渲染 React 组件的子组件? ... ... ... ... ...
使用以下代码: import numpy as np from plotly.offline import iplot, init_notebook_mode import plotly.graph_
截至最近, meteor 的所有文档都指出 onRendered是一种在模板完成渲染时获取回调的新方法。和 rendered只是为了向后兼容。 但是,这似乎对我不起作用。 onRendered永远不会
所以在我的基本模板中,我有:{% render "EcsCrmBundle:Module:checkClock" %} 然后我创建了 ModuleController.php ... getDoctr
我正在使用 vue-mathjax 来编译我的 vue 项目中的数学方程。它正在编译第一个括号 () 之间的文本。我想防止编译括号内的字符串。在文档中我发现,对于$符号,如果我们想逃避编译,我们需要使
我是一名优秀的程序员,十分优秀!