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.

In Pablo's answer:

Open a GeoJSON file with QGis

He says he 'imported each type at a time'. How do you do that? I am working with a GeoJSON file that has a mixture of points and polygons, but points are first, so it only shows points. How do I get QGIS to show the polygons instead of the points?

Thank you

share|improve this question
add comment

1 Answer

If point features are on one end of the page and polygons in the other, open up your geojson in the Notepad, and then cut-paste the polygons feature to a separate text file.

Initial file:

var initial = [{
"type": "Feature",
"geometry": {
    "type": "Polygon",
    "coordinates": [[
        [-104.05, 48.99],
        [-97.22,  48.98],
        [-96.58,  45.94],
        [-104.03, 45.94],
        [-104.05, 48.99]
    ]]
   }
  }, {
"type": "Point",
"geometry": {
    "type": "Point",
    "coordinates": [-104.99404, 39.75621]
  }
}];

Pulling out the polygon:

var polygon = [{
"type": "Feature",
"geometry": {
    "type": "Polygon",
    "coordinates": [[
        [-104.05, 48.99],
        [-97.22,  48.98],
        [-96.58,  45.94],
        [-104.03, 45.94],
        [-104.05, 48.99]
    ]]
   }
  }];

Afterwards you'd save it as another geojson file and add it.

share|improve this answer
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.