Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

69 update geodata structure #81

Merged
merged 20 commits into from
Nov 22, 2021
Merged

Conversation

srezacova
Copy link
Collaborator

@srezacova srezacova commented Oct 22, 2021

Description

MapLayer table is updated and is now storing geoMetadata in metadata property and returns it on frontend and its also returning format. You should see metadata on frontend, when you click on info icon.
this branch is parent for: #84

Motivation and Context

How has this been tested?

  • run ./start.sh, ./runinitialload.sh, with Sample country in .env
  • format should be stored in layerGeoData collection
  • geoMeatadata should be stored in metadata in mapLayers collection
  • check staticLayers on frontend, there should be also geoMetadata in metadata and format returned
  • check documentation, there are some parts where geojson is meant as only format to use in app, but I will refactor this in the next task where gpkg format will be used.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked to ensure that there aren't other open Pull Requests for the same update/change.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@srezacova srezacova requested a review from bariela October 22, 2021 14:15
@srezacova srezacova changed the title WIP 69 update geodata structure 69 update geodata structure Oct 26, 2021
@@ -14,13 +14,6 @@
legend:
- type: "colormap"
color: "blue"
metadata:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, these metadata are moved to GeoData.yml because they are about geojson not attributes. Now no metadata are left in MapLayers.yml. Should we show on frontend geoMetadata from GeoData.yml instead of them? Or it doesn't matter for now? Or I can put:
description: "Sample data created just for this purpose. Do not represent the reality in any time."
updateFrequency: "never"
unit: "n/a"
dataRetrievalDescription: "Data was randomly created."

also into MapLayers.yml metadata to have example there.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bariela can you maybe help here? To me some of the metadata are connected with geodata, and some might be connected with map layer

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bariela Hi, can you please check this so we can merge it? Thanks a lot

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
each data/metadata should be only in one place and before returning to frontend, they should all be merged into one object. And yes, only some metadata of are linked with geoData. Did this answer the question?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MartinJurcoGlina @bariela Hi, I refactored this one after consultation with Daniela, now its returning geoMetadata in Maplayers metadata. It is working but I can't see, when I click on info icon the metadata. Sorry I don't have time to fix this, but it should be easy. I will leave it to you. Also function failed in pipeline but I don't know why. I think Daniela had some problem with them too.

featureIds: [{property: "name", values: ["Bratislavský", "Trnavský", "Trenčiansky", "Nitriansky", "Žilinský", "Banskobystrický", "Prešovský", "Košický"]}, { property: "fullname", values: ["Bratislavský kraj", "Trnavský kraj", "Trenčiansky kraj", "Nitriansky kraj", "Žilinský kraj", "Banskobystrický kraj", "Prešovský kraj", "Košický kraj"]}]
attributeIds: []
geometryDataTypes: "regions"
geoMetadata:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be called geoMetadata or metadata here? On frontend I will then return geoMetadata for sure, otherwise these will mess with each other.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metadata, according to the task

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed that.

}));
return { ...layer, layers: sublayers };
}

return {
...layer,
geoJSONUrl: geoJSONUrls[layer.geoReferenceId],
geoDataUrl: geoDataUrls[layer.geoReferenceId],
geoMetadata: geoMetadata[layer.geoReferenceId],
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just return geoMetadata in static layers. Showing them somewhere is not part of this task, correct?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just check that nothing is broken by this in frontend

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks OK on the frontend, just no info icon is shown because we have no mapLayers metadata there.

@MartinJurcoGlina MartinJurcoGlina merged commit 6fad219 into main Nov 22, 2021
@MartinJurcoGlina MartinJurcoGlina deleted the 69-update-geodata-structure branch November 22, 2021 18:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants