2017-04-17 6 views
0

Ich habe folgenden GeoJSON Polygone:GeoJSON nicht validiert

{"type": "Feature","geometry":{"type":"MultiPolygon", "coordinates":[[[[103.76772700000001,1.47063],[103.76772700000001,1.4795775862068967],[103.758794,1.4795775862068967],[103.758794,1.47063],[103.76772700000001,1.47063]]]]},"properties": {"number":"01"}}, 

{"type": "Feature","geometry":{"type":"MultiPolygon", "coordinates":[[[[104.00891800000001,1.47063],[104.00891800000001,1.4795775862068967],[103.99998500000001,1.4795775862068967],[103.99998500000001,1.47063],[104.00891800000001,1.47063]]]]},"properties": {"number":"03"}} 

Aber wenn ich diese Validierung in geojson validator wirft es einen EOF Fehler. Aber wenn ich jedes einzeln versuche, validiert es als ein qualifizierter geoJSON. Also habe ich das auch versucht.

"type":"FeatureCollection","features":[ 

{"type": "Feature","geometry":{"type":"MultiPolygon", "coordinates":[[[[103.76772700000001,1.47063],[103.76772700000001,1.4795775862068967],[103.758794,1.4795775862068967],[103.758794,1.47063],[103.76772700000001,1.47063]]]]},"properties": {"number":"01"}}, 

{"type": "Feature","geometry":{"type":"MultiPolygon", "coordinates":[[[[104.00891800000001,1.47063],[104.00891800000001,1.4795775862068967],[103.99998500000001,1.4795775862068967],[103.99998500000001,1.47063],[104.00891800000001,1.47063]]]]},"properties": {"number":"03"}} 

] 

Aber immer noch werfen einen EOF-Fehler. Jede Hilfe wird geschätzt.

+1

seine Arbeits in [http://jsonviewer.stack.hu/] –

+0

Es wird nicht als GeoJSON Validierung sondern qualifiziert sich als ein JSON.I nicht – RKR

+0

Versuch verstehen, könnte die json als [http zu machen://geojsonlint.com/#sample-geojson-content] –

Antwort

1

Es sollte ein JSON-Objekt sein. Sie vermissen die { und }.

{ 
    "type": "FeatureCollection", 
    "features": [ 

     { 
      "type": "Feature", 
      "geometry": { 
       "type": "MultiPolygon", 
       "coordinates": [ 
        [ 
         [ 
          [103.76772700000001, 1.47063], 
          [103.76772700000001, 1.4795775862068967], 
          [103.758794, 1.4795775862068967], 
          [103.758794, 1.47063], 
          [103.76772700000001, 1.47063] 
         ] 
        ] 
       ] 
      }, 
      "properties": { 
       "number": "01" 
      } 
     }, 

     { 
      "type": "Feature", 
      "geometry": { 
       "type": "MultiPolygon", 
       "coordinates": [ 
        [ 
         [ 
          [104.00891800000001, 1.47063], 
          [104.00891800000001, 1.4795775862068967], 
          [103.99998500000001, 1.4795775862068967], 
          [103.99998500000001, 1.47063], 
          [104.00891800000001, 1.47063] 
         ] 
        ] 
       ] 
      }, 
      "properties": { 
       "number": "03" 
      } 
     } 

    ] 
} 
+0

Exakt vielen Dank – RKR