Comments (3)
It gets better if hole removed.
http://imgur.com/w2M3L3c
from twgeojson.
Fixed at 73dc0b1
The THREE.Shape.Utils.triangulateShape() can't work on polygon with holes and some concave polygon, like the area of New Taipei City.
It's known issue ( Thanks to yllan )
mrdoob/three.js#907
mrdoob/three.js#3386
I found the commented code : THREE.Shape.Utils.triangulate2(), and injected it into THREE.Shape.Utils as a replacement for triangulateShape(). The reason for injection instead of change Three.js is, the work was done before, but not subject for merge.
Then, the triangulation is broken again at New Taipei City and Hualien, since poly2try doesn't accept repeated vertices. So, I fixed it by adding filter functions with tolerance value.
We may ask if Three.js accept customised triangulation function, or to provide alternative option when poly2tri is present.
from twgeojson.
為何會有 repeated vertex 呢?是不是我們應該從原始 json 檔裡把這些重複的點清乾淨?
from twgeojson.
Related Issues (20)
- 觀測站發生 name collision HOT 3
- 雨量圖補充資訊
- 雨量圖底色沒有 Legend 可以參照 HOT 1
- 雨量觀測站是否只有本島? HOT 1
- 雨量內插法可採用 Barnes Objective Analysis
- 雨量預設顏色
- 雨量 transition
- 顯示不同 timeframe 雨量 HOT 1
- 縣市邊界的經緯度bug HOT 2
- 為空污指標加上簡單中文說明
- 截圖分享功能
- 全面「空污.襲來」化
- 分享功能
- 縣市界有洞的問題 HOT 4
- mapshaper 轉出來的 layer name 會消失,變成 layer1 HOT 6
- twVillage1982.topo.json 更新到 102.05.21 版本? HOT 3
- 找到有問題的在 twTown1982.topo.json 中有問題的 data 為 TOWNID 為 1605, 1603, 1000128 HOT 3
- twVote1982.topo.json 中有問題的四筆資料
- twCounty2010.topo.json使用D3.js v3.2 以上無法正確顯示問題 HOT 2
- package.json 放置位置以及 MakeFile 的 mapshaper 路徑
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twgeojson.