Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-1818

Transform GeoJSON object to a realm object

      Problem

      I am working with GeoJSON data, here is an example:

      `"outline": {
      "type": "FeatureCollection",
      "features": [
      {
      "type": "Feature",
      "geometry":

      { "type": "Polygon", "coordinates": [ [ [ 2.6581091091385147, 49.44587585244173 ], [ 2.6632589504471085, 49.4464059894905 ], [ 2.6648897335281636, 49.445317807250234 ], [ 2.6633018657913468, 49.443280888399926 ], [ 2.6581091091385147, 49.44587585244173 ] ] ] }

      ,
      "properties":

      { "name": "An example" }

      }
      ]
      }`

      I want to save this data as a realm object of type Outline. I have tried to create an embedded model, i.e, Geometry > Feature > Outline, but the validation of realm schema failed when it came to "coordinates". It seems that realm does not support schema property of array of array of array.

      Solution

      Are there any alternatives to deal with GeoJSON data?

      How important is this improvement for you?

      I'd like to see it, but have a workaround

            Assignee:
            kenneth.geisshirt@mongodb.com Kenneth Geisshirt
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: