Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

发现一个缓冲区分析bug #90

Open
ziyunhai opened this issue Sep 5, 2022 · 0 comments
Open

发现一个缓冲区分析bug #90

ziyunhai opened this issue Sep 5, 2022 · 0 comments

Comments

@ziyunhai
Copy link

ziyunhai commented Sep 5, 2022


const d = `{"type":"LineString","coordinates":[[148.3,23.9],[149.3,25],[149.5,25.3],[149.5,25.3],[149.5,25.3],[149.9,26.1],[150.2,26.4],[150.5,27.1],[150.5,27.1],[150.8,28.8],[150.8,28.8],[150.9,29.2],[150.7,29.7],[150.8,30.1],[150.6,30.4],[150.4,30.6],[150.1,31.6],[149.8,32.5]]}`
g, _ := geoencoding.Decode([]byte(d), geoencoding.GeoJSON)
b := g.BufferInMeter(100, calc.QuadrantSegments)
fmt.Println(string(geoencoding.Encode(b, geoencoding.WKT)))

返回结果中存在很多NaN,返回结果如下:

POLYGON((149.29921586139045 25.000588113059923,NaN NaN,149.4990720118337 25.30037798677464,149.89907201183368 26.100375455240716,149.89914706649813 26.100498760295352,149.899242
28147618 26.100610276338013,150.19924228147616 26.40060870255267,NaN NaN,150.4989943229493 27.100139551904082,NaN NaN,150.79900567017944 28.800190521518022,150.8990056701794 29.
20018978565512,150.69903881583426 29.699709188528097,150.69899396085847 29.699865864360323,150.69898265359106 29.70002701287475,150.69900527108788 29.700187260352127,150.7990052
7108794 30.10018651010826,150.59911798315972 30.399561890373853,150.3992289238104 30.59942813752714,150.39909781968294 30.59959441563601,150.3990141831927 30.599782033025665,150
.09901418319268 31.599784315923866,149.79902051880478 32.4997666111684,149.79898535265346 32.49993225733657,149.79898917883068 32.500100506508375,149.79903185029852 32.500264892
96596,149.79911172721646 32.500419099468,149.79922573995933 32.500557200011805,149.79936950708134 32.500673887556204,149.79953750369262 32.50076467795526,149.79972327377766 32.5
0082608226746,149.79991967829622 32.50085574082134,149.8001191695328 32.500852513886876,149.80031408115107 32.50081652546986,149.80049692280687 32.50074915854693,149.80066066799
785 32.50065300192449,149.80079902408818 32.50053175076223,149.8009066741309 32.500390064583456,149.8009794811952 32.50023338822593,150.10097948119522 31.600235694878712,150.100
9858168073 31.60021568357662,150.40098581680732 30.60021796648385,150.6007710761896 30.40057303614954,150.60088201684027 30.40043810766075,150.80088201684026 30.100439447496502,
150.8009600570297 30.100292430107576,150.8010056916988 30.100135541888058,150.80101738050664 30.099974078368952,150.80099472891214 30.099813489539766,150.70099472891212 29.69981
2739298796,150.9009611841657 29.200292247081364,150.90100613383842 29.200134258372675,150.90101730742316 29.199971762339494,150.90099432982058 29.199810213993548,NaN NaN,150.801
00567705074 28.799862627877324,NaN NaN,150.50095058750804 27.099676147743672,150.20095058750803 26.399674147279168,150.20086862381865 26.399524804326035,150.2007577185238 26.399
39129423718,149.9007577185238 26.09938972047752,NaN NaN,149.5008714400348 25.299524557295143,149.3008714400348 24.999523387088384,149.30078413860957 24.999411884125102,148.30078
413860957 23.89940672780346,148.30064247505413 23.899278266075022,148.30047612154266 23.899177540150923,148.30029147094731 23.899108420940394,148.30009561928694 23.8990735647080
93,148.29989609303098 23.899074310987338,148.29970055986155 23.899110631098452,148.29951653400875 23.89918112925092,148.29935108748282 23.89928309618727,148.29921057830106 23.89
9412613306403,148.29910040615243 23.8995647032637,148.2990248048909 23.899733521258984,148.2989866798305 23.899912579659166,148.29898749609595 23.900094997322515,148.29902722231
86 23.900273764041103,148.29910433184202 23.900442009939216,148.29921586139045 23.900593269474307,149.29921586139045 25.000588113059923))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant