Open szvsw opened 2 years ago
I also confirmed that user data (besides OriginalProjectedOrigin
) is dropped from project-settings.json
when saving an umi file in Umi for Rhino.
However custom user json files in sdl-common
are not dropped - umi.sdl_common["my_data"] = {"template_map: template_map"}
is sufficient to cache data with pyumi since umi.sdl_common
's individual keys are dumped to json files in sdl-common
.
We could use this approach to preserve and merge the geodataframe as well, however I think we should wait to see if the behavior described above is in spec or out of spec (i.e. project.json
not preserving original data)
As per Cody's message here, storing other data in project.json is considered out of spec for UMI, so I believe that means this issue needs to be resolved by changing the Open and Save methods to handle reading/writing data from a file in sdl-common other than project.json if we want the ability to preserve GIS information.
As alluded to in #139 , when you open a project in Umi for Rhino and then save it,
project.json
is mutated, however most of its structure is not preserved. Any previous user data from the original gdf is lost - the data that is preserved in the features table always has this schema:Note that the WWR column names are different from what
add_default_shoebox_settings
expects, and additionally the "advanced" column settings are missing:CoreDepth, PerimeterOffset, Fdist, Envr, RoomWidth, FloorToFloorheight, FloorToFloorStrictTrue, EnergySimulatorName
So -
If you want to update the
TemplateName
column for instance usingpyumi
, you would call:However, the original WWR settings and advanced building settings would all be overwritten, since
add_default_shoebox_settings
would not find the expected column names.For the Wwrs, it would be easy enough to have
add_default_shoebox_settings
map theWwwr<dir>
columns toWindowToWallRatio<dir>
, however I am not sure where the advanced settings are stored (probably need to make calls to the sqlite db?)This is partially just a symptom of a larger issue of Umi for Rhino not preserving the original gdf structure in
project.json
, however the issue would still exist with a project natively created in Rhino.