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

GEOGRID vs GEOGRIDATA #34

Closed
agrignard opened this issue Oct 30, 2020 · 7 comments
Closed

GEOGRID vs GEOGRIDATA #34

agrignard opened this issue Oct 30, 2020 · 7 comments

Comments

@agrignard
Copy link
Collaborator

agrignard commented Oct 30, 2020

In this table https://cityio.media.mit.edu/api/table/dungeonmaster/

Inside GEOGRID each block has this properties

"properties":{"color":[106,61,154],"height":4,"interactive":"Web"}

and inside GEOGRIDDATA each block has this properties

{"color":[255,255,51],"height":4,"id":0,"interactive":"Web","name":"Residential"}

Do we need to repeat the information in both field? Isn't it redundant? Also the color value are different

@crisjf
Copy link
Collaborator

crisjf commented Oct 30, 2020

It is redundant, but it gives you the option of querying GEOGRID only once because it never changes and just calling GEOGRIDDATA when you detect the table update. Ignore the properties in GEOGRID and use the ones in GEOGRIDDATA. GEOGRID should be used when you need the coordinates of the table (you need them only at init) and to get the type definitions under GEOGRID/properties.

@RELNO
Copy link
Collaborator

RELNO commented Oct 30, 2020

Yes, as @crisjf mentioned the GEOGRID is state "0" of this table (i.e taboola rasa). Later states are GEOGRIDDATA

@agrignard
Copy link
Collaborator Author

OK

And is it necessary to store state 0 properties in GEOGRID? I mean in term of storing size (there was a time we were arguing wether we should use int or float to save space;-) )

Also Instead of writing issue for this kind of question is there an entry point for the meta structure of this json so I can look at it before to post an issue?

@RELNO
Copy link
Collaborator

RELNO commented Oct 30, 2020

And is it necessary to store state 0 properties in GEOGRID?

It's not about storing state 0. GEOGRID is the baseline data for both geometry and meta for each grid cell. This is how we initiate a table with all its data in one place (vs the multi fields we used to have).
GEOGRIDDATA is lighter, as it's only meta without geometry (think= old grid field). This allow iterations in real time with small(ish) overhead.

@crisjf
Copy link
Collaborator

crisjf commented Oct 30, 2020

So as we think about the Handler agent in GAMA, the GEOGRID endpoint should be called on init, and the GEOGRIDDATA endpoint should be used for everything else.

@crisjf
Copy link
Collaborator

crisjf commented Nov 9, 2020

I think we can close this, right?

@RELNO
Copy link
Collaborator

RELNO commented Nov 9, 2020

Closing for now, @agrignard open at will.

@RELNO RELNO closed this as completed Nov 9, 2020
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

3 participants