Map does not fill polygons in Google data studio filled map - google-data-studio
I'm trying to follow this tutorial to include a filled map in google studio. I've simplified my data (in Google BigQuery) so it is just simple polygons and an ID string:
WKT,origin
"POLYGON ((-122.257923 37.842606,-122.257728 37.842819,-122.257617 37.842895,-122.257418 37.843096,-122.257007 37.843602,-122.256205 37.844686,-122.255084 37.846069,-122.254239 37.847136,-122.25245 37.849386,-122.252354 37.849468,-122.252449 37.850342,-122.252503 37.850826,-122.252413 37.85083,-122.252333 37.850834,-122.251893 37.850979,-122.251729 37.851022,-122.251516 37.851095,-122.251273 37.85117,-122.251083 37.85123,-122.251008 37.851184,-122.25096 37.851159,-122.250883 37.851118,-122.250809 37.851216,-122.250681 37.851385,-122.250532 37.851379,-122.250473 37.851387,-122.250328 37.851393,-122.250185 37.851406,-122.250037 37.851416,-122.250025 37.851387,-122.250003 37.851346,-122.249981 37.851294,-122.249629 37.851411,-122.249473 37.851448,-122.249155 37.851466,-122.248757 37.851488,-122.248217 37.85152,-122.247757 37.851552,-122.247501 37.851571,-122.247433 37.851616,-122.24738 37.851648,-122.247354 37.851647,-122.247253 37.851576,-122.247131 37.851586,-122.246928 37.851599,-122.246886 37.851602,-122.246618 37.851619,-122.246588 37.851575,-122.246109 37.851603,-122.246122 37.851665,-122.246015 37.851664,-122.245779 37.851677,-122.245537 37.851691,-122.245119 37.851715,-122.245034 37.851716,-122.245023 37.851791,-122.245012 37.851813,-122.245 37.851834,-122.244994 37.851847,-122.244949 37.851883,-122.244931 37.851899,-122.244836 37.851842,-122.244823 37.851816,-122.244781 37.851733,-122.244467 37.851751,-122.243836 37.851786,-122.243703 37.851794,-122.243661 37.851796,-122.243647 37.8518,-122.243633 37.851803,-122.243613 37.851806,-122.243599 37.851807,-122.24349 37.851814,-122.243396 37.851819,-122.243279 37.851826,-122.243229 37.851829,-122.243095 37.851837,-122.243012 37.851842,-122.242887 37.85185,-122.242675 37.851863,-122.242526 37.851871,-122.24246 37.851875,-122.242429 37.851877,-122.24229 37.851885,-122.242259 37.851887,-122.242157 37.851893,-122.242122 37.851895,-122.242059 37.851899,-122.241914 37.851909,-122.24191 37.851814,-122.241938 37.851654,-122.241946 37.851629,-122.241956 37.8516,-122.241971 37.851535,-122.241991 37.851447,-122.242008 37.851396,-122.242019 37.851373,-122.24204 37.851335,-122.242245 37.851041,-122.242315 37.85096,-122.242427 37.850833,-122.242666 37.850756,-122.243383 37.850529,-122.243623 37.850453,-122.243707 37.850413,-122.243959 37.850296,-122.244044 37.850257,-122.243884 37.849996,-122.243621 37.849565,-122.243524 37.849445,-122.243382 37.849318,-122.243341 37.849265,-122.243331 37.849252,-122.243309 37.849205,-122.243306 37.849151,-122.243323 37.849072,-122.243381 37.848989,-122.243519 37.848782,-122.243716 37.848513,-122.245505 37.847515,-122.246198 37.847128,-122.247241 37.846599,-122.247313 37.846563,-122.249088 37.845839,-122.251516 37.844877,-122.251781 37.844777,-122.251857 37.844746,-122.252871 37.844354,-122.254366 37.843773,-122.254958 37.84356,-122.256866 37.842935,-122.257078 37.842867,-122.257155 37.842843,-122.257325 37.84279,-122.257444 37.842752,-122.257644 37.84269,-122.257778 37.842654,-122.257804 37.842645,-122.257923 37.842606))","06001400200"
"POLYGON ((-122.265631 37.837636,-122.265565 37.837847,-122.26551 37.838027,-122.26534 37.838461,-122.265224 37.83866,-122.265144 37.838796,-122.264958 37.839092,-122.264769 37.839366,-122.264589 37.839565,-122.264525 37.839632,-122.264508 37.839649,-122.264483 37.839674,-122.264446 37.839711,-122.26442 37.839737,-122.264383 37.839774,-122.264164 37.839997,-122.263929 37.840196,-122.263679 37.8404,-122.263437 37.840561,-122.263141 37.840743,-122.262857 37.840902,-122.262811 37.840926,-122.262541 37.841064,-122.26186 37.841353,-122.261778 37.841391,-122.261704 37.841415,-122.261366 37.841537,-122.261244 37.841581,-122.260888 37.841694,-122.260384 37.841833,-122.259891 37.841987,-122.258449 37.84244,-122.258415 37.842451,-122.257923 37.842606,-122.257804 37.842645,-122.257778 37.842654,-122.257644 37.84269,-122.257444 37.842752,-122.257325 37.84279,-122.257155 37.842843,-122.257078 37.842867,-122.256866 37.842935,-122.254958 37.84356,-122.254366 37.843773,-122.252871 37.844354,-122.251857 37.844746,-122.251781 37.844777,-122.251516 37.844877,-122.249088 37.845839,-122.247313 37.846563,-122.247241 37.846599,-122.246198 37.847128,-122.245505 37.847515,-122.243716 37.848513,-122.243825 37.848361,-122.24392 37.848229,-122.244188 37.847913,-122.244285 37.847733,-122.24458 37.847194,-122.244678 37.847015,-122.244695 37.846982,-122.244732 37.846915,-122.24475 37.846883,-122.244768 37.846851,-122.244984 37.846435,-122.245396 37.845798,-122.246083 37.844667,-122.246108 37.844629,-122.246185 37.844515,-122.246211 37.844478,-122.24632 37.844301,-122.246648 37.843774,-122.246758 37.843598,-122.246826 37.843489,-122.247031 37.843163,-122.2471 37.843055,-122.24749 37.842427,-122.24813 37.841392,-122.249195 37.839711,-122.249461 37.839267,-122.24973 37.83884,-122.25054 37.837561,-122.25081 37.837135,-122.250836 37.837094,-122.250915 37.836973,-122.250942 37.836933,-122.25102 37.836804,-122.251254 37.836423,-122.251339 37.836291,-122.251413 37.836175,-122.251636 37.835827,-122.251711 37.835712,-122.251851 37.835478,-122.25217 37.834946,-122.252272 37.834778,-122.252282 37.834763,-122.25241 37.834543,-122.252606 37.834686,-122.252852 37.834865,-122.253038 37.834975,-122.253234 37.835054,-122.25346 37.835146,-122.253624 37.835208,-122.254118 37.835397,-122.254283 37.83546,-122.254509 37.835549,-122.255187 37.835819,-122.255414 37.835909,-122.255555 37.835964,-122.255632 37.835994,-122.256284 37.836247,-122.256509 37.836335,-122.256713 37.836408,-122.256852 37.836454,-122.256971 37.836493,-122.257348 37.836584,-122.25764 37.836637,-122.257919 37.83668,-122.258079 37.836705,-122.25828 37.836729,-122.258604 37.836783,-122.259516 37.836935,-122.259577 37.836944,-122.259902 37.836994,-122.259924 37.836997,-122.25999 37.837007,-122.260012 37.837011,-122.260182 37.837044,-122.260221 37.837052,-122.260698 37.837113,-122.260721 37.837116,-122.260872 37.837124,-122.26117 37.837157,-122.26163 37.83721,-122.262064 37.837267,-122.262259 37.837293,-122.262361 37.837314,-122.262305 37.837859,-122.262286 37.838027,-122.263234 37.837903,-122.263356 37.837901,-122.263759 37.837953,-122.263879 37.837961,-122.263994 37.837955,-122.264113 37.837917,-122.264169 37.83787,-122.264269 37.83786,-122.264321 37.837826,-122.264383 37.837806,-122.264584 37.837778,-122.264743 37.837761,-122.264829 37.837746,-122.265026 37.8377,-122.265127 37.837687,-122.265228 37.837681,-122.265408 37.837668,-122.265436 37.837666,-122.265452 37.837663,-122.265586 37.837642,-122.265631 37.837636))","06001400300"
"POLYGON ((-122.261826 37.841623,-122.261805 37.84179,-122.26176 37.842045,-122.261686 37.842467,-122.261632 37.842811,-122.261593 37.843068,-122.261566 37.843265,-122.261486 37.843858,-122.26146 37.844056,-122.261448 37.844103,-122.261414 37.844247,-122.261404 37.844295,-122.261382 37.844441,-122.261317 37.84488,-122.261296 37.845027,-122.261275 37.845181,-122.261214 37.845646,-122.261195 37.845801,-122.261179 37.84594,-122.261175 37.845981,-122.261131 37.846359,-122.261115 37.846499,-122.261095 37.846645,-122.261037 37.847086,-122.261019 37.847233,-122.260995 37.847379,-122.260925 37.847818,-122.260903 37.847965,-122.260883 37.84811,-122.260824 37.848548,-122.260805 37.848694,-122.260782 37.848845,-122.260714 37.849298,-122.260692 37.84945,-122.260673 37.84959,-122.260617 37.85001,-122.260599 37.850151,-122.260587 37.850223,-122.260571 37.85033,-122.260495 37.850869,-122.26047 37.851049,-122.260441 37.851245,-122.260356 37.851836,-122.260329 37.852033,-122.26031 37.852174,-122.260264 37.852535,-122.260258 37.852569,-122.260253 37.8526,-122.260232 37.852742,-122.260223 37.852793,-122.260125 37.852806,-122.259972 37.852826,-122.259753 37.852854,-122.259787 37.853011,-122.258367 37.853196,-122.258338 37.853041,-122.258209 37.853052,-122.258134 37.853061,-122.25804 37.853074,-122.257902 37.853092,-122.257772 37.85311,-122.257508 37.853145,-122.257329 37.853168,-122.257251 37.853176,-122.257274 37.853298,-122.257058 37.85333,-122.256948 37.853347,-122.256412 37.853419,-122.256197 37.853449,-122.256098 37.853462,-122.255802 37.853501,-122.255704 37.853515,-122.255587 37.85353,-122.255239 37.853577,-122.255123 37.853593,-122.255059 37.853604,-122.25487 37.853637,-122.254807 37.853649,-122.254644 37.853668,-122.254157 37.853726,-122.253995 37.853746,-122.253986 37.853702,-122.253968 37.853611,-122.253833 37.85362,-122.253679 37.853641,-122.253593 37.853654,-122.253446 37.853672,-122.253468 37.853763,-122.253483 37.853811,-122.253346 37.85383,-122.253329 37.853743,-122.253318 37.853688,-122.253265 37.853695,-122.253241 37.853475,-122.253309 37.853466,-122.253333 37.853466,-122.253078 37.851958,-122.253056 37.851769,-122.252995 37.851238,-122.25298 37.851165,-122.252966 37.851111,-122.25296 37.851072,-122.25294 37.850928,-122.252919 37.850772,-122.252552 37.850821,-122.252503 37.850826,-122.252449 37.850342,-122.252354 37.849468,-122.25245 37.849386,-122.254239 37.847136,-122.255084 37.846069,-122.256205 37.844686,-122.257007 37.843602,-122.257418 37.843096,-122.257617 37.842895,-122.257728 37.842819,-122.257923 37.842606,-122.258415 37.842451,-122.258449 37.84244,-122.259891 37.841987,-122.260384 37.841833,-122.260888 37.841694,-122.261244 37.841581,-122.261366 37.841537,-122.261704 37.841415,-122.261778 37.841391,-122.26186 37.841353,-122.261826 37.841623))","06001400400"
"POLYGON ((-122.269507 37.848582,-122.26937 37.8486,-122.269237 37.848617,-122.269104 37.848634,-122.269043 37.848641,-122.269049 37.848671,-122.269051 37.848681,-122.268978 37.84869,-122.268612 37.848737,-122.268411 37.848765,-122.268448 37.84912,-122.268457 37.849173,-122.268477 37.849293,-122.268567 37.849812,-122.268597 37.849986,-122.268608 37.850072,-122.268644 37.850332,-122.268657 37.850419,-122.268683 37.850549,-122.268763 37.85094,-122.26879 37.851071,-122.268811 37.851178,-122.268877 37.8515,-122.268899 37.851608,-122.268909 37.851652,-122.268652 37.851683,-122.268436 37.851729,-122.26821 37.851776,-122.267952 37.851822,-122.26785 37.851796,-122.267778 37.851796,-122.267766 37.851798,-122.267613 37.851819,-122.267241 37.851867,-122.267067 37.85189,-122.267011 37.851895,-122.267014 37.851911,-122.266521 37.851964,-122.266498 37.851967,-122.26641 37.851977,-122.266128 37.852009,-122.266066 37.852016,-122.265268 37.852122,-122.263951 37.852296,-122.263924 37.852167,-122.263835 37.852203,-122.263608 37.852296,-122.26362 37.85234,-122.263644 37.852422,-122.263594 37.852511,-122.263569 37.852547,-122.263489 37.852548,-122.263429 37.85255,-122.262367 37.852681,-122.262286 37.852691,-122.26225 37.852696,-122.262245 37.852657,-122.262241 37.852629,-122.262238 37.852606,-122.262234 37.852585,-122.262221 37.852527,-122.262149 37.852537,-122.261829 37.85258,-122.261511 37.852623,-122.261024 37.852691,-122.260826 37.852715,-122.260548 37.85275,-122.260223 37.852793,-122.260232 37.852742,-122.260253 37.8526,-122.260258 37.852569,-122.260264 37.852535,-122.26031 37.852174,-122.260329 37.852033,-122.260356 37.851836,-122.260441 37.851245,-122.26047 37.851049,-122.260495 37.850869,-122.260571 37.85033,-122.260587 37.850223,-122.260599 37.850151,-122.260617 37.85001,-122.260673 37.84959,-122.260692 37.84945,-122.260714 37.849298,-122.260782 37.848845,-122.260805 37.848694,-122.260824 37.848548,-122.260883 37.84811,-122.260903 37.847965,-122.260925 37.847818,-122.260995 37.847379,-122.261019 37.847233,-122.261037 37.847086,-122.261095 37.846645,-122.261115 37.846499,-122.261131 37.846359,-122.261175 37.845981,-122.261179 37.84594,-122.261195 37.845801,-122.261214 37.845646,-122.261275 37.845181,-122.261296 37.845027,-122.261382 37.845028,-122.26164 37.845031,-122.261726 37.845032,-122.262408 37.84493,-122.264456 37.844627,-122.265041 37.844541,-122.26514 37.84453,-122.265326 37.844501,-122.265884 37.844415,-122.266071 37.844387,-122.266257 37.844367,-122.266817 37.844306,-122.267004 37.844287,-122.267217 37.844256,-122.267856 37.844165,-122.26807 37.844136,-122.268092 37.844225,-122.26816 37.844495,-122.268183 37.844585,-122.268305 37.845251,-122.268369 37.845474,-122.268411 37.845598,-122.268533 37.846183,-122.268574 37.846374,-122.268609 37.846562,-122.268681 37.846902,-122.268763 37.847261,-122.269134 37.847213,-122.269226 37.847201,-122.269279 37.847479,-122.269388 37.847999,-122.269409 37.848107,-122.26942 37.848162,-122.269435 37.84823,-122.269497 37.848532,-122.269507 37.848582))","06001400500"
"POLYGON ((-122.26807 37.844136,-122.267856 37.844165,-122.267217 37.844256,-122.267004 37.844287,-122.266817 37.844306,-122.266257 37.844367,-122.266071 37.844387,-122.265884 37.844415,-122.265326 37.844501,-122.26514 37.84453,-122.265041 37.844541,-122.264456 37.844627,-122.262408 37.84493,-122.261726 37.845032,-122.26164 37.845031,-122.261382 37.845028,-122.261296 37.845027,-122.261317 37.84488,-122.261382 37.844441,-122.261404 37.844295,-122.261414 37.844247,-122.261448 37.844103,-122.26146 37.844056,-122.261486 37.843858,-122.261566 37.843265,-122.261593 37.843068,-122.261632 37.842811,-122.261686 37.842467,-122.26176 37.842045,-122.261805 37.84179,-122.261826 37.841623,-122.26186 37.841353,-122.262541 37.841064,-122.262811 37.840926,-122.262857 37.840902,-122.263141 37.840743,-122.263437 37.840561,-122.263679 37.8404,-122.263929 37.840196,-122.264164 37.839997,-122.264383 37.839774,-122.26442 37.839737,-122.264446 37.839711,-122.264483 37.839674,-122.264508 37.839649,-122.264525 37.839632,-122.264589 37.839565,-122.264769 37.839366,-122.264958 37.839092,-122.265144 37.838796,-122.265224 37.83866,-122.26534 37.838461,-122.26551 37.838027,-122.265565 37.837847,-122.265631 37.837636,-122.265835 37.837606,-122.26612 37.837565,-122.266448 37.837511,-122.266589 37.837489,-122.266653 37.837482,-122.266684 37.837496,-122.266712 37.837514,-122.266724 37.83753,-122.266742 37.837591,-122.266748 37.837623,-122.266861 37.838165,-122.266905 37.838345,-122.266938 37.838522,-122.26704 37.839056,-122.267074 37.839234,-122.26711 37.839417,-122.26722 37.839968,-122.267241 37.840068,-122.267257 37.840152,-122.267285 37.840304,-122.267372 37.84076,-122.267402 37.840912,-122.267434 37.841064,-122.26753 37.84152,-122.267562 37.841672,-122.267587 37.841792,-122.267665 37.842152,-122.267691 37.842273,-122.267728 37.842462,-122.267841 37.843029,-122.267879 37.843219,-122.267898 37.843313,-122.267955 37.843596,-122.267974 37.843691,-122.267993 37.84378,-122.26805 37.844047,-122.26807 37.844136))","06001400600"
"POLYGON ((-122.278078 37.847326,-122.277885 37.847509,-122.277766 37.847525,-122.277703 37.847533,-122.277603 37.847546,-122.277329 37.847582,-122.276746 37.847664,-122.276188 37.847734,-122.276082 37.847222,-122.275896 37.846329,-122.275843 37.846073,-122.275819 37.84596,-122.2758 37.845867,-122.275379 37.845924,-122.274912 37.845981,-122.274435 37.846042,-122.274095 37.846086,-122.27377 37.846128,-122.273323 37.846186,-122.273117 37.846214,-122.273027 37.846226,-122.272646 37.846278,-122.272566 37.846289,-122.272471 37.846302,-122.271763 37.846395,-122.271329 37.846451,-122.271236 37.846465,-122.271085 37.846485,-122.271004 37.846496,-122.270315 37.846586,-122.2702 37.846601,-122.270076 37.846618,-122.270041 37.846622,-122.269926 37.846637,-122.269789 37.846655,-122.269656 37.846673,-122.269631 37.846676,-122.269525 37.84669,-122.269495 37.846694,-122.269409 37.846705,-122.269382 37.846708,-122.269285 37.846721,-122.269144 37.84674,-122.269181 37.846927,-122.269226 37.847201,-122.269134 37.847213,-122.268763 37.847261,-122.268681 37.846902,-122.268609 37.846562,-122.268574 37.846374,-122.268533 37.846183,-122.268411 37.845598,-122.268369 37.845474,-122.268305 37.845251,-122.268183 37.844585,-122.26816 37.844495,-122.268092 37.844225,-122.26807 37.844136,-122.26805 37.844047,-122.267993 37.84378,-122.267974 37.843691,-122.267955 37.843596,-122.267898 37.843313,-122.267879 37.843219,-122.267841 37.843029,-122.267728 37.842462,-122.267691 37.842273,-122.267665 37.842152,-122.267587 37.841792,-122.267562 37.841672,-122.26753 37.84152,-122.267434 37.841064,-122.267402 37.840912,-122.267372 37.84076,-122.267285 37.840304,-122.267257 37.840152,-122.267241 37.840068,-122.26722 37.839968,-122.26711 37.839417,-122.267074 37.839234,-122.26704 37.839056,-122.266938 37.838522,-122.266905 37.838345,-122.266861 37.838165,-122.266748 37.837623,-122.266742 37.837591,-122.266724 37.83753,-122.266712 37.837514,-122.266684 37.837496,-122.266653 37.837482,-122.267064 37.83744,-122.267385 37.837408,-122.267935 37.837346,-122.268296 37.837307,-122.268327 37.837304,-122.268438 37.837279,-122.268459 37.837275,-122.268703 37.837232,-122.268784 37.837214,-122.268886 37.837192,-122.269029 37.837169,-122.269112 37.837156,-122.269151 37.837149,-122.269234 37.837136,-122.269268 37.837121,-122.269305 37.837105,-122.26968 37.837055,-122.270804 37.836906,-122.27118 37.836857,-122.271516 37.836805,-122.271628 37.836792,-122.272236 37.836722,-122.272961 37.836623,-122.272977 37.836621,-122.273356 37.836582,-122.273428 37.836578,-122.27367 37.836544,-122.274398 37.836441,-122.274641 37.836408,-122.275638 37.836447,-122.275665 37.836462,-122.275785 37.836531,-122.275987 37.836646,-122.276009 37.836659,-122.27604 37.836677,-122.276076 37.836705,-122.27622 37.836818,-122.276142 37.837029,-122.276105 37.837131,-122.276059 37.837259,-122.275924 37.837643,-122.275879 37.837772,-122.275846 37.837849,-122.275749 37.838082,-122.275718 37.83816,-122.27611 37.838323,-122.276121 37.838376,-122.276155 37.838535,-122.276167 37.838589,-122.276195 37.838724,-122.276282 37.83913,-122.276311 37.839266,-122.276334 37.839382,-122.276406 37.839733,-122.27643 37.83985,-122.27646 37.840015,-122.27655 37.84051,-122.27658 37.840676,-122.276605 37.840828,-122.276683 37.841284,-122.276709 37.841436,-122.276736 37.84157,-122.276819 37.841976,-122.276847 37.842111,-122.276873 37.84225,-122.276952 37.842668,-122.276979 37.842808,-122.276999 37.842924,-122.277006 37.842963,-122.277012 37.843085,-122.277031 37.843276,-122.277032 37.843286,-122.277026 37.843394,-122.27701 37.84359,-122.277088 37.843654,-122.277322 37.843846,-122.2774 37.84391,-122.277437 37.844084,-122.277548 37.844607,-122.277586 37.844782,-122.277599 37.844865,-122.277641 37.845115,-122.277655 37.845199,-122.277676 37.845376,-122.277742 37.845907,-122.277764 37.846084,-122.277981 37.846972,-122.278078 37.847326))","06001400700"
"POLYGON ((-122.288744 37.850007,-122.288487 37.850058,-122.28838 37.850079,-122.28678 37.850398,-122.286247 37.850505,-122.286221 37.850424,-122.28616 37.850236,-122.286143 37.850184,-122.286132 37.850149,-122.286006 37.850173,-122.285812 37.850207,-122.285689 37.85023,-122.285586 37.850251,-122.284984 37.850367,-122.284638 37.850435,-122.28452 37.850458,-122.2845 37.850391,-122.284331 37.850424,-122.284352 37.85049,-122.284054 37.850548,-122.283834 37.850591,-122.283571 37.850642,-122.283501 37.850441,-122.283464 37.850329,-122.283459 37.850307,-122.28344 37.85022,-122.283346 37.849956,-122.283383 37.849948,-122.283354 37.84985,-122.283326 37.849757,-122.283245 37.849489,-122.283216 37.849407,-122.283197 37.849347,-122.283089 37.849372,-122.282997 37.849102,-122.282964 37.849008,-122.282714 37.849063,-122.282705 37.849036,-122.282619 37.849057,-122.282588 37.849062,-122.282597 37.849088,-122.282463 37.849118,-122.282332 37.848743,-122.282244 37.848492,-122.282178 37.848307,-122.28199 37.848348,-122.281875 37.847829,-122.281863 37.847776,-122.282052 37.847751,-122.281977 37.847416,-122.281973 37.847376,-122.281966 37.847311,-122.281957 37.847245,-122.281899 37.846975,-122.281804 37.846988,-122.281792 37.846989,-122.281702 37.847001,-122.281502 37.847028,-122.281275 37.847057,-122.280708 37.847133,-122.280298 37.847188,-122.280024 37.847224,-122.279888 37.847242,-122.279883 37.84722,-122.279747 37.847239,-122.279751 37.84726,-122.279521 37.84729,-122.279371 37.84731,-122.27889 37.847375,-122.278542 37.847421,-122.278136 37.847475,-122.277885 37.847509,-122.278078 37.847326,-122.277981 37.846972,-122.277764 37.846084,-122.277742 37.845907,-122.277676 37.845376,-122.277655 37.845199,-122.277641 37.845115,-122.277599 37.844865,-122.277586 37.844782,-122.277548 37.844607,-122.277437 37.844084,-122.2774 37.84391,-122.277322 37.843846,-122.277088 37.843654,-122.27701 37.84359,-122.277335 37.843462,-122.277761 37.843295,-122.278301 37.843056,-122.278621 37.842915,-122.278695 37.842883,-122.278919 37.842788,-122.278994 37.842757,-122.279447 37.842565,-122.280807 37.841991,-122.281011 37.841906,-122.28126 37.8418,-122.281645 37.841635,-122.282285 37.841362,-122.2828 37.841141,-122.283062 37.841029,-122.283186 37.840978,-122.283999 37.840624,-122.283957 37.840487,-122.28407 37.840411,-122.284753 37.840133,-122.285576 37.839778,-122.285604 37.839871,-122.28569 37.840153,-122.285698 37.840179,-122.285721 37.840247,-122.285835 37.840597,-122.286179 37.84165,-122.286294 37.842001,-122.286378 37.842269,-122.28663 37.843076,-122.286714 37.843345,-122.286759 37.84348,-122.286897 37.843885,-122.286943 37.84402,-122.286996 37.844202,-122.287157 37.844751,-122.287211 37.844934,-122.287268 37.845101,-122.287441 37.845604,-122.287499 37.845772,-122.287543 37.845917,-122.287677 37.846353,-122.287722 37.846499,-122.28775 37.84658,-122.287837 37.846825,-122.287845 37.846847,-122.287866 37.846907,-122.287805 37.846924,-122.287835 37.847016,-122.287809 37.847024,-122.287839 37.84712,-122.287867 37.847112,-122.287916 37.847261,-122.287936 37.847398,-122.287954 37.847521,-122.288026 37.847725,-122.288128 37.848014,-122.288401 37.847952,-122.288534 37.848362,-122.288272 37.84842,-122.28826 37.848423,-122.288292 37.848549,-122.288315 37.84864,-122.288369 37.848809,-122.288456 37.849085,-122.288477 37.849159,-122.288521 37.849299,-122.288529 37.849324,-122.288539 37.849356,-122.288604 37.849561,-122.288618 37.84961,-122.288631 37.84965,-122.288715 37.849917,-122.288744 37.850007))","06001400800"
"POLYGON ((-122.285576 37.839778,-122.284753 37.840133,-122.28407 37.840411,-122.283957 37.840487,-122.283999 37.840624,-122.283186 37.840978,-122.283062 37.841029,-122.2828 37.841141,-122.282285 37.841362,-122.281645 37.841635,-122.28126 37.8418,-122.281011 37.841906,-122.280807 37.841991,-122.279447 37.842565,-122.278994 37.842757,-122.278919 37.842788,-122.278695 37.842883,-122.278621 37.842915,-122.278301 37.843056,-122.277761 37.843295,-122.277335 37.843462,-122.27701 37.84359,-122.277026 37.843394,-122.277032 37.843286,-122.277031 37.843276,-122.277012 37.843085,-122.277006 37.842963,-122.276999 37.842924,-122.276979 37.842808,-122.276952 37.842668,-122.276873 37.84225,-122.276847 37.842111,-122.276819 37.841976,-122.276736 37.84157,-122.276709 37.841436,-122.276683 37.841284,-122.276605 37.840828,-122.27658 37.840676,-122.27655 37.84051,-122.27646 37.840015,-122.27643 37.83985,-122.276406 37.839733,-122.276334 37.839382,-122.276311 37.839266,-122.276282 37.83913,-122.276195 37.838724,-122.276167 37.838589,-122.276155 37.838535,-122.276121 37.838376,-122.27611 37.838323,-122.275718 37.83816,-122.275749 37.838082,-122.275846 37.837849,-122.275879 37.837772,-122.275924 37.837643,-122.276059 37.837259,-122.276105 37.837131,-122.276142 37.837029,-122.27622 37.836818,-122.276257 37.836848,-122.27638 37.83693,-122.27656 37.836897,-122.276794 37.836853,-122.27694 37.83687,-122.277115 37.837003,-122.277135 37.837077,-122.277409 37.837029,-122.278062 37.83691,-122.27807 37.836927,-122.278111 37.836933,-122.278148 37.836945,-122.278187 37.836964,-122.27821 37.836985,-122.278232 37.837001,-122.278244 37.83702,-122.278312 37.837069,-122.278384 37.837113,-122.278438 37.837131,-122.278526 37.837167,-122.278546 37.837175,-122.278592 37.83719,-122.27865 37.837207,-122.278678 37.837221,-122.27871 37.837232,-122.278736 37.837234,-122.278779 37.837239,-122.278816 37.837241,-122.278953 37.837233,-122.278939 37.837178,-122.278963 37.83718,-122.279294 37.83712,-122.27941 37.837102,-122.279547 37.837075,-122.279928 37.837006,-122.280308 37.836938,-122.281098 37.836791,-122.281331 37.836752,-122.281425 37.836736,-122.281525 37.836719,-122.281649 37.836692,-122.28171 37.836884,-122.28172 37.836917,-122.281775 37.837109,-122.281807 37.837206,-122.281963 37.837181,-122.282024 37.83717,-122.282131 37.837152,-122.284 37.836803,-122.284085 37.836787,-122.284197 37.836766,-122.284343 37.836739,-122.284429 37.836724,-122.284453 37.836722,-122.284467 37.836721,-122.284494 37.83672,-122.284611 37.837096,-122.28471 37.837394,-122.284798 37.837683,-122.284915 37.838031,-122.285012 37.83801,-122.285053 37.838138,-122.285124 37.838363,-122.285463 37.839424,-122.285576 37.839778))","06001400900"
"POLYGON ((-122.278671 37.827178,-122.278593 37.827164,-122.278528 37.827146,-122.278481 37.827133,-122.27812 37.827033,-122.277956 37.826993,-122.277909 37.827156,-122.277868 37.82732,-122.277977 37.827337,-122.278074 37.827666,-122.278206 37.828111,-122.278226 37.828177,-122.278299 37.828394,-122.27832 37.828454,-122.278343 37.828522,-122.278366 37.828592,-122.278381 37.828635,-122.278426 37.82876,-122.278441 37.828803,-122.278463 37.828864,-122.278369 37.829117,-122.278251 37.829429,-122.278215 37.82954,-122.278061 37.829934,-122.2779 37.830366,-122.277606 37.831136,-122.277556 37.831276,-122.277343 37.831835,-122.277415 37.831849,-122.277842 37.831915,-122.277977 37.831942,-122.277842 37.832304,-122.277821 37.832304,-122.277731 37.832292,-122.277684 37.832286,-122.27754 37.832268,-122.27743 37.832251,-122.277275 37.832227,-122.277204 37.832216,-122.277168 37.832297,-122.276943 37.832898,-122.276766 37.833361,-122.276679 37.833595,-122.27641 37.834279,-122.276146 37.83496,-122.275896 37.835661,-122.275607 37.83643,-122.275638 37.836447,-122.274641 37.836408,-122.274398 37.836441,-122.27367 37.836544,-122.273428 37.836578,-122.273356 37.836582,-122.272977 37.836621,-122.272961 37.836623,-122.272236 37.836722,-122.271628 37.836792,-122.271516 37.836805,-122.27118 37.836857,-122.270804 37.836906,-122.26968 37.837055,-122.269305 37.837105,-122.269268 37.837121,-122.269234 37.837136,-122.269151 37.837149,-122.269112 37.837156,-122.269029 37.837169,-122.268886 37.837192,-122.268784 37.837214,-122.268703 37.837232,-122.268459 37.837275,-122.268438 37.837279,-122.268327 37.837304,-122.268296 37.837307,-122.267935 37.837346,-122.267385 37.837408,-122.267064 37.83744,-122.266653 37.837482,-122.266589 37.837489,-122.266448 37.837511,-122.26612 37.837565,-122.265835 37.837606,-122.265631 37.837636,-122.265647 37.837578,-122.265755 37.837034,-122.266115 37.835227,-122.266118 37.835217,-122.266236 37.834625,-122.266258 37.834514,-122.266299 37.834312,-122.266327 37.834181,-122.266351 37.834071,-122.266379 37.833937,-122.266465 37.833538,-122.266494 37.833405,-122.266514 37.83331,-122.266578 37.833025,-122.266599 37.832931,-122.266628 37.832774,-122.266718 37.832303,-122.266748 37.832147,-122.266777 37.831985,-122.266865 37.8315,-122.266895 37.831339,-122.266939 37.831193,-122.266941 37.831181,-122.267006 37.830878,-122.267043 37.830698,-122.267077 37.830538,-122.267251 37.829656,-122.267277 37.82953,-122.267396 37.828952,-122.267419 37.828852,-122.267456 37.82869,-122.267555 37.828261,-122.267566 37.828205,-122.267599 37.828043,-122.267643 37.827829,-122.267828 37.827044,-122.267913 37.826942,-122.26824 37.826555,-122.2683 37.826485,-122.268368 37.826304,-122.268452 37.826078,-122.268507 37.825931,-122.268541 37.825796,-122.268541 37.825569,-122.268519 37.825298,-122.268411 37.825041,-122.268476 37.824813,-122.268546 37.824532,-122.268563 37.824462,-122.26883 37.824531,-122.269048 37.824571,-122.269348 37.824631,-122.269686 37.824696,-122.27274 37.825464,-122.273365 37.825637,-122.274402 37.825924,-122.274453 37.825935,-122.275061 37.826059,-122.275111 37.826176,-122.275129 37.826104,-122.275136 37.82608,-122.278488 37.826848,-122.278611 37.826878,-122.278638 37.826959,-122.27865 37.826993,-122.27872 37.827188,-122.278671 37.827178))","06001401000"
However, when I try to include this in the report, the map is completely filled. The tutorial (the map of Washington state underneath) works perfectly.
In this image, you can zoom in to see the polygons and they look fine. However, the "fill" does not fill the polygons, but instead the entire map. I've tried changing the CRS, as well as going between multipolygons and simple polygons. I've also played with what goes in the location field. But no matter what, the first record covers the map and is identified on mouseover.
The report is here.
Edit: Using BigQuery Geo Viz, I have found that BigQuery somehow adds a section of coordinates that covers the entire globe:
{ "origin": "06001401000", "WKT": "{ \"type\": \"Polygon\", \"coordinates\": [ [ [180, 90], [-180, 90], [-180, -90], [180, -90], [180, 90] ], [ [-122.278671, 37.827178], [-122.278593, 37.827164], [-122.278528, 37.827146], [-122.278481, 37.827133], [-122.27812, 37.827033], ...
However, I cannot see this in the raw data.
The issue seems to be somewhere in the upload step. Big Query allows for upload of .csv files with WKT, but will not automatically detect WKT (as explained here). If the geo field is manually specified, it seems a set of coordinates that represent the planar map are added. Thus the "fill" field fills the entire map. These coordinates are not visible when querying the data in BigQuery.
A workaround is to let BigQuery convert it after upload:
SELECT ST_GEOGFROM(WKT) as tract_geo,
origin
FROM mydata
Related
Wrong outputs from torch.sub?
I’m currently using torch.sub alongside torch.div to obtain the MAPE between my predicted and true labels for my neural network although I’m not getting the answers I’m expecting. According to the example in the documentation, I should be getting a 4x1 tensor, not 4x4. Could anyone clear this up for me? print('y_true ', y_true) y_true tensor([[ 46], [262], [ 33], [ 35]], device=‘cuda:0’, dtype=torch.int16) print('y_pred ', y_pred) y_pred tensor([[[308.5075]], [[375.8983]], [[389.4587]], [[406.4957]]], device=‘cuda:0’, grad_fn=) print('torch.sub ', torch.sub(y_true, y_pred)) torch.sub tensor([[[-262.5075], [ -46.5075], [-275.5075], [-273.5075]], [[-329.8983], [-113.8983], [-342.8983], [-340.8983]], [[-343.4587], [-127.4587], [-356.4587], [-354.4587]], [[-360.4957], [-144.4957], [-373.4957], [-371.4957]]], device='cuda:0', grad_fn=<SubBackward0>)
That is because y_pred has an extra dimension which means the y_true tensor probably gets broadcasted to the correct dimension. If you remove the extra last dimension you get the desired result: >>> torch.sub(y_true, y_pred[...,0]).shape torch.Size([4, 1])
SOLR - Getting all document entries from intersecting polygon of given search request
I'm running a SOLR with a set of OSM Addresses. On the other hand I have some polygons in the same collection. I got the JTS in my solr, everything is working fine. My problem: For example the user is searching for a specific address like this: /solr/select?q=Bruhweg&wt=json The result will look like something like this: "type":["Feature"], "wkt":["POLYGON((9.0650999 48.80407349974092,9.065108 48.80405349974092,9.0651604 48.804044599740934,9.0651758 48.80405819974092,9.0652663 48.804044699740935,9.0652795 48.804077499740934,9.065298 48.804074799740924,9.06531 48.80411229974091,9.0653315 48.80411249974092,9.0653495 48.804152299740906,9.0653595 48.804185299740894,9.065227 48.8042043997409,9.0652154 48.804206599740894,9.0652046 48.80417829974089,9.0651805 48.8041809997409,9.065163500000002 48.8041373997409,9.0651464 48.8041391997409,9.0651335 48.80409639974092,9.0651051 48.80409789974092,9.0650999 48.80407349974092))"], "properties.label":"Bruhweg 11" "properties.category":"address" where the field "wkt" is matched to the correct SOLR Type, which we can simply verify with the following request: solr/select?fq=wkt%3A%22Intersects(9.0650999%2048.80407349974092)%22&q=&wt=json* Notice that I have just taken the first coordinate from "Bruhweg 11" polygon. The result looks like this: "type":["Feature"], "wkt":["POLYGON((9.0650999 48.80407349974092,9.065108 48.80405349974092,9.0651604 48.804044599740934,9.0651758 48.80405819974092,9.0652663 48.804044699740935,9.0652795 48.804077499740934,9.065298 48.804074799740924,9.06531 48.80411229974091,9.0653315 48.80411249974092,9.0653495 48.804152299740906,9.0653595 48.804185299740894,9.065227 48.8042043997409,9.0652154 48.804206599740894,9.0652046 48.80417829974089,9.0651805 48.8041809997409,9.065163500000002 48.8041373997409,9.0651464 48.8041391997409,9.0651335 48.80409639974092,9.0651051 48.80409789974092,9.0650999 48.80407349974092))"], "properties.label":"Bruhweg 11" "properties.category":"address" "type":["Feature"], "wkt":["POLYGON((9.04226364394244 48.78375351560371,9.056374594613018 48.78376897799828,9.059599869694331 48.78163342420202,9.081809522348271 48.78162969553386,9.081761686040636 48.78226547394644,9.082034238895682 48.78253237030596,9.0856383112481 48.783065728036505,9.081013408886774 48.784895520573016,9.08026549061692 48.78523860978792,9.075279465525824 48.78709720944531,9.075385415333642 48.78784623302399,9.075233988916805 48.78855044494239,9.07538936442188 48.789573632543714,9.076086792392704 48.7899895067132,9.076400978454831 48.79076807795856,9.076954863544922 48.791675940101136,9.077323565779931 48.79247426327167,9.077661454940172 48.79359088232947,9.07820886975919 48.79468135994337,9.078817709274189 48.79498392847467,9.079201898938019 48.79520667445914,9.08016333903955 48.79554857516962,9.079778914425672 48.79518198750416,9.079578091974522 48.79467583486249,9.07960878146339 48.79427927263826,9.079777474351143 48.794273758443296,9.079890211573053 48.79495800149708,9.08018722352202 48.795156515552904,9.080499405509059 48.795473674672415,9.080691862967708 48.795850379952874,9.080924981851217 48.79602374816294,9.081213923069749 48.79636161227024,9.08216503129647 48.797025378100585,9.082445049467385 48.796812064430696,9.082997510785853 48.79666782293686,9.083016532890815 48.798210792078066,9.084546369553149 48.79818997904426,9.08436196313672 48.79857684935421,9.084539100024378 48.798725962114545,9.084861025057869 48.79994602380419,9.084990671623789 48.80091802856458,9.08494424868377 48.80165186074672,9.085041682576207 48.80209339903589,9.08538756537159 48.802966378021715,9.086053469766966 48.80390370812341,9.085797560540206 48.803894003364,9.085814723600494 48.80437509265621,9.085407910580006 48.80612600144947,9.086188011009677 48.80771257109675,9.087281863093846 48.80971073096298,9.086304168618957 48.809607114458665,9.08560710806074 48.80961663014216,9.084061519923088 48.80938486330555,9.084077207035987 48.80980658042419,9.083543243778244 48.811250273222925,9.056400173581295 48.81120764569635,9.055584833918676 48.81131770190693,9.05233070753251 48.81010351728196,9.050449180583943 48.81143341235964,9.047719936766072 48.81048226708057,9.047480579846537 48.81086460229471,9.04435778697807 48.809744505510096,9.042626974936422 48.809303638995836,9.038908229735283 48.80850647660382,9.037144908448282 48.808184194812405,9.038129032787538 48.805980772861595,9.038328485640509 48.8051777307488,9.03824791543268 48.80471104904327,9.03876113924191 48.80479984728909,9.03889592317821 48.802984244443905,9.037701980314722 48.802949557020376,9.036369132836748 48.80272688628704,9.035368430087201 48.802290085608014,9.035368259304592 48.8020471956323,9.033685064639178 48.801228620567926,9.032644752493526 48.800737922085965,9.03217057774127 48.8000889091118,9.032098034258505 48.799508062093246,9.031417252535123 48.79921048432656,9.031802215987176 48.798784151506815,9.031441019924467 48.798238377399365,9.03225196905176 48.797687782137466,9.033547957749326 48.79595641436032,9.038695453795164 48.79394510865497,9.03934415364024 48.7933001500083,9.041676969957162 48.7917058788909,9.043068750531523 48.789672193708604,9.043444520390391 48.788257529857816,9.043555307907576 48.787275490180576,9.042249027750703 48.785802079685375,9.042512195810728 48.784854079302804,9.042199907427747 48.7840458175582,9.04226364394244 48.78375351560371))"], "properties.label":"polygonA", "properties.category":"polygons" What I want: If the user is just searching for Bruhweg I want as result the address AND the polygonA from category polygons Any Idea how to solve this?
How to get a list of Coinbase CryptoCurrency Coins
I've been trying to figure out a way to get a list of all the Coins that Coinbase has listed (not necessarily for trade) but can't figure it out, in the early days it was easy as you could just login and see the list of 4 basic coins that were supported (and could hard code those values in a program and/or script). But now they have a list of many coins listed, some as I understand, which are not available to actually trade but are listed for educational purposes (as stated on their site when looking at such coins). I was wondering if anyone has figured out a way to get a list those coins (all supported and simply listed) perhaps with a tag of which are actually supported for trade. I looked at the API and the REST API (using a simple GET request over HTTPS or using cURL for testing) has the following endpoints: curl https://api.coinbase.com/v2/currencies - This lists all the Fiat currencies. and: curl https://api.pro.coinbase.com/products - This lists all the supported trading pairs (which is not what I'm looking for....) Any ideas, short of logging in and parsing the html? (which could break since the site can be reformatted etc at any time). Any help would be greatly appreciated!
perhaps not really what you asked, but you could also use https://api.pro.coinbase.com/currencies import requests import json uri = 'https://api.pro.coinbase.com/currencies' response = requests.get(uri).json() for i in range(len(response)): if response[i]['details']['type'] == 'crypto': print(response[i]['id]) This will return the coins available for trading.
I'm not sure if I this is the response that you want or not. I first used the first URL that you have listed... The response from that looked like it didn't have the available coins. I then tried the below URL instead and the response does have a lot of curriencies listed on it. You can parse it by loading with JSON and looking for the fields that you want. Also I didn't see a language posted with your question. I'm using python3 below. If you're a Linux person you can also just use curl GET from the command line. It doesn't matter the language... you just need to make a GET request to that URL and parse the response however you see fit. To get 1 particular field you can use a line like response['data']['rates']['BTC'] to extract '0.00029200' out of the response/JSON string. >>> r = requests.get("https://api.coinbase.com/v2/exchange-rates") >>> response = json.loads(r.text) >>> pprint.pprint(response) {'data': {'currency': 'USD', 'rates': {'AED': '3.67', 'AFN': '75.22', 'ALL': '108.84', 'AMD': '487.59', 'ANG': '1.79', 'AOA': '311.37', 'ARS': '37.32', 'AUD': '1.38', 'AWG': '1.80', 'AZN': '1.70', 'BAM': '1.71', 'BAT': '9.00418244', 'BBD': '2.00', 'BCH': '0.00879160', 'BDT': '83.80', 'BGN': '1.71', 'BHD': '0.377', 'BIF': '1824', 'BMD': '1.00', 'BND': '1.58', 'BOB': '6.90', 'BRL': '3.65', 'BSD': '1.00', 'BTC': '0.00029200', 'BTN': '71.11', 'BWP': '10.41', 'BYN': '2.15', 'BYR': '21495', 'BZD': '2.02', 'CAD': '1.31', 'CDF': '1631.00', 'CHF': '0.99', 'CLF': '0.0242', 'CLP': '656', 'CNH': '6.71', 'CNY': '6.70', 'COP': '3174.95', 'CRC': '608.98', 'CUC': '1.00', 'CVE': '96.90', 'CZK': '22.50', 'DJF': '178', 'DKK': '6.52', 'DOP': '50.44', 'DZD': '118.30', 'EEK': '14.61', 'EGP': '17.68', 'ERN': '15.00', 'ETB': '28.52', 'ETC': '0.25542784', 'ETH': '0.00944599', 'EUR': '0.87', 'FJD': '2.10', 'FKP': '0.76', 'GBP': '0.76', 'GEL': '2.66', 'GGP': '0.76', 'GHS': '4.98', 'GIP': '0.76', 'GMD': '49.52', 'GNF': '9210', 'GTQ': '7.74', 'GYD': '208.55', 'HKD': '7.85', 'HNL': '24.49', 'HRK': '6.49', 'HTG': '78.37', 'HUF': '276', 'IDR': '13940.00', 'ILS': '3.63', 'IMP': '0.76', 'INR': '70.93', 'IQD': '1190.000', 'ISK': '120', 'JEP': '0.76', 'JMD': '132.72', 'JOD': '0.710', 'JPY': '109', 'KES': '100.60', 'KGS': '68.70', 'KHR': '4015.00', 'KMF': '429', 'KRW': '1114', 'KWD': '0.303', 'KYD': '0.83', 'KZT': '380.63', 'LAK': '8559.50', 'LBP': '1511.15', 'LKR': '178.40', 'LRD': '160.75', 'LSL': '13.53', 'LTC': '0.03208728', 'LTL': '3.22', 'LVL': '0.66', 'LYD': '1.385', 'MAD': '9.53', 'MDL': '17.05', 'MGA': '3465.0', 'MKD': '53.78', 'MMK': '1519.04', 'MNT': '2453.75', 'MOP': '8.08', 'MRO': '357.0', 'MTL': '0.68', 'MUR': '34.23', 'MVR': '15.49', 'MWK': '728.47', 'MXN': '19.14', 'MYR': '4.10', 'MZN': '61.87', 'NAD': '13.53', 'NGN': '361.50', 'NIO': '32.60', 'NOK': '8.43', 'NPR': '113.78', 'NZD': '1.45', 'OMR': '0.385', 'PAB': '1.00', 'PEN': '3.33', 'PGK': '3.36', 'PHP': '52.13', 'PKR': '139.30', 'PLN': '3.73', 'PYG': '6084', 'QAR': '3.64', 'RON': '4.14', 'RSD': '103.53', 'RUB': '65.47', 'RWF': '886', 'SAR': '3.75', 'SBD': '8.06', 'SCR': '13.67', 'SEK': '9.05', 'SGD': '1.35', 'SHP': '0.76', 'SLL': '8390.00', 'SOS': '582.00', 'SRD': '7.46', 'SSP': '130.26', 'STD': '21050.60', 'SVC': '8.75', 'SZL': '13.52', 'THB': '31.23', 'TJS': '9.43', 'TMT': '3.50', 'TND': '2.968', 'TOP': '2.26', 'TRY': '5.18', 'TTD': '6.77', 'TWD': '30.72', 'TZS': '2317.00', 'UAH': '27.70', 'UGX': '3670', 'USD': '1.00', 'USDC': '1.000000', 'UYU': '32.58', 'UZS': '8380.00', 'VEF': '248487.64', 'VND': '23287', 'VUV': '111', 'WST': '2.60', 'XAF': '573', 'XAG': '0', 'XAU': '0', 'XCD': '2.70', 'XDR': '1', 'XOF': '573', 'XPD': '0', 'XPF': '104', 'XPT': '0', 'YER': '250.30', 'ZAR': '13.27', 'ZEC': '0.02056344', 'ZMK': '5253.08', 'ZMW': '11.94', 'ZRX': '4.04721481', 'ZWL': '322.36'}}}
The following code: import requests uri = 'https://api.pro.coinbase.com/currencies' response = requests.get(uri).json() for i in range(len(response)): if response[i]['details']['type'] == 'crypto': print(response[i]['id']) Will provide this output: COTI BTC ETH LTC BCH ZEC XTZ XRP XLM EOS ALGO DASH ATOM CGLD FIL ADA ICP SOL DOT DOGE OXT KNC MIR REP COMP NMR ACH BAND ZRX BAT LOOM UNI YFI LRC CVC DNT MANA GNT REN LINK BAL ETC USDC RLC DAI WBTC NU AAVE SNX BNT GRT SUSHI MLN ANKR CRV STORJ SKL AMP 1INCH ENJ NKN OGN FORTH GTC TRB CTSI MKR UMA USDT CHZ SHIB BOND LPT QNT KEEP CLV MASK MATIC OMG POLY FARM FET PAX RLY PLA RAI IOTX ORN AXS QUICK TRIBE UST REQ TRU WLUNA
you can use curl -X GET https://api.exchange.coinbase.com/products refer to https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_getproducts
DbGeography - select polygons/linestrings contained inside polygon
I have a case where I want to load map objects located inside users viewport. This is how I create users viewport rectangle: DbGeography viewport_rectangle = DbGeography.FromText(string.Format("POLYGON(({0} {1}, {0} {2}, {3} {2}, {3} {1}, {0} {1}))", lon_min, lat_min, lat_max, lon_max)); Then I want to select all objects (Points, PolyLines, Polygons, located inside that rectangle): var objects = db.mapobjects.Where(x => !x.LocationGeographic.Intersects(viewport_rectangle)); Everything until here works fine. The problem occours if PolyLine/Polygon is not entirely contained inside the viewport polygon. In this case it's ignored and I get "no objects" instead of objects, where some points/edges are out of the viewport. Is there any alternative to "Intersects"? I want to select objects contained in the viewport rectangle, regardless if they are inside at all, or if only one small part of them is inside of the viewport rectangle. viewport_rectangle = {SRID=4326;POLYGON ((15.693584159016611 46.532346466357438, 15.693584159016611 46.532770863495614, 15.695530101656916 46.532770863495614, 15.695530101656916 46.532346466357438, 15.693584159016611 46.532346466357438))} Object which is only partially located inside viewport_rectangle and should be returned as a result: LINESTRING (15.694189164787527 46.532622094224166, 15.694309193640944 46.532614944062828, 15.694392677396532 46.5326121762582, 15.694401059299702 46.532662919320614, 15.694536175578829 46.532621632923423, 15.694564338773485 46.532659690218026, 15.694584455341097 46.532614944062828, 15.694570373743769 46.532578039989573, 15.694489236921068 46.53258611275777, 15.694502312690016 46.532539290685662, 15.694723930209872 46.53252614359414, 15.69474438205361 46.532575041532539, 15.694786962121723 46.532516225610692, 15.694763492792843 46.532481858630774, 15.694699790328738 46.532507922181281, 15.694884862750767 46.532493852478581, 15.694849658757446 46.53254505695287) One part of LINQ generated query: SELECT [Filter1].[ObjectId] AS [ObjectId], [Filter1].[LocationGeographic] AS [LocationGeographic], FROM (SELECT [Extent1].[ObjectId] AS [ObjectId], [Extent1].[LocationGeographic] AS [LocationGeographic] FROM [dbo].[mapobjects] AS [Extent1] WHERE (([Filter1].[LocationGeographic].STIntersects(#p__linq__0)) <> cast(1 as bit)) ) AS [Project1] Edited: the correct order of viewport_rectangle should be: DbGeography viewport_rectangle = DbGeography.FromText(string.Format("POLYGON(({0} {1}, {2} {1}, {2} {3}, {0} {3}, {0} {1}))", lon_min, lat_min, lon_max, lat_max));
You appear to have a ring orientation problem with your polygon. The order in which you specify your points matters. The polygon, as you've defined it, is the entire globe minus a very small square (presumably, your desired viewport). How did I determine this? declare #line geography = geography::STGeomFromText('LINESTRING (15.694189164787527 46.532622094224166, 15.694309193640944 46.532614944062828, 15.694392677396532 46.5326121762582, 15.694401059299702 46.532662919320614, 15.694536175578829 46.532621632923423, 15.694564338773485 46.532659690218026, 15.694584455341097 46.532614944062828, 15.694570373743769 46.532578039989573, 15.694489236921068 46.53258611275777, 15.694502312690016 46.532539290685662, 15.694723930209872 46.53252614359414, 15.69474438205361 46.532575041532539, 15.694786962121723 46.532516225610692, 15.694763492792843 46.532481858630774, 15.694699790328738 46.532507922181281, 15.694884862750767 46.532493852478581, 15.694849658757446 46.53254505695287)', 4236), #poly geography = geography::STGeomFromText('POLYGON ((15.693584159016611 46.532346466357438, 15.693584159016611 46.532770863495614, 15.695530101656916 46.532770863495614, 15.695530101656916 46.532346466357438, 15.693584159016611 46.532346466357438))', 4236); select #poly.EnvelopeAngle(); --returns 180 select #poly.ReorientObject().STIntersects(#line); --returns 1 Best you read up on the EnvelopeAngle() method yourself. But I'll say this - I use it as a quick heuristic to detect the ring orientation problem you have here. Invariably, if a polygon has this problem, the envelope angle will be 180 (which is almost never what you intended). I've also given away the punchline on how to fix it in the code above; calling ReorientObject() on the polygon changes clockwise to counterclockwise (and vice versa). Finally, it looks like your line string was fully contained within your viewport; I tested with STContains(). Which explains why you were getting false before when what you thought was your viewport was everything but the viewport!
SQL Server : geography data type: GeomFromGml
I have troubles to load data into a geography data type: DECLARE #g geography; DECLARE #x xml; SET #x = '<gml:MultiSurface gml:id="HVO.20584" srsName="urn:ogc:def:crs:EPSG::5514" srsDimension="2" xmlns:gml="http://www.opengis.net/gml/3.2"> <gml:surfaceMember> <gml:Polygon gml:id="HVO.20584.1"> <gml:exterior> <gml:LinearRing> <gml:posList>-747267.00 -1056204.00 -747226.00 -1056232.00 -747239.00 -1056253.00 -747251.00 -1056278.00 -747267.00 -1056315.00 -747291.00 -1056365.00 -747337.00 -1056470.00 -747311.00 -1056474.00 -747244.00 -1056475.00 -747155.00 -1056467.00 -747077.00 -1056501.00 -747112.00 -1057366.00 -747263.00 -1057857.00 -747263.20 -1057857.05 -747263.30 -1057856.60 -747272.50 -1057858.50 -747276.10 -1057850.21 -747285.47 -1057849.89 -747295.34 -1057849.55 -747308.73 -1057848.34 -747320.38 -1057847.28 -747346.97 -1057857.70 -747358.66 -1057860.00 -747374.12 -1057860.55 -747386.06 -1057860.19 -747407.98 -1057859.54 -747444.60 -1057874.26 -747447.75 -1057879.52 -747454.57 -1057890.92 -747674.02 -1057865.46 -747851.54 -1057841.44 -747855.78 -1057838.67 -747871.68 -1057851.47 -747902.20 -1057870.55 -747916.06 -1057881.32 -747934.07 -1057891.87 -747960.03 -1057915.53 -747985.14 -1057954.40 -748001.13 -1057977.02 -748021.22 -1058003.59 -748088.58 -1058092.68 -748104.73 -1058095.49 -748166.00 -1058032.60 -748193.50 -1058002.40 -748214.40 -1057982.20 -748216.40 -1057988.60 -748293.20 -1058053.20 -748297.14 -1058050.03 -748302.55 -1058045.67 -748306.53 -1058042.47 -748311.89 -1058038.15 -748316.50 -1058034.44 -748320.83 -1058030.95 -748330.04 -1058023.54 -748332.15 -1058021.83 -748337.10 -1058017.85 -748341.39 -1058014.39 -748353.30 -1058004.80 -748347.67 -1057996.70 -748338.28 -1057981.31 -748335.70 -1057977.29 -748332.12 -1057971.71 -748330.30 -1057968.92 -748325.55 -1057961.32 -748317.05 -1057947.55 -748310.89 -1057935.02 -748307.10 -1057924.52 -748302.70 -1057912.35 -748298.54 -1057900.12 -748295.48 -1057891.13 -748286.20 -1057862.27 -748278.37 -1057838.25 -748276.55 -1057834.04 -748267.49 -1057808.20 -748264.92 -1057798.33 -748262.21 -1057787.93 -748254.57 -1057761.59 -748251.89 -1057752.13 -748247.59 -1057736.93 -748240.11 -1057716.13 -748237.47 -1057685.67 -748234.93 -1057657.42 -748234.51 -1057652.51 -748234.98 -1057625.54 -748234.51 -1057622.46 -748231.40 -1057602.21 -748233.13 -1057596.29 -748234.13 -1057592.87 -748237.61 -1057582.60 -748238.48 -1057580.02 -748249.72 -1057571.70 -748250.10 -1057571.42 -748252.39 -1057569.73 -748256.83 -1057563.57 -748258.55 -1057540.99 -748250.24 -1057535.67 -748250.94 -1057526.41 -748243.01 -1057522.35 -748236.51 -1057522.75 -748234.73 -1057522.86 -748230.54 -1057518.95 -748211.65 -1057501.36 -748199.48 -1057493.59 -748189.98 -1057489.26 -748179.90 -1057484.66 -748168.54 -1057470.65 -748168.29 -1057470.34 -748165.98 -1057467.49 -748157.92 -1057458.13 -748147.31 -1057450.99 -748146.04 -1057423.54 -748145.40 -1057410.42 -748144.91 -1057400.47 -748144.08 -1057372.43 -748142.62 -1057348.91 -748142.48 -1057347.16 -748141.05 -1057329.37 -748142.26 -1057321.94 -748146.21 -1057304.13 -748148.14 -1057295.42 -748146.30 -1057289.44 -748144.73 -1057284.34 -748141.64 -1057275.31 -748144.63 -1057272.64 -748154.01 -1057247.80 -748151.29 -1057246.55 -748127.50 -1057235.56 -748110.70 -1057228.23 -748082.39 -1057214.75 -748057.48 -1057203.76 -748041.82 -1057196.01 -748029.14 -1057189.74 -748010.10 -1057178.36 -747979.25 -1057161.25 -747957.25 -1057147.63 -747943.14 -1057138.66 -747937.35 -1057131.26 -747926.97 -1057121.60 -747909.48 -1057109.13 -747904.01 -1057106.36 -747895.25 -1057106.99 -747873.33 -1057094.64 -747869.74 -1057093.00 -747851.77 -1057082.31 -747869.79 -1057044.54 -747836.92 -1057032.09 -747795.65 -1057016.73 -747793.70 -1057009.93 -747787.82 -1056992.87 -747781.28 -1056974.44 -747776.81 -1056960.35 -747768.14 -1056933.57 -747762.16 -1056911.71 -747757.80 -1056895.21 -747753.30 -1056877.50 -747749.17 -1056859.18 -747744.25 -1056838.69 -747741.79 -1056821.91 -747739.99 -1056803.90 -747737.12 -1056781.92 -747735.82 -1056761.48 -747735.01 -1056740.42 -747736.57 -1056718.66 -747738.55 -1056694.68 -747741.17 -1056669.07 -747744.02 -1056634.01 -747745.17 -1056623.46 -747748.09 -1056596.69 -747755.37 -1056564.46 -747759.01 -1056547.20 -747761.29 -1056536.38 -747761.56 -1056535.10 -747772.54 -1056491.85 -747774.05 -1056485.90 -747786.35 -1056435.41 -747786.99 -1056433.22 -747796.41 -1056400.93 -747799.01 -1056392.00 -747799.01 -1056392.00 -747799.00 -1056392.00 -747723.00 -1056390.00 -747615.00 -1056374.00 -747596.00 -1056372.00 -747564.00 -1056375.00 -747539.00 -1056382.00 -747513.00 -1056389.00 -747487.00 -1056344.00 -747472.00 -1056316.00 -747458.00 -1056290.00 -747455.00 -1056283.00 -747445.00 -1056265.00 -747433.00 -1056243.00 -747424.00 -1056225.00 -747420.00 -1056218.00 -747412.00 -1056205.00 -747399.00 -1056188.00 -747388.00 -1056173.00 -747383.00 -1056167.00 -747371.00 -1056154.00 -747370.00 -1056153.00 -747362.00 -1056145.00 -747356.00 -1056141.00 -747356.00 -1056140.00 -747334.00 -1056160.00 -747267.00 -1056204.00</gml:posList> </gml:LinearRing> </gml:exterior> </gml:Polygon> </gml:surfaceMember> </gml:MultiSurface>'; SET #g = geography::GeomFromGml(#x, 4326); I get this exception: A .NET Framework error occurred during execution of user-defined routine or aggregate "geography": System.FormatException: 24129: The given XML instance is not valid because the top-level tag is gml:MultiSurface. The top-level element of the input Geographic Markup Language (GML) must contain a Point, LineString, Polygon, MultiPoint, MultiGeometry, MultiCurve, MultiSurface, Arc, ArcString, CompositeCurve, PolygonPatch or FullGlobe (geography Data Type only) object. What do I need to change in the #x variable to get it working? Thanks
Note, the answer here refers to the question of dealing with the coordinates above, that are not geodesic, as raised in the comments, and not with the original question of parsing the XML, which was answered in the comments. After a bit of digging, it seems that the Czech Republic's projection is now known as http://spatialreference.org/ref/sr-org/czech-s-jtsk-gis-esri102067/. If you look at that page you will see that the coordinates are in meters, and are negative, just as in your XML above. This WKT representation gives you information about the datum, spheroid and other characteristics of the projection. SQL Server does not currently support projecting from one coordinate system to another, so you have two options. 1). Load it as is, but as a geometry not a geography datatype, so your last line above would become SET #g = geometry::GeomFromGml(#x, 5514); where 9819 appears to be the SRID code in the above link (although it is all a bit unclear). This actually doesn't matter that much, as you can't convert from one spatial reference system to another, but you will be able to perform any geometry functions on your geometries, such as STIntersects, STContains, STBuffer, etc. 2). Convert it to lat/lon (4326) outside of SQL Server and then import as a geography data type, if that it what you really want. There is as tool called gdaltransform which does this, eg, gdaltransform -s_srs "+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=0 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56 +units=m +no_defs" -t_srs EPSG:4326 -747267.00 -1056204.00 24.8307791587916 50.4239544736181 32.0127759873867 14.3847700978484 49.9644982150517 45.4088854994625 where you enter the first line, with the projection info, hit Return, then enter the coordinates and then you get the answer. From this you can see that it is giving a lat/lon 14.38, 49.96, which is in Prague, so definitely the Czech Republic. This approach isn't very scalable, so you would probably want to look at something like Proj4j which is a Java library for doing coordinate transforms.