-
Notifications
You must be signed in to change notification settings - Fork 2
Description
@vaap1997 we are working on a standard format that any reader/writer of a grid can use.
The specification is here
https://github.com/CityScope/CS_CityIO_Backend/wiki/Data-Format
and you can find an example of a table that is compatible with this here:
https://cityio.media.mit.edu/api/table/virtual_table
it would be great if this file https://github.com/CityScope/CSL_Lima/blob/master/projects/LegoReader/data/grid.json is following the patterns.
You are not that far actually what is missing is
-
the header
https://github.com/CityScope/CS_CityIO_Backend/wiki/Data-Format#header-dictionary -
the meta (ideally you shouldn't worry to much as later it will be filled by the cityIO server)
https://github.com/CityScope/CS_CityIO_Backend/wiki/Data-Format#meta -
the grid information is here https://github.com/CityScope/CS_CityIO_Backend/wiki/Data-Format#grid2d-list
you just need to store the grid value in this format for each cell you just have to send the rot and the id (the color pattern is not usefull in this case). and then for the grid the format is slightly different (we don't store anymore the x and y we just store all the cell as a list where the first element of the grid is cell 0,0, the second cell 0,1 etc..
So in your case we will have
"block":["type","rotation"]
and a list of cell value with the id and the rotation
e.g [180,1],[90,1],[270,3], etc