geojson

How to define JSON Schema for Map<String, Integer>?

自闭症网瘾萝莉.ら 提交于 2019-12-01 15:41:24
I have a json : { "itemType": {"food":22,"electrical":2}, "itemCount":{"NA":211} } Here the itemType and itemCount will be common but not the values inside them (food, NA, electrical) which will be keep changing but the will be in the format : Map How do I define Json Schema for such generic structure ? I tried : "itemCount":{ "type": "object" "additionalProperties": {"string", "integer"} } You can: { "type": "object", "properties": { "itemType": {"$ref": "#/definitions/mapInt"}, "itemCount": {"$ref": "#/definitions/mapInt"} }, "definitions": { "mapInt": { "type": "object",

基于HTML5的在线地图

旧街凉风 提交于 2019-12-01 15:27:41
Qunee for HTML5有许多 地图的示例 ,包括 地铁图 ,基于S VG数据的地图 ,结合 leaflet的地图 等,每个示例都是单独的实现,代码也各有不同,于是我们想,是否能将这些方案统一起来,实现一种地图解决方案呢?于是我们开始整合,从世界地图到国内各市县的地图,再到各种地铁图,都用HTML5技术呈现出来,而在地图之上还有我们的拓扑图,等值分析图,地铁线路分析等等,本文我们将介绍如何使用Qunee加载标准地图数据,实现从世界地图到国内省市地图的呈现 标准地图数据 首先遇到的是地图数据的问题,我们选择支持两种数据格式:GeoJSON和TopoJSON,前者是地理数据的标准格式,各种GIS软件都支持,后者是D3.js用到的一种数据格式,能有效压缩数据文件,Qunee建议使用TopoJSON数据格式 Qunee地图示例 下面以一个hello world示例介绍MapChart的使用 <!DOCTYPE html> <html> <head> <title>地图浏览</title> <meta charset="utf-8"> </head> <body> <div style="height: 600px;" id="canvas"/> <!--加载Qunne和Map相关扩展类库--> <!--Qunee图形组件 --> <script src="http://demo

How to know if topojson is installed and working normally?

ぐ巨炮叔叔 提交于 2019-12-01 13:57:09
How to know if topojson is well installed and working normally? An example tiny file to convert will be appreciate. with both the source and expected result If you haven't stumbled across this yet I found it to be a great walkthrough of the entire process: http://bost.ocks.org/mike/map/ The above link also includes the command to run to check if topojson is installed: $which topojson If topojson is installed correctly this will print out the directory where it's installed, which might look something like this (but could be different): /usr/local/bin/topojson If the command doesn't print

Using st_read to import large geojson in iterations R

笑着哭i 提交于 2019-12-01 12:35:47
I want to import a very large geojson into a simple features object using st_read in R, however the hardware demands seem to be large when converting from geojson to sf. for example, importing the microsoft data for building footprints for Ohio ( https://github.com/Microsoft/USBuildingFootprints ) which is a 1.2 GB geojson eats up over 32 GB of RAM when converting. Is their a method for iterating through rows of a geojson in a function so I can import parts of the whole file without eating up all that RAM, similar to skip rows in read.csv? Using library(geojsonsf) seems to work without issue

Extending Highmaps Side Effect

偶尔善良 提交于 2019-12-01 11:39:42
I am trying to create a dot density map of the state of Florida. While I know that Highmaps doesn't support color axis with mappoints. I extended it and it works but it comes with a side affect. When I click on one of the categories in the legend no hiding occurs. For example if I click on '>10', all values greater than 10 don't hide. When I open up the Chrome debugger it states that: a.setVisible is not a function What can I do to solve this problem. This is a requirement, while it may seem minor. I would appreciate any sort of tips or maybe some sort of example would be perfect. I can't show

Using st_read to import large geojson in iterations R

这一生的挚爱 提交于 2019-12-01 11:17:05
问题 I want to import a very large geojson into a simple features object using st_read in R, however the hardware demands seem to be large when converting from geojson to sf. for example, importing the microsoft data for building footprints for Ohio (https://github.com/Microsoft/USBuildingFootprints) which is a 1.2 GB geojson eats up over 32 GB of RAM when converting. Is their a method for iterating through rows of a geojson in a function so I can import parts of the whole file without eating up

Extending Highmaps Side Effect

南楼画角 提交于 2019-12-01 09:54:08
问题 I am trying to create a dot density map of the state of Florida. While I know that Highmaps doesn't support color axis with mappoints. I extended it and it works but it comes with a side affect. When I click on one of the categories in the legend no hiding occurs. For example if I click on '>10', all values greater than 10 don't hide. When I open up the Chrome debugger it states that: a.setVisible is not a function What can I do to solve this problem. This is a requirement, while it may seem

GDAL OGR Tools

偶尔善良 提交于 2019-12-01 08:14:57
OGR2OGR ogr2ogr 使用文档 1. GeoJSON 转换 ShapeFile ogr2ogr -nlt POLYGON -skipfailures ground.shp ground.json 2. IGISMap 也提供一些格式转换工具  ShapeFile To GeoJSON:  https://www.igismap.com/different-ways-to-convert-shapefile-to-geojson-online-or-offline-or-api/ ShapeFile To KML: https://www.igismap.com/shp-to-kml/ 来源: https://www.cnblogs.com/wanghaiyang1930/p/11672412.html

D3 - Large GeoJSON File does not show draw map properly using projections

我是研究僧i 提交于 2019-12-01 07:31:14
问题 I am having an issue with drawing this GeoJSON file I picked up from data.seattle.gov. Specifically, I'm using the Shape file which can be found here. I converted it to a GeoJSON file where I provided a small sample below. By using D3, I was hoping to draw out what should be the different precincts in Seattle (actually I'm not entirely sure what it should be which is why I'm drawing it... ha...) but for some reason it isn't showing it correctly despite the fact that the paths are correctly

How can I parse GeoJSON with Python

十年热恋 提交于 2019-12-01 07:21:10
问题 I have have geojson data from a query which I now want to parse and print on screen. My current code is: import urllib import geojson while True: url = 'https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&starttime=2012-01-01&endtime=2017-03-01&minmagnitude=4.0&maxmagnitude=9.0&minlongitude=5.95&maxlongitude=10.50&minlatitude=45.81&maxlatitude=47.81' uh = urllib.urlopen(url) data = uh.read() print data break It seems that data is a simple string. However, I thought it could be