Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate GeoJSON support for non-string property values #627

Open
bradh opened this issue Jun 21, 2019 · 1 comment
Open

Investigate GeoJSON support for non-string property values #627

bradh opened this issue Jun 21, 2019 · 1 comment

Comments

@bradh
Copy link
Collaborator

bradh commented Jun 21, 2019

Normally the properties are simple key:value pairs. However there are cases like:

{
  "features": [
    {
      "bbox": [
        -18.0164,
        12.071,
        -15.9832,
        13.9534
      ],
      "geometry": {
        "coordinates": [
          [
            [
              -18.0164,
              13.9367
            ],
            [
              -17.994,
              12.071
            ],
            [
              -15.9832,
              12.0854
            ],
            [
              -15.9906,
              13.9534
            ],
            [
              -18.0164,
              13.9367
            ]
          ]
        ],
        "type": "Polygon"
      },
      "id": "https://databio.spacebel.be/eo-catalog/resources/LANDSAT.ETM.GTC/datasets/LS07_RMPS_ETM_GTC_1P_20000123T112025_20000123T112054_004119_0205_0051_988B",
      "type": "Feature",
      "properties": {
        "date": "2000-01-23T11:20:25Z/2000-01-23T11:20:54Z",
        "identifier": "LS07_RMPS_ETM_GTC_1P_20000123T112025_20000123T112054_004119_0205_0051_988B",
        "productId": "LS07_RMPS_ETM_GTC_1P_20000123T112025_20000123T112054_004119_0205_0051_988B",
        "parentIdentifier": "LANDSAT.ETM.GTC",
        "productInformation": {
          "referenceSystemIdentifier": "epsg:4326",
          "size": 228527693,
          "qualityInformation": {
            "qualityDegradation": 0
          },
          "cloudCover": 5,
          "processingMode": "NOMINAL",
          "productType": "ETM_GTC_1P",
          "availabilityTime": "2000-01-23T11:20:54Z"
        },
        "links": {
          "data": [
            {
              "href": "http://landsat-ds.eo.esa.int/products/LANDSAT_ETM/2000/01/23/LS07_RMPS_ETM_GTC_1P_20000123T112025_20000123T112054_004119_0205_0051_988B.ZIP",
              "type": "application/x-binary",
              "title": "Download"
            }
          ],
          "previews": [
            {
              "href": "http://landsat-ds.eo.esa.int/metadata/LANDSAT_ETM/2000/01/23/LS07_RMPS_ETM_GTC_1P_20000123T112025_20000123T112054_004119_0205_0051_988B.BP.PNG",
              "type": "image/png",
              "title": "Quicklook"
            }
          ],
          "up": [
            {
              "href": "http://databio.spacebel.be/eo-catalog/resources/LANDSAT.ETM.GTC",
              "type": "application/geo+json",
              "title": "Up"
            }
          ]
        },
        "title": "LS07_RMPS_ETM_GTC_1P_20000123T112025_20000123T112054_004119_0205_0051_988B",
        "updated": "2019-06-06T11:16:52Z",
        "acquisitionInformation": [
          {
            "acquisitionParameters": {
              "operationalMode": "IM",
              "acquisitionSubType": "DEFAULT",
              "acquisitionType": "NOMINAL",
              "beginningDateTime": "2000-01-23T11:20:25Z",
              "wrsLongitudeGrid": "205",
              "wrsLatitudeGrid": "51",
              "endingDateTime": "2000-01-23T11:20:54Z",
              "orbitDirection": "DESCENDING",
              "orbitNumber": 4119
            },
            "instrument": {
              "instrumentShortName": "ETM",
              "sensorType": "OPTICAL"
            },
            "platform": {
              "platformShortName": "Landsat",
              "platformSerialIdentifier": "7"
            }
          }
        ],
        "status": "ARCHIVED"
      }
    },
    {
      "bbox": [
        -17.7034,
        13.5145,
        -15.6583,
        15.3971
      ],
      "geometry": {
        "coordinates": [
          [
            [
              -17.7034,
              15.3816
            ],
            [
              -17.6809,
              13.5145
            ],
            [
              -15.6583,
              13.528
            ],
            [
              -15.6639,
              15.3971
            ],
            [
              -17.7034,
              15.3816
            ]
          ]
        ],
        "type": "Polygon"
      },
      "id": "https://databio.spacebel.be/eo-catalog/resources/LANDSAT.ETM.GTC/datasets/LS07_RMPS_ETM_GTC_1P_20000123T112001_20000123T112030_004119_0205_0050_A02A",
      "type": "Feature",
      "properties": {
        "date": "2000-01-23T11:20:01Z/2000-01-23T11:20:30Z",
        "identifier": "LS07_RMPS_ETM_GTC_1P_20000123T112001_20000123T112030_004119_0205_0050_A02A",
        "productId": "LS07_RMPS_ETM_GTC_1P_20000123T112001_20000123T112030_004119_0205_0050_A02A",
        "parentIdentifier": "LANDSAT.ETM.GTC",
        "productInformation": {
          "referenceSystemIdentifier": "epsg:4326",
          "size": 276799805,
          "qualityInformation": {
            "qualityDegradation": 0
          },
          "cloudCover": 3,
          "processingMode": "NOMINAL",
          "productType": "ETM_GTC_1P",
          "availabilityTime": "2000-01-23T11:20:30Z"
        },
        "links": {
          "data": [
            {
              "href": "http://landsat-ds.eo.esa.int/products/LANDSAT_ETM/2000/01/23/LS07_RMPS_ETM_GTC_1P_20000123T112001_20000123T112030_004119_0205_0050_A02A.ZIP",
              "type": "application/x-binary",
              "title": "Download"
            }
          ],
          "previews": [
            {
              "href": "http://landsat-ds.eo.esa.int/metadata/LANDSAT_ETM/2000/01/23/LS07_RMPS_ETM_GTC_1P_20000123T112001_20000123T112030_004119_0205_0050_A02A.BP.PNG",
              "type": "image/png",
              "title": "Quicklook"
            }
          ],
          "up": [
            {
              "href": "http://databio.spacebel.be/eo-catalog/resources/LANDSAT.ETM.GTC",
              "type": "application/geo+json",
              "title": "Up"
            }
          ]
        },
        "title": "LS07_RMPS_ETM_GTC_1P_20000123T112001_20000123T112030_004119_0205_0050_A02A",
        "updated": "2019-06-06T11:16:52Z",
        "acquisitionInformation": [
          {
            "acquisitionParameters": {
              "operationalMode": "IM",
              "acquisitionSubType": "DEFAULT",
              "acquisitionType": "NOMINAL",
              "beginningDateTime": "2000-01-23T11:20:01Z",
              "wrsLongitudeGrid": "205",
              "wrsLatitudeGrid": "50",
              "endingDateTime": "2000-01-23T11:20:30Z",
              "orbitDirection": "DESCENDING",
              "orbitNumber": 4119
            },
            "instrument": {
              "instrumentShortName": "ETM",
              "sensorType": "OPTICAL"
            },
            "platform": {
              "platformShortName": "Landsat",
              "platformSerialIdentifier": "7"
            }
          }
        ],
        "status": "ARCHIVED"
      }
    },
    {
      "bbox": [
        -13.6641,
        30.7894,
        -11.3324,
        32.6874
      ],
      "geometry": {
        "coordinates": [
          [
            [
              -13.6372,
              32.6874
            ],
            [
              -13.6641,
              30.8325
            ],
            [
              -11.4047,
              30.7894
            ],
            [
              -11.3324,
              32.6411
            ],
            [
              -13.6372,
              32.6874
            ]
          ]
        ],
        "type": "Polygon"
      },
      "id": "https://databio.spacebel.be/eo-catalog/resources/LANDSAT.ETM.GTC/datasets/LS07_RMPS_ETM_GTC_1P_20000123T111514_20000123T111543_004119_0205_0038_EBB6",
      "type": "Feature",
      "properties": {
        "date": "2000-01-23T11:15:14Z/2000-01-23T11:15:43Z",
        "identifier": "LS07_RMPS_ETM_GTC_1P_20000123T111514_20000123T111543_004119_0205_0038_EBB6",
        "productId": "LS07_RMPS_ETM_GTC_1P_20000123T111514_20000123T111543_004119_0205_0038_EBB6",
        "kind": "http://inspire.ec.europa.eu/metadata-codelist/ResourceType/dataset",
        "parentIdentifier": "LANDSAT.ETM.GTC",
        "productInformation": {
          "referenceSystemIdentifier": "epsg:4326",
          "size": 203860692,
          "qualityInformation": {
            "qualityDegradation": 0
          },
          "cloudCover": 8,
          "processingMode": "NOMINAL",
          "productType": "ETM_GTC_1P",
          "availabilityTime": "2000-01-23T11:15:43Z"
        },
        "links": {
          "data": [
            {
              "href": "http://landsat-ds.eo.esa.int/products/LANDSAT_ETM/2000/01/23/LS07_RMPS_ETM_GTC_1P_20000123T111514_20000123T111543_004119_0205_0038_EBB6.ZIP",
              "type": "application/x-binary",
              "title": "Download"
            }
          ],
          "previews": [
            {
              "href": "http://landsat-ds.eo.esa.int/metadata/LANDSAT_ETM/2000/01/23/LS07_RMPS_ETM_GTC_1P_20000123T111514_20000123T111543_004119_0205_0038_EBB6.BP.PNG",
              "type": "image/png",
              "title": "Quicklook"
            }
          ],
          "up": [
            {
              "href": "http://databio.spacebel.be/eo-catalog/resources/LANDSAT.ETM.GTC",
              "type": "application/geo+json",
              "title": "Up"
            }
          ]
        },
        "title": "LS07_RMPS_ETM_GTC_1P_20000123T111514_20000123T111543_004119_0205_0038_EBB6",
        "updated": "2019-06-06T11:04:30Z",
        "acquisitionInformation": [
          {
            "acquisitionParameters": {
              "operationalMode": "IM",
              "acquisitionSubType": "DEFAULT",
              "acquisitionType": "NOMINAL",
              "beginningDateTime": "2000-01-23T11:15:14Z",
              "wrsLongitudeGrid": "205",
              "wrsLatitudeGrid": "38",
              "endingDateTime": "2000-01-23T11:15:43Z",
              "orbitDirection": "DESCENDING",
              "orbitNumber": 4119
            },
            "instrument": {
              "instrumentShortName": "ETM",
              "sensorType": "OPTICAL"
            },
            "platform": {
              "platformShortName": "Landsat",
              "platformSerialIdentifier": "7"
            }
          }
        ],
        "status": "ARCHIVED"
      }
    },
    {
      "bbox": [
        -10.9154,
        40.7871,
        -8.1902,
        42.7197
      ],
      "geometry": {
        "coordinates": [
          [
            [
              -10.9154,
              42.7065
            ],
            [
              -10.8592,
              40.7871
            ],
            [
              -8.21399,
              40.7994
            ],
            [
              -8.1902,
              42.7197
            ],
            [
              -10.9154,
              42.7065
            ]
          ]
        ],
        "type": "Polygon"
      },
      "id": "https://databio.spacebel.be/eo-catalog/resources/LANDSAT.ETM.GTC/datasets/LS07_RNSG_ETM_GTC_1P_20000123T111227_20000123T111256_004119_0205_0031_7FA4",
      "type": "Feature",
      "properties": {
        "date": "2000-01-23T11:12:27Z/2000-01-23T11:12:56Z",
        "identifier": "LS07_RNSG_ETM_GTC_1P_20000123T111227_20000123T111256_004119_0205_0031_7FA4",
        "productId": "LS07_RNSG_ETM_GTC_1P_20000123T111227_20000123T111256_004119_0205_0031_7FA4",
        "parentIdentifier": "LANDSAT.ETM.GTC",
        "productInformation": {
          "referenceSystemIdentifier": "epsg:4326",
          "size": 191350722,
          "qualityInformation": {
            "qualityDegradation": 0
          },
          "cloudCover": 5,
          "processingMode": "NOMINAL",
          "productType": "ETM_GTC_1P",
          "availabilityTime": "2000-01-23T11:12:56Z"
        },
        "links": {
          "data": [
            {
              "href": "http://landsat-ds.eo.esa.int/products/LANDSAT_ETM/2000/01/23/LS07_RNSG_ETM_GTC_1P_20000123T111227_20000123T111256_004119_0205_0031_7FA4.ZIP",
              "type": "application/x-binary",
              "title": "Download"
            }
          ],
          "previews": [
            {
              "href": "http://landsat-ds.eo.esa.int/metadata/LANDSAT_ETM/2000/01/23/LS07_RNSG_ETM_GTC_1P_20000123T111227_20000123T111256_004119_0205_0031_7FA4.BP.PNG",
              "type": "image/png",
              "title": "Quicklook"
            }
          ],
          "up": [
            {
              "href": "http://databio.spacebel.be/eo-catalog/resources/LANDSAT.ETM.GTC",
              "type": "application/geo+json",
              "title": "Up"
            }
          ]
        },
        "title": "LS07_RNSG_ETM_GTC_1P_20000123T111227_20000123T111256_004119_0205_0031_7FA4",
        "updated": "2019-06-06T11:16:52Z",
        "acquisitionInformation": [
          {
            "acquisitionParameters": {
              "operationalMode": "IM",
              "acquisitionSubType": "DEFAULT",
              "acquisitionType": "NOMINAL",
              "beginningDateTime": "2000-01-23T11:12:27Z",
              "wrsLongitudeGrid": "205",
              "wrsLatitudeGrid": "31",
              "endingDateTime": "2000-01-23T11:12:56Z",
              "orbitDirection": "DESCENDING",
              "orbitNumber": 4119
            },
            "instrument": {
              "instrumentShortName": "ETM",
              "sensorType": "OPTICAL"
            },
            "platform": {
              "platformShortName": "Landsat",
              "platformSerialIdentifier": "7"
            }
          }
        ],
        "status": "ARCHIVED"
      }
    },
    {
      "bbox": [
        9.64457,
        25.0497,
        11.8373,
        26.9293
      ],
      "geometry": {
        "coordinates": [
          [
            [
              9.65478,
              26.9293
            ],
            [
              9.64457,
              25.0746
            ],
            [
              11.7932,
              25.0497
            ],
            [
              11.8373,
              26.9023
            ],
            [
              9.65478,
              26.9293
            ]
          ]
        ],
        "type": "Polygon"
      },
      "id": "https://databio.spacebel.be/eo-catalog/resources/LANDSAT.ETM.GTC/datasets/LS07_RFUI_ETM_GTC_1P_20000123T093757_20000123T093826_004118_0189_0042_DB36",
      "type": "Feature",
      "properties": {
        "date": "2000-01-23T09:37:57Z/2000-01-23T09:38:26Z",
        "identifier": "LS07_RFUI_ETM_GTC_1P_20000123T093757_20000123T093826_004118_0189_0042_DB36",
        "productId": "LS07_RFUI_ETM_GTC_1P_20000123T093757_20000123T093826_004118_0189_0042_DB36",
        "parentIdentifier": "LANDSAT.ETM.GTC",
        "productInformation": {
          "referenceSystemIdentifier": "epsg:4326",
          "size": 282895210,
          "qualityInformation": {
            "qualityDegradation": 0
          },
          "cloudCover": 0,
          "processingMode": "NOMINAL",
          "productType": "ETM_GTC_1P",
          "availabilityTime": "2000-01-23T09:38:26Z"
        },
        "links": {
          "data": [
            {
              "href": "http://landsat-ds.eo.esa.int/products/LANDSAT_ETM/2000/01/23/LS07_RFUI_ETM_GTC_1P_20000123T093757_20000123T093826_004118_0189_0042_DB36.ZIP",
              "type": "application/x-binary",
              "title": "Download"
            }
          ],
          "previews": [
            {
              "href": "http://landsat-ds.eo.esa.int/metadata/LANDSAT_ETM/2000/01/23/LS07_RFUI_ETM_GTC_1P_20000123T093757_20000123T093826_004118_0189_0042_DB36.BP.PNG",
              "type": "image/png",
              "title": "Quicklook"
            }
          ],
          "up": [
            {
              "href": "http://databio.spacebel.be/eo-catalog/resources/LANDSAT.ETM.GTC",
              "type": "application/geo+json",
              "title": "Up"
            }
          ]
        },
        "title": "LS07_RFUI_ETM_GTC_1P_20000123T093757_20000123T093826_004118_0189_0042_DB36",
        "updated": "2019-06-06T11:16:52Z",
        "acquisitionInformation": [
          {
            "acquisitionParameters": {
              "operationalMode": "IM",
              "acquisitionSubType": "DEFAULT",
              "acquisitionType": "NOMINAL",
              "beginningDateTime": "2000-01-23T09:37:57Z",
              "wrsLongitudeGrid": "189",
              "wrsLatitudeGrid": "42",
              "endingDateTime": "2000-01-23T09:38:26Z",
              "orbitDirection": "DESCENDING",
              "orbitNumber": 4118
            },
            "instrument": {
              "instrumentShortName": "ETM",
              "sensorType": "OPTICAL"
            },
            "platform": {
              "platformShortName": "Landsat",
              "platformSerialIdentifier": "7"
            }
          }
        ],
        "status": "ARCHIVED"
      }
    }
  ],
  "totalResults": 5,
  "startIndex": "1",
  "itemsPerPage": "10",
  "id": "https://databio.spacebel.be/eo-catalog/resources/LANDSAT.ETM.GTC/datasets",
  "type": "FeatureCollection",
  "queries": {
    "request": [
      {
        "eo:parentIdentifier": "LANDSAT.ETM.GTC",
        "dc:type": "dataset",
        "os:count": "10",
        "os:startIndex": "1"
      }
    ]
  },
  "properties": {
    "creator": "ESA Catalog",
    "rights": "Copyright 2016-2018, European Space Agency",
    "links": {
      "search": [
        {
          "href": "https://databio.spacebel.be/eo-catalog/description",
          "type": "application/opensearchdescription+xml",
          "title": "search"
        }
      ],
      "last": [
        {
          "href": "https://databio.spacebel.be/eo-catalog/resources/LANDSAT.ETM.GTC/datasets?startRecord=1",
          "type": "application/geo+json",
          "title": "last results"
        }
      ],
      "profiles": [
        {
          "href": "http://www.opengis.net/spec/owc-geojson/1.0/req/core"
        }
      ],
      "first": [
        {
          "href": "https://databio.spacebel.be/eo-catalog/resources/LANDSAT.ETM.GTC/datasets?startRecord=1",
          "type": "application/geo+json",
          "title": "first results"
        }
      ]
    },
    "title": "ESA Catalog - Search Response",
    "lang": "en",
    "updated": "2019-06-21T12:53:45Z",
    "authors": [
      {
        "name": "EO Catalog",
        "type": "Agent",
        "email": "[email protected]"
      }
    ]
  }
}

where that doesn't hold.

https://tools.ietf.org/html/rfc7946 suggests nesting is valid.

@wallw-teal
Copy link
Contributor

I'm open to suggestions. Most of our current views assume tabular data (feature list, feature info) and thus flatting the nested structure might help fit into those.

jsalankey added a commit to jsalankey/opensphere that referenced this issue Jul 10, 2019
…nsphere:fix-warning to master

* commit 'd304aba86b4a2de9821bd0cf38c5620cbe7aff0f':
  chore(query): fixes compile warning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants