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

Updated Load location data API #345

Merged
merged 13 commits into from
Jul 9, 2024
Merged

Updated Load location data API #345

merged 13 commits into from
Jul 9, 2024

Conversation

Ahsankkhan
Copy link
Contributor

@Ahsankkhan Ahsankkhan commented Jun 28, 2024

So this PR concerns the dataview part of the application. Small fe adjustments with general and indiviual data separation, loading icon.
The endpoint loadLocationData accepts multiple polygons and returns releevant data like area, potential geothermal area, building areas, closest charging stations etc

Signed-off-by: Muhammad Ahsan Khan <ahsan.m.khan@fau.de>
@Ahsankkhan Ahsankkhan self-assigned this Jun 28, 2024
@Ahsankkhan Ahsankkhan added the backend Issues related to the data, logic, or communication of the application label Jun 28, 2024
@Ahsankkhan Ahsankkhan changed the base branch from main to sprint-release June 28, 2024 18:40
Copy link
Contributor

@Lucas-Nan Lucas-Nan left a comment

Choose a reason for hiding this comment

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

CUrrently this endpoint returns data like this: "{
"HouseFootprints": [
{
"Id": "3812",
"Area": "2.217689143435564E-08",
"Location": "POLYGON ((49.431946953246218 11.256625940236045, 49.432009954658461 11.256873248214511, 49.431941501497064 11.256914382358136, 49.431905241003243 11.25677188911126, 49.431893226226009 11.2567790618382, 49.4318950555903 11.256786732076119, 49.431878672780293 11.25679646294742, 49.431877086148674 11.256790183174523, 49.431876082932469 11.256786275027061, 49.431880818554319 11.256783319952786, 49.431860849460527 11.256704885537891, 49.431874413710325 11.256696680458303, 49.431868309893339 11.256672951845447, 49.431946953246218 11.256625940236045))",
"Distance": "50.69735961488055"
},
{
"Id": "3813",
"Area": "1.6969579519354738E-08",
"Location": "POLYGON ((49.431926679287209 11.257327912618017, 49.431948418064025 11.257417049438994, 49.431967659557493 11.25749586468001, 49.431923257362058 11.25752155036094, 49.431878953115451 11.257546826697787, 49.4318381553653 11.25737874534598, 49.431882459577309 11.257353468876156, 49.431926679287209 11.257327912618017))",
"Distance": "50.69748711360747"
},
{
"Id": "3817",
"Area": "3.2034677133196965E-09",
"Location": "POLYGON ((49.431911387053368 11.257203485315454, 49.431931602290071 11.257287724475477, 49.431898038439108 11.257306597516216, 49.431877910403706 11.257222500341744, 49.431911387053368 11.257203485315454))",
"Distance": "50.69749118221984"
},
{
"Id": "3823",
"Area": "1.820228590077022E-08",
"Location": "POLYGON ((49.431860254172 11.258025144256397, 49.431876857058178 11.258096252146604, 49.431902145079121 11.258081965132964, 49.4319153617136 11.258137607099176, 49.431890160873365 11.258152036024086, 49.431909831382647 11.258227284930832, 49.431844315834894 11.25826537960206, 49.431812044433357 11.2581352068432, 49.431793120660643 11.258146061937845, 49.431792030303356 11.258142011834783, 49.431775450018428 11.25807435338726, 49.431860254172 11.258025144256397))",
"Distance": "50.69758043819686"
},
{
"Id": "3818",
"Area": "8.124970918288454E-09",
"Location": "POLYGON ((49.431951948371982 11.257973216869781, 49.431971857367522 11.258054683710633, 49.43191544289347 11.258087403483561, 49.431912694939136 11.258076104766769, 49.431902145079121 11.258081965132964, 49.431876857058178 11.258096252146604, 49.431860254172 11.258025144256397, 49.431951948371982 11.257973216869781))",
"Distance": "50.697652197480494"
}
],
"EVChargingStations": [
{
"Id": "4162",
"Location": "POINT (7.35566 47.35577)",
"Distance": "47.92363390153652"
},
{
"Id": "4035",
"Location": "POINT (7.35575 47.37334)",
"Distance": "47.94100959322926"
},
{
"Id": "7739",
"Location": "POINT (8.04285 47.33554)",
"Distance": "48.01396446049941"
},
{
"Id": "4050",
"Location": "POINT (7.6599795 47.5512201)",
"Distance": "48.164237966971555"
},
{
"Id": "4051",
"Location": "POINT (7.69093 47.54646)",
"Distance": "48.16447095937524"
}
]
}"

instead it should return a json that corresponds to this datatype(s): "public class LocationDataResponse
{
public List CurrentDatasetData { get; set; } = new List();
public List GeneralData { get; set; } = new List();
}

public class DatasetItem
{
public string Id { get; set; } = string.Empty;

public string Key { get; set; } = string.Empty;
public string Value { get; set; } = string.Empty;
public string MapId { get; set; } = string.Empty; // Optional  -> for "open in map" functionality

}"
as they are already specified in the gateway and used that way in the frontend.

Ahsankkhan and others added 12 commits July 2, 2024 09:06
Signed-off-by: Muhammad Ahsan Khan <ahsan.m.khan@fau.de>
Signed-off-by: Lucas-Nan <166795065+Lucas-Nan@users.noreply.github.com>
Signed-off-by: Lucas-Nan <166795065+Lucas-Nan@users.noreply.github.com>
…der, added meter calculation for area

Signed-off-by: Lucas-Nan <166795065+Lucas-Nan@users.noreply.github.com>
Signed-off-by: Lucas-Nan <166795065+Lucas-Nan@users.noreply.github.com>
Signed-off-by: Lucas-Nan <166795065+Lucas-Nan@users.noreply.github.com>
Signed-off-by: Lucas-Nan <166795065+Lucas-Nan@users.noreply.github.com>
Signed-off-by: Lucas-Nan <166795065+Lucas-Nan@users.noreply.github.com>
Signed-off-by: Lucas-Nan <166795065+Lucas-Nan@users.noreply.github.com>
@Lucas-Nan Lucas-Nan self-requested a review July 9, 2024 15:31
@Corgam Corgam dismissed Lucas-Nan’s stale review July 9, 2024 15:40

Already changed

@Corgam Corgam self-requested a review July 9, 2024 16:09
Copy link
Collaborator

@Corgam Corgam left a comment

Choose a reason for hiding this comment

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

Looks and works amazing! Glad to see this functionality finally working!

@Corgam Corgam merged commit a7abe94 into sprint-release Jul 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Issues related to the data, logic, or communication of the application
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants