首先要做的是:这些数据是否采用适当的GeoJSON格式?
根据GeoJSON数据的定义的说法,正如MultiPoint & coordinates所看到的那样,我认为是的。
看起来是这样的:
{
"lang": {
"code": "en",
"conf": 1.0
},
"group": "JobServe",
"description": "Work with the data science team to build new products and integrate analytics\ninto existing workflows. Leverage big data solutions, advanced statistical\nmethods, and web apps. Coordinate with domain experts, IT operations, and\ndevelopers. Present to clients.\n\n * Coordinate the workflow of the data science team\n * Join a team of experts in big data, advanced analytics, and visualizat...",
"title": "Data Science Team Lead",
"url": "http://www.jobserve.com/us/en/search-jobs-in-Columbia,-Maryland,-USA/DATA-SCIENCE-TEAM-LEAD-99739A4618F8894B/",
"geo": {
"type": "MultiPoint",
"coordinates": [
[
-76.8582049,
39.2156213
]
]
},
"tags": [
"Job Board"
],
"spider": "jobserveNa",
"employmentType": [
"Unspecified"
],
"lastSeen": "2015-05-13T01:21:07.240000",
"jobLocation": [
"Columbia, Maryland, United States of America"
],
"identifier": "99739A4618F8894B",
"hiringOrganization": [
"Customer Relation Market Research Company"
],
"firstSeen": "2015-05-13T01:21:07+00:00"
}, 我想把它想象成一个“可缩放的”,即。交互式地图,如d3js网站上的示例所示。
我试图使用一个名为mapshaper.org的工具来查看地图形式的数据的初始可视化,但是当我加载它时,什么都不会发生。
对我来说,这是没有意义的,因为,根据他们的网站,人们可以简单地
Drag and drop or select a file to import.
Shapefile, GeoJSON and TopoJSON files and Zip archives are supported.然而,就我的情况而言,这是行不通的。
有没有人对可能出了什么问题有任何直觉,或者对一个可以用来根据GeoJSON数据创建一个可缩放地图的工具有任何建议?
发布于 2015-09-04 08:43:15
根据GeoJSON数据的定义,我认为该格式构成了数据。
好吧,您没有一个合适的GeoJSON对象。把你所得到的与你所联系的例子进行比较。它甚至都没有接近。这就是为什么mapshaper不知道如何处理加载到其中的JSON。
类型为“GeoJSON”的FeatureCollection对象是一个功能集合对象。类型为"FeatureCollection“的对象必须有一个名为”功能“的成员。与“功能”对应的值是一个数组。数组中的每个元素都是上面定义的一个功能对象。
功能集合如下所示:
{
"type": "FeatureCollection",
"features": [
// Array of features
]
}http://geojson.org/geojson-spec.html#feature-collection-objects
具有"Feature“类型的GeoJSON对象是一个功能对象。一个功能对象必须有一个名为“几何图形”的成员。几何成员的值是上面定义的几何对象或JSON空值。feature必须有一个名为"properties“的成员。属性成员的值是一个对象(任何JSON对象或JSON空值)。如果一个特性具有一个常用的标识符,则应该将该标识符作为名称为"id“的feature的成员。
一个特性如下所示:
{
"id": "Foo",
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [0, 0]
},
"properties": {
"label": "My Foo"
}
}http://geojson.org/geojson-spec.html#feature-objects
下面是特性可以支持的不同几何对象的示例:http://geojson.org/geojson-spec.html#appendix-a-geometry-examples
把这两者结合起来,看起来会是这样的:
{
"type": "FeatureCollection",
"features": [{
"id": "Foo",
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [0, 0]
},
"properties": {
"label": "My Foo"
}
},{
"id": "Bar",
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[100.0, 0.0],
[101.0, 1.0]
]
},
"properties": {
"label": "My Bar"
}
}]
}这看起来并不像你发布的那个JSON。您需要通过自定义脚本或手动将其转换为适当的GeoJSON。这是我从未见过的一种格式,抱歉地说。
https://stackoverflow.com/questions/32392846
复制相似问题