Hi All,

Seeking advice here...

The GeoJSON spec supports nested json within properties, see example #2 @
https://www.rfc-editor.org/rfc/rfc7946#section-1.5

It would appear that QGIS 3.16 is unable to load this as layers. I'm highly
skeptical about how much support there is for nested JSON not just in QGIS
but from all GIS technologies.

I'd really appreciate any words of wisdom on how best to deal with this.

Maybe things like:

   - Do it, it has enough support
   - Don't do this, nobody likes it ( gdal/ogr2ogr, postgres, esri e.t.c...)
   - Flatten the json (i.e. stringify) only when needed so no data is
   destroyed


Thank you

p.s. Here's an example if you wish to reproduce it, save locally as
*.geojson and drop it in qgis and it will not load. Remove the red nested
object and all will be fine.

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [
            153,
            -27
          ],
          [
            152.9,
            -27.1
          ]
        ]
      },
      "properties": {
        "flatProperty": "works fine",


*        "nestedObject : {          "withinQGIS316" : "FAIL TO LOAD AS A
LAYER in v 3.16"        }*
      }
    }
  ]
}
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to