2015-09-04 66 views
1

第一件事情是:this data在適當的GeoJSON格式?正確的GeoJSON格式。地圖可視化


按照definition of GeoJSON data,因爲你可以通過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 website上的例子。

我試圖用名爲mapshaper.org的工具來查看映射表單中數據的初始可視化,但是當我加載它時,什麼也沒有發生。

對我來說,因爲根據他們的網站這是沒有意義的,人們可以簡單地

Drag and drop or select a file to import. 
Shapefile, GeoJSON and TopoJSON files and Zip archives are supported. 

然而,在我的情況下,它不能正常工作。

有沒有人有任何直覺,可能會出錯或建議可以用GeoJSON數據創建可縮放地圖的工具?

回答

1

根據GeoJSON的數據的定義,我有什麼,我認爲這種格式

嘛構成數據,你沒有一個適當的GeoJSON的對象。只要比較一下你與你鏈接的例子。它甚至沒有接近。這就是爲什麼mapshaper不知道如何處理您加載的JSON。

類型爲「FeatureCollection」的GeoJSON對象是要素集合對象。 「FeatureCollection」類型的對象必須具有名稱爲「features」的成員。與「功能」對應的值是一個數組。數組中的每個元素都是上面定義的要素對象。

要素集合是這樣的:

{ 
    "type": "FeatureCollection", 
    "features": [ 
     // Array of features 
    ] 
} 

http://geojson.org/geojson-spec.html#feature-collection-objects

與類型 「功能」 A以GeoJSON對象是特徵對象。要素對象必須具有名稱爲「幾何」的成員。幾何成員的值是上面定義的幾何對象或JSON空值。要素對象必須具有名稱爲「屬性」的成員。屬性成員的值是一個對象(任何JSON對象或JSON空值)。如果某個要素具有常用的標識符,那麼該標識符應作爲名稱爲「id」的要素對象的成員包含在內。

一個特徵是這樣的:

{ 
    "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。這是我以前從未見過的格式,遺憾地說。