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

extendable land unit area concept. #56

Open
leitchy opened this issue Jun 15, 2020 · 7 comments
Open

extendable land unit area concept. #56

leitchy opened this issue Jun 15, 2020 · 7 comments
Assignees
Labels
Bug Something isn't working. Doc Adding or updating documentation. Enhancement New feature request or improvement or optimization. P1 Needs immediate attention.

Comments

@leitchy
Copy link
Collaborator

leitchy commented Jun 15, 2020

Is your feature request related to a problem? Please describe.
Currently the system calculates the Land UNit area using a method on the provider (area)

inline double ProviderSpatialRasterTiled::area(const CellIdx& cell) const {
   auto lat = _indexer->getLatFromIndex(cell);
   auto x = _indexer->cellDesc.latSize * DiameterOfEarthInMetersPerDeg;
   return x * x * cos(lat * DegToRadMultiplier) * 0.0001;
}

This can be overridden by having a variable called landUnitArea.

_landUnitController.initialiseData(true);
_spatiallocationinfo->_landUnitArea = _provider->area(cell);
_landUnitController.getVariable("landUnitArea")->set_value(_spatiallocationinfo->_landUnitArea);

This is clumsy and obscure.

Describe the solution you'd like

This should be definable in the system settings, in a similar fashion to Localdomain - simulateLandUnit. But perhaps in the Landscape object. Allowing the user to dwefine a variable that is the Area to use.

This way the variable can be used as a transform for eaxample. Either doing a SQL query or spatial layer lookup. Or just a differnt method to calculate the area.

Perhaps like: landUnitAreaVariable below:

{
	"LocalDomain": {
		"type": "spatial_tiled",
		"start_date": "2000/01/01",
		"end_date": "2020/12/31",
		"sequencer_library": "internal.flint",
		"sequencer": "CalendarAndEventFlintDataSequencer",
		"simulateLandUnit": "simulateLandUnit",
		"landUnitBuildSuccess": "landUnitBuildSuccess",
		"landUnitAreaVariable": "spatial_layer_area",
               ...
@leitchy leitchy added the Enhancement New feature request or improvement or optimization. label Jun 15, 2020
@Patamap Patamap added P1 Needs immediate attention. Good for newcomers labels Jun 23, 2020
@Patamap Patamap added Good First Issue These issues require minimal context and are well-suited for new contributors. and removed Good for newcomers labels Oct 5, 2020
@kartikeysaran
Copy link

Can i work on this issue ?

@gmajan
Copy link
Member

gmajan commented Mar 1, 2021

Of course. That would be great.
You can join our Slack to connect with other developers.

@kartikeysaran
Copy link

@gmajan I have filled a PR #84 Can you please review it !

@mavneeK
Copy link
Contributor

mavneeK commented Apr 20, 2021

Hi @gmajan @leitchy! Can I work on this issue?

@kartikeysaran
Copy link

Hi @gmajan @leitchy! Can I work on this issue?

Hey @mavneeK , I am already working on this you can work on other issues 😉

@vidhya001
Copy link
Contributor

I am an Outreachy applicant .I found this issue interesting and I discussed with @kartikeysaran who is working on it. Can You assign this issue I would like to contribute to it
@leitchy @gmajan

@gmajan
Copy link
Member

gmajan commented Apr 25, 2021

@aornugent

@aornugent aornugent added Doc Adding or updating documentation. Bug Something isn't working. and removed Good First Issue These issues require minimal context and are well-suited for new contributors. labels Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working. Doc Adding or updating documentation. Enhancement New feature request or improvement or optimization. P1 Needs immediate attention.
Projects
None yet
Development

No branches or pull requests

8 participants