Problem:
When using cells_for_geo_points with dggs_vert0_lon set to 11.20, the resulting zone IDs are incorrect.
- Get zone centroids and ID using
grid_cell_centroids_for_extent with dggs_vert0_lon == 11.20,
- Using the zone centroids from above as input to
cells_for_geo_points with the same dggs_vert0_lon setting. The result zone IDs are different.
Finding:
It is found that when dggs_vert0_lon is set for the cells_for_geo_points, the meta file output for DGGRID consists of :
dggs_vert0_lon 11.2
dggs_vert0_lat None
dggs_vert0_azimuth None
The extra setting dggs_vert0_lat None causes DGGRID to return incorrect zone IDs. After the dggs_vert0_lat is removed, all zone IDs are identical to the grid_cell_centroids_for_extent result.
After checking, the problem arises in the following code segment:
|
if subset_conf: |
|
for elem, value in subset_conf.items(): |
|
metafile.append(f"{elem} " + str(value)) |
|
|
A quick fix will be to only append the setting with the value != None
A long-term solution is to restructure the code similar to dgapi_grid_gen, but this would take some time.
Problem:
When using
cells_for_geo_pointswithdggs_vert0_lonset to 11.20, the resulting zone IDs are incorrect.grid_cell_centroids_for_extentwithdggs_vert0_lon == 11.20,cells_for_geo_pointswith the samedggs_vert0_lonsetting. The result zone IDs are different.Finding:
It is found that when
dggs_vert0_lonis set for thecells_for_geo_points, the meta file output for DGGRID consists of :The extra setting
dggs_vert0_lat Nonecauses DGGRID to return incorrect zone IDs. After thedggs_vert0_latis removed, all zone IDs are identical to thegrid_cell_centroids_for_extentresult.After checking, the problem arises in the following code segment:
dggrid4py/dggrid4py/dggrid_runner.py
Lines 989 to 992 in dc7bd3a
A quick fix will be to only append the setting with the
value != NoneA long-term solution is to restructure the code similar to
dgapi_grid_gen, but this would take some time.