Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

If I have a GEOJson file, for example a file named test.js with inside the following:

{ "type": "FeatureCollection",
"features": [
{ "type": "Feature",
  "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},
  "properties": {"prop0": "value0"}
  },
{ "type": "Feature",
  "geometry": {
    "type": "LineString",
    "coordinates": [
      [102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]
      ]
    },
  "properties": {
    "prop0": "value0",
    "prop1": 0.0
    }
  },
{ "type": "Feature",
   "geometry": {
     "type": "Polygon",
     "coordinates": [
       [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0],
         [100.0, 1.0], [100.0, 0.0] ]
       ]
   },
   "properties": {
     "prop0": "value0",
     "prop1": {"this": "that"}
     }
   }
 ]
}

how to open it with QGis? I open QGis, press "add vector layer", choose "File" but I am not able to open it. If I choose GEOJson format, my file is not showed in browser window. If I do not specify input type, I get the error: "your file is not valid or recognized data source". How have I to format this file? It seems there a little lack of documentation about this topic...

share|improve this question
add comment

1 Answer

Just Drag'n Drop the file in qgis, be aware that Qgis doesn't support mixed types in the same file (point, line, poly) and it will open only the first type found. In the example bellow with your geojson file, I imported each type at a time. enter image description here

share|improve this answer
    
Nice to know that I have to separate types, thanks! –  caneta Jul 31 '12 at 8:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.