BigQuery GeoViz - 多边形不显示填充颜色

问题描述 投票:0回答:1

我有以下 csv 格式的 GEO 数据行:

id,Estate_Type,Price_m2,Region,is_region,geometry
6,Stanovanje,3882.2626335950154,Osrednjeslovenska,True,"POLYGON ((14.630605697631836 46.3638801574707, 14.630454063415584 46.3354377746582, 14.635508537292537 46.324775695800895, 14.640621185302734 46.324783325195426, 14.650788307190055 46.3141250610351, 14.666124343872013 46.31414413452154, 14.666086196899528 46.30702972412121, 14.671197891235408 46.30703735351574, 14.6711044311524 46.28926086425787, 14.665971755981445 46.28569793701183, 14.671066284179688 46.282146453857536, 14.696625709533691 46.28217697143549, 14.691438674926871 46.26794815063482, 14.696492195129508 46.25728607177729, 14.732278823852653 46.25732421875, 14.73739147186285 46.25732803344738, 14.737372398376408 46.2537727355957, 14.747575759887695 46.25022888183588, 14.75270938873291 46.25379180908209, 14.762914657592717 46.250244140625, 14.798718452453727 46.25383758544933, 14.844708442687931 46.25033187866205, 14.84982013702404 46.25033569335943, 14.85489559173584 46.24323272705078, 14.875326156616211 46.23969650268555, 14.87530612945568 46.23614120483404, 14.89062404632574 46.232601165771484, 14.890605926513786 46.22904586791998, 14.895717620849666 46.22905349731451, 14.900830268859863 46.22905731201166, 14.905884742736816 46.218395233154354, 14.90586376190197 46.21483993530285, 14.900754928588924 46.214836120605526, 14.900715827941951 46.207725524902344, 14.895601272583008 46.20771789550781, 14.895583152771053 46.20416259765631, 14.895565032959098 46.2006072998048, 14.895525932312069 46.19349670410162, 14.895486831665096 46.18638610839844, 14.88013076782238 46.18281555175787, 14.880093574523983 46.17570495605469, 14.869870185852164 46.175693511963004, 14.864757537841797 46.175685882568416, 14.859645843505916 46.175682067871094, 14.839177131652775 46.172103881835994, 14.839156150817928 46.16854858398449, 14.818708419799862 46.16852951049805, 14.818690299987907 46.16497421264654, 14.818651199340934 46.15786361694336, 14.823762893676815 46.15786743164074, 14.823726654052734 46.15075683593756, 14.833930015563965 46.14721298217779, 14.828779220581055 46.14009475708008, 14.823670387268066 46.14009094238287, 14.82364940643322 46.136535644531364, 14.823631286621094 46.13298034667969, 14.823610305786246 46.12942123413086, 14.828722000122127 46.12942886352539, 14.828703880310172 46.125873565673885, 14.838949203491268 46.1294403076173, 14.884958267211914 46.12948608398449, 14.884861946106014 46.111709594726676, 14.879750251770076 46.1117057800293, 14.879711151123104 46.104595184326286, 14.884825706481877 46.104598999023494, 14.884765625000057 46.09393310546881, 14.88987922668457 46.093936920166016, 14.894992828369254 46.09394454956055, 14.925664901733398 46.09397506713867, 14.930777549743596 46.0939826965332, 14.946113586425781 46.09399795532232, 14.951283454895133 46.10466766357433, 14.961527824401912 46.10823440551752, 14.961545944213924 46.1117897033692, 14.966657638549805 46.111797332763786, 14.976900100708065 46.115364074707145, 14.987127304077205 46.115371704101676, 14.987106323242188 46.11181640625, 14.992220878601131 46.11182403564453, 14.992199897766113 46.10826873779308, 14.992181777954158 46.104713439941406, 14.992142677307186 46.097602844238395, 14.992104530334473 46.090488433837834, 14.981862068176213 46.0869255065918, 14.981842041015682 46.08337020874029, 14.981745719909725 46.06558990478527, 14.986860275268555 46.06559753417963, 14.99193382263195 46.05849075317383, 14.976596832275447 46.058475494384766, 14.976576805114746 46.05492019653326, 14.981671333312931 46.05136871337896, 15.002119064331055 46.05139160156256, 15.007230758667106 46.05139541625971, 15.022587776184139 46.054965972900504, 15.022605895996094 46.05852127075201, 15.037942886352596 46.058540344238224, 15.037962913513297 46.0620956420899, 15.058429718017635 46.06567001342785, 15.06342792510992 46.04434585571289, 15.07874584197998 46.04080581665045, 15.08376216888422 46.02303314208996, 15.083744049072266 46.01947784423828, 15.073519706726188 46.01946640014654, 15.07349872589117 46.015911102294865, 15.073480606079215 46.01235580444336, 15.068368911743107 46.01234817504883, 15.063257217407227 46.012344360351676, 15.063275337219352 46.01589965820318, 15.047918319702148 46.012329101562614, 15.047882080078239 46.00521850585943, 15.027433395385856 46.00519561767578, 15.012077331542969 46.00162506103521, 15.017131805419922 45.990962982177734, 15.02224445343029 45.990966796875114, 15.022187232971135 45.980300903320426, 15.017074584960938 45.98029708862305, 15.017057418823299 45.97674179077154, 15.006812095642147 45.97317504882818, 15.006791114807129 45.969619750976676, 15.006772994995174 45.966064453125, 14.996530532836914 45.962497711181754, 14.991418838501033 45.96249389648443, 14.976099967956543 45.966030120849666, 14.976119041442928 45.96958541870117, 14.955670356750602 45.9695663452149, 14.955709457397575 45.97667694091808, 14.930146217346248 45.97665023803711, 14.930088996887264 45.96598434448242, 14.930070877075309 45.962429046630916, 14.924959182739258 45.962421417236385, 14.909623146057243 45.96240615844732, 14.90958404541027 45.95529556274414, 14.899338722229118 45.951728820800724, 14.899320602416992 45.94817352294922, 14.894208908081055 45.94816970825207, 14.889097213745174 45.948162078857536, 14.883984565734977 45.948158264160156, 14.883966445922852 45.94460296630865, 14.873740196228141 45.9445915222168, 14.868438720703068 45.9090309143067, 14.868417739868221 45.90547561645502, 14.85296821594244 45.88412475585943, 14.858040809631348 45.87702178955078, 14.858020782470817 45.87346267700195, 14.86313533782959 45.873470306396484, 14.863115310669059 45.86991500854498, 14.863096237182617 45.86635971069347, 14.868207931518498 45.86636352539068, 14.873320579528922 45.86637115478521, 14.868151664733887 45.855697631835994, 14.832366943359489 45.85565948486328, 14.832307815551758 45.84499359130865, 14.837420463561955 45.84499740600597, 14.83740139007574 45.8414421081543, 14.837363243103027 45.834331512451115, 14.847586631775016 45.834342956543026, 14.847455024719238 45.80945587158203, 14.84743404388422 45.805900573730526, 14.842265129089412 45.79522705078131, 14.791161537170524 45.79872894287121, 14.791124343872127 45.791618347168026, 14.791105270385856 45.78806304931652, 14.791085243225098 45.784507751464844, 14.791067123413143 45.78095245361334, 14.791046142578125 45.77739715576166, 14.796065330505428 45.75962448120117, 14.79604434967041 45.756069183349666, 14.78069019317627 45.7524986267091, 14.780651092529297 45.745384216308594, 14.755146980285701 45.7560272216798, 14.734794616699219 45.77378082275385, 14.729740142822266 45.784442901611385, 14.70932769775402 45.791530609130916, 14.709345817565975 45.79508590698242, 14.694047927856502 45.80218124389654, 14.694087028503475 45.80929183959972, 14.67369556427002 45.81993865966791, 14.663469314575195 45.81992721557623, 14.653187751770133 45.80924987792963, 14.648076057434025 45.80924606323248, 14.64805793762207 45.80569076538097, 14.64294624328619 45.80568313598644, 14.642927169799918 45.802127838134766, 14.622476577758789 45.802108764648494, 14.617364883422908 45.80210113525396, 14.612252235412711 45.802097320556584, 14.591803550720329 45.80207443237316, 14.58158016204834 45.80206298828125, 14.581541061401367 45.79495239257807, 14.57642936706543 45.794948577880916, 14.571316719055233 45.794940948486385, 14.55086803436285 45.794921875000114, 14.53556919097906 45.80201721191406, 14.535626411438045 45.81268310546869, 14.530533790588379 45.81623077392584, 14.515197753906193 45.816215515136776, 14.510161399841422 45.83043289184576, 14.499955177307072 45.833976745605526, 14.494881629943848 45.841083526611385, 14.48976898193365 45.8410758972168, 14.489788055419922 45.8446311950683, 14.48980808258068 45.84819030761719, 14.489826202392635 45.851745605468864, 14.484713554382438 45.85173797607433, 14.48993968963623 45.87307739257818, 14.48482799530035 45.87307357788086, 14.484848976135368 45.876628875732536, 14.484867095947322 45.88018417358404, 14.484885215759277 45.88373947143549, 14.47977256774908 45.88373184204096, 14.4746608734132 45.88372802734381, 14.474642753601017 45.8801727294923, 14.464398384094181 45.876605987548885, 14.464380264282227 45.87305068969721, 14.454155921936149 45.873039245605526, 14.443930625915584 45.873027801513786, 14.433648109436035 45.862350463867244, 14.423405647277832 45.85878372192383, 14.40814399719244 45.87298965454107, 14.403032302856502 45.87298583984375, 14.392789840698299 45.869419097900504, 14.392750740051326 45.86230850219732, 14.387639045715389 45.8623046875, 14.382527351379508 45.86229705810547, 14.37741470336914 45.86229324340826, 14.377432823181266 45.865848541259766, 14.372321128845158 45.865840911865234, 14.36724758148199 45.87294769287121, 14.362135887146053 45.872943878173885, 14.362154006958008 45.87649917602539, 14.35708045959484 45.883602142333984, 14.351967811584473 45.88359832763683, 14.352006912231445 45.890708923339844, 14.346893310546932 45.890705108642635, 14.341761589050293 45.8871421813966, 14.3162202835083 45.8906707763673, 14.316238403320426 45.89422607421881, 14.290659904480037 45.89064407348633, 14.290602684021053 45.87997817993164, 14.28548812866211 45.87997436523449, 14.275150299072209 45.85862731933605, 14.270037651062012 45.85862350463867, 14.270001411438102 45.85151290893555, 14.264886856079158 45.85150909423834, 14.259775161743221 45.85150146484381, 14.259793281555176 45.85505676269531, 14.254682540893612 45.855052947998104, 14.249568939209098 45.85504531860357, 14.239344596862793 45.85503768920904, 14.234234809875488 45.85503005981451, 14.234252929687443 45.858585357666016, 14.229141235351562 45.85858154296881, 14.22402667999279 45.858573913574276, 14.218916893005485 45.85857009887695, 14.2138032913208 45.858566284179744, 14.20869255065918 45.85855865478521, 14.208710670471135 45.86211395263672, 14.208728790283317 45.865669250488395, 14.208749771118164 45.8692245483399, 14.193410873413086 45.86920928955078, 14.188338279724178 45.87631607055664, 14.178113937377873 45.8763046264649, 14.178132057189998 45.879859924316406, 14.152552604675293 45.8762779235841, 14.152532577514762 45.87272262573242, 14.137216567993107 45.876262664795036, 14.126990318298454 45.876251220703125, 14.121877670288086 45.876243591308594, 14.116765975952148 45.87623977661144, 14.111654281616268 45.87623596191406, 14.111674308776799 45.87979125976574, 14.111767768859863 45.89756774902338, 14.091376304626465 45.908210754394645, 14.091492652893123 45.92954635620117, 14.091510772705078 45.93310165405285, 14.091528892517204 45.936656951904354, 14.101753234863281 45.93666839599604, 14.101831436157283 45.9508895874024, 14.112072944641227 45.95445632934582, 14.112093925476074 45.95801162719732, 14.106982231140194 45.95800399780279, 14.107039451599121 45.9686737060548, 14.096815109253043 45.96866226196289, 14.10198116302496 45.97933197021496, 14.107095718383789 45.97933959960949, 14.117320060730037 45.97935104370117, 14.122488975524902 45.99002075195324, 14.122507095337028 45.993576049804744, 14.1276216506958 45.993583679199276, 14.127639770507812 45.99713897705078, 14.127657890319938 46.00069427490246, 14.127678871154785 46.004249572753906, 14.127695083618164 46.00780487060541, 14.132808685302791 46.00780868530279, 14.137942314148063 46.01137161254883, 14.148222923278809 46.02204895019537, 14.158447265625057 46.02205657958996, 14.163558959960994 46.02206420898449, 14.168670654296875 46.02206802368164, 14.168691635131893 46.02562332153332, 14.168709754943848 46.02917861938482, 14.168727874755803 46.03273391723633, 14.178952217102108 46.03274536132824, 14.178973197937125 46.036300659179744, 14.17899131774908 46.03985595703119, 14.184103012084961 46.03986358642578, 14.184123992920036 46.04341888427746, 14.194366455078239 46.04698562622082, 14.194422721862907 46.057651519775504, 14.19953727722168 46.057655334472656, 14.199556350708121 46.06121063232416, 14.199574470520076 46.06476593017584, 14.199669837951717 46.08254623413086, 14.204781532287654 46.08255004882824, 14.20481967926031 46.08966064453125, 14.215065002441463 46.09322738647461, 14.215083122253418 46.096782684326115, 14.240644454956168 46.09680938720709, 14.245813369751033 46.10748291015631, 14.271375656128043 46.10750961303711, 14.271354675293026 46.103954315185604, 14.29689788818365 46.1004257202149, 14.302009582519531 46.10042953491211, 14.307122230529728 46.10043716430664, 14.307104110717773 46.096881866455135, 14.32244014739996 46.0968971252442, 14.327648162841797 46.11467742919922, 14.322536468505916 46.11467361450207, 14.322553634643555 46.11822891235357, 14.322573661804313 46.12178421020508, 14.32263088226324 46.13245010375971, 14.343097686767578 46.136028289795036, 14.34313678741455 46.14313888549799, 14.348249435424748 46.14314651489258, 14.348269462585506 46.146701812744254, 14.35337924957281 46.146705627441406, 14.353400230407829 46.15026092529308, 14.35851192474371 46.15026473999029, 14.363623619079647 46.15027236938482, 14.368736267089844 46.150276184082145, 14.373847961425895 46.150283813476506, 14.373887062072697 46.15739440917969, 14.384111404419002 46.1574058532716, 14.384131431579533 46.160961151123104, 14.389241218566838 46.160964965820256, 14.399468421936035 46.160976409912166, 14.399485588073674 46.16453170776367, 14.414840698242301 46.16810226440441, 14.399581909179801 46.18230819702154, 14.399620056152287 46.189418792724666, 14.414957046508789 46.18943786621094, 14.42006874084467 46.18944168090832, 14.450740814209041 46.18947219848644, 14.455891609191951 46.196590423583984, 14.455930709838924 46.203701019287166, 14.47126674652111 46.20371627807623, 14.481492042541504 46.20372772216797, 14.491716384887752 46.20373916625988, 14.496829986572266 46.20374298095703, 14.501996994018498 46.21441650390625, 14.522465705871639 46.21799468994135, 14.52248573303217 46.221549987793026, 14.53272914886469 46.22511672973644, 14.532768249511719 46.23222732543945, 14.543009757995662 46.23579406738281, 14.54303073883068 46.23934936523449, 14.543048858642635 46.242904663085994, 14.548160552978516 46.2429084777832, 14.55838489532482 46.24291992187506, 14.558405876159668 46.24647521972656, 14.563574790954704 46.25714492797863, 14.55852031707775 46.26780700683594, 14.553406715393066 46.26780319213873, 14.553425788879508 46.271358489990234, 14.553443908691463 46.27491378784191, 14.543219566345158 46.27490234375, 14.548391342163086 46.28557586669922, 14.538185119628963 46.28911972045904, 14.533129692077694 46.29978179931652, 14.522924423217887 46.303325653076286, 14.522944450378418 46.30688095092779, 14.528057098388786 46.30688476562494, 14.52807521820074 46.31044006347662, 14.533186912536678 46.31044769287121, 14.538298606872559 46.31045150756836, 14.548543930053711 46.314018249511776, 14.548580169677791 46.32112884521496, 14.53326225280756 46.324668884277344, 14.533321380615291 46.33533477783203, 14.543563842773551 46.33890151977545, 14.543622970581055 46.34956741333008, 14.533434867858887 46.35667037963873, 14.533455848693904 46.360225677490234, 14.53347396850586 46.36378097534191, 14.55903530120844 46.36380767822271, 14.569258689880428 46.363819122314396, 14.574332237243652 46.356712341308594, 14.584559440612793 46.356723785400504, 14.584576606750488 46.36027908325201, 14.610136985778922 46.36030578613281, 14.630605697631836 46.3638801574707))"

当尝试在 BigQuery Geo Viz 中对其进行可视化时,我得到一个没有填充的多边形,如下图所示。 FillOpacity 设置为 1,FillColor 设置为 #000000

Looker Studio 中使用 Field map 可视化类似的绘图时,它会完全变成蓝色,如下图所示。

问题 1. 两个可视化中均未显示多边形填充是否有特定原因?

  • 与此同时,我发现当放大得非常近并将鼠标放在多边形的边界上时,填充颜色会显示。 (此时只有一小部分多边形边界可见。)

问题2. Looker Studio中地图背景消失有什么原因吗?

google-bigquery gis looker-studio
1个回答
0
投票

我认为两者都是由同一问题引起的,即倒多边形(请参阅https://cloud.google.com/bigquery/docs/geospatial-data#polygon_orientation了解解释)。不过我只用 GeoViz 进行了测试。

我已经尝试在 GeoViz 中使用您的多边形数据:

select st_geogfromtext("POLYGON ((...))") as geo

这按预期工作,显示带有填充的多边形。但随后将其视为定向多边形(这就是加载 CSV 文件时发生的情况):

select st_geogfromtext("POLYGON ((...))", oriented=>true) as geo

- 这显示空多边形。

在加载之前或之后反转多边形,例如这会反转所有巨大的多边形

update table 
set geo = ST_Difference(ST_GeogFromText('fullglobe'), geo)
where ST_Area(geo) > 2e14

处理平面地图的工具还没有做好处理倒置多边形的准备,倒置多边形会填充除小区域之外的所有地图,并且可能会出现问题。

© www.soinside.com 2019 - 2024. All rights reserved.