8

I want to create a GeoJSON that contains multiple geometries to be used in QGis later on. Now I red through the specs here: http://geojson.org/geojson-spec.html#geometrycollection

When I simply copy and paste the GeometryCollection example into a file and add it to QGis nothing shows up.

Am I doing something wrong or is it a QGis Bug?

underdark
  • 84,148
  • 21
  • 231
  • 413
Yojimbo
  • 393
  • 3
  • 12
  • You cannot mix different geometry types in a QGIS layer (GeometryCollections = collection of different Geometries). In the case of the example, there are 2 layers: a Point layer and a LineString layer – gene Jul 26 '15 at 11:13
  • would be totally fine if QGis recognices them as two layers.. Is there a way to do so? – Yojimbo Jul 26 '15 at 11:17
  • yes, with Python in the console – gene Jul 26 '15 at 11:19
  • related http://gis.stackexchange.com/questions/30427/open-a-geojson-file-with-qgis?rq=1 – underdark Jul 26 '15 at 11:26
  • Well thinking this way I can also create multiple GeoJSON files instead of a geometry collection. I just thought it is more elegant to use geometry collections instead. – Yojimbo Jul 26 '15 at 11:26
  • FeatureCollections work. Not sure about GeometryCollections. – underdark Jul 26 '15 at 11:32
  • Great! I'll just use featureCollections instead then. – Yojimbo Jul 26 '15 at 11:39
  • A featureCollections is a simple list of geometries. It is different from a GeometryCollection (= a geometry) – gene Jul 26 '15 at 12:20

0 Answers0