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

Include properties in BiG CZ GeoJSON results #1950

Open
kdeloach opened this issue Jun 6, 2017 · 1 comment
Open

Include properties in BiG CZ GeoJSON results #1950

kdeloach opened this issue Jun 6, 2017 · 1 comment

Comments

@kdeloach
Copy link
Contributor

kdeloach commented Jun 6, 2017

Instead of returning a list of results which contain GeoJSON fields, we may to return a GeoJSON collection with properties. This would simplify interactions between the sidebar and map on the frontend by reducing the amount of data transformations needed.

For example, instead of:

{
   "catalog":"cinergi",
   "count":1,
   "results":[
      {
         "id":"edc761d4fe734000ba0ba228867ae9cc",
         "title":"Tropospheric Emission Spectrometer (TES) Data and Information",
         "description":"...",
         "links":[...],
         "created_at":"2017-03-17T17:14:29.817000Z",
         "updated_at":"2017-01-13T23:01:16Z",
         "geom":{
            "type":"Polygon",
            "coordinates":[...]
         }
      }
   ]
}

we could to:

{
   "catalog":"cinergi",
   "count":1,
   "results":[
      {
         "type":"Polygon",
         "coordinates":[...],
         "properties": {
            "id":"edc761d4fe734000ba0ba228867ae9cc",
            "title":"Tropospheric Emission Spectrometer (TES) Data and Information",
            "description":"...",
            "links":[...],
            "created_at":"2017-03-17T17:14:29.817000Z",
            "updated_at":"2017-01-13T23:01:16Z"
         }
      }
   ]
}

We just need to think about how to handle results with unavailable geometries (ex. HydroShare). Something else to consider is replacing the top-level result object with a FeatureCollection. This could work as long as we're able to attach properties for next/prev page URL, number of results, etc.

Ref: 317528a

@rajadain
Copy link
Member

Commenting to subscribe to this thread and get email notifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants