GeoJson和bokeh-1怎么在Python中使用

  介绍

本篇文章为大家展示了GeoJson和bokeh-1怎么在Python中使用,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。

GeoJson文档

{   ,“type":,“FeatureCollection"   ,“features":,   {才能   ,才能“geometry":, {   ,,,“type":,“Polygon"   ,,,“coordinates":,   ,,,,(   ,,,,,(   ,,,,,,,   ,,,,,,1   ,,,,,,   ,,,,,(   ,,,,,,,   ,,,,,,2   ,,,,,,   ,,,,,(   ,,,,,,,   ,,,,,,2   ,,,,,,   ,,,,,(   ,,,,,,,   ,,,,,,1   ,,,,,,   ,,,,,(   ,,,,,,,   ,,,,,,1   ,,,,,)   ,,,,)   ,,,)   ,,},   ,才能“type":,“Feature"   ,才能“properties":, {   ,,,“perimeter":, 0,   ,,,“vista":,“mim"   ,,,“provincia":,“右侧正方形“,   ,,,“objectid":, 24岁,   ,,,“prov":, 0,   ,,,“bounds":,   ,,,,,   ,,,,0   ,,,,   ,,,“provif3_":, 27.0,   ,,,“ogc_fid":, 26岁,   ,,,“provif3_id": 26.0   ,,}   ,,},   {才能   ,才能“geometry":, {   ,,,“type":,“Polygon"   ,,,“coordinates":,   ,,,,(   ,,,,,(   ,,,,,,,   ,,,,,,1   ,,,,,,   ,,,,,(   ,,,,,,,   ,,,,,,2   ,,,,,,   ,,,,,(   ,,,,,,,   ,,,,,,2   ,,,,,,   ,,,,,(   ,,,,,,,   ,,,,,,1   ,,,,,,   ,,,,,(   ,,,,,,,   ,,,,,,1   ,,,,,)   ,,,,)   ,,,)   ,,},   ,才能“type":,“Feature"   ,才能“properties":, {   ,,,“perimeter":, 0,   ,,,“vista":,“mim"   ,,,“provincia":,“左侧正方形“,   ,,,“objectid":, 24岁,   ,,,“prov":, 0,   ,,,“bounds":,   ,,,,,   ,,,,0   ,,,,   ,,,“provif3_":, 27.0,   ,,,“ogc_fid":, 26岁,   ,,,“provif3_id": 26.0   ,,}   ,,}   ,)   } 得到bokeh.io  import 节目,output_notebook, output_file   得到bokeh.models  import  (   GeoJSONDataSource才能,   HoverTool才能,   LinearColorMapper才能   )   得到bokeh.plotting  import 图   得到bokeh.palettes  import  Viridis6   with 开放(" # 39;argentina.json& # 39;,, & # 39; " # 39;,,编码=& # 39;use utf8 # 39;), as  f:   时间=geo_source 才能;GeoJSONDataSource (geojson=f.read ())   时间=color_mapper  LinearColorMapper(面板=Viridis6)   时间=TOOLS “锅,wheel_zoom, box_zoom,重置,盘旋,save"   p =,图(title=罢叫?,,=工具,工具,x_range=[1, 10], y_range=[1, 10],=500,宽度,高度=500)   时间=p.grid.grid_line_color 没有   p.patches (& # 39; xs # 39;,, & # 39; y # 39;,, fill_alpha=0.7, fill_color={& # 39;场# 39;:,& # 39;objectid # 39;,, & # 39;变换# 39;:,color_map},   null   null   null   null   null   null

GeoJson和bokeh-1怎么在Python中使用