Closed kasra-keshavarz closed 9 months ago
This issue is "kind of" taken care of with easymore
version 2.0.0
.
easymore
can output the shapefile attribute as nc file in accordance with the provided file to carry all information, except geometry, from the shapefile in a format that can be appended to the remapped files based on need. This includes strings, names, etc. The order of attributes will be exactly the same as the remapped file with the same order.
In your case, you can just leave out target_shp_ID
. All the fields of the target shapefile will be passed to a file called self.temp_dir+self.case_name+'_attributes.nc'
. This is also helpful in case a user forgets to specify the target_shp_ID
, they can look at the attribute file always.
For now time target_shp_ID
should be always int with unique values. I can add a check for this.
In addition there should be a hash in remapping file, attribute file and remapped file that assure the what files are used for remapping or are the result of remapping.
If values of the
target_shp_ID
column within thetarget_shp
is of type string, then the resultingremapped_var_ID
values areNaN
s.MCVE
The Shapefile looks like the following:
And the
easymore
's setup is as follows:Which runs successfully with:
The version of
easymore
is2.0.0
likely the latest commit of thedevelop_2.0.0
branch.