Closed dhjang03 closed 1 month ago
could u give us steps to regenerate the err?
could u give us steps to regenerate the err?
under this branch clone the matilda
git clone <https or ssh for MT-Updating-Matilda>
and check out to development branch
cd MT-Updating-Matida
git checkout development
back to root folder of the project then run the backend
poetry install
poetry run fastapi dev app/main.py
Submit request via web or postman. I am current using following metadata and option. metadata.csv options.json
If you are using postman
Tried #170, but it fails when processing Trace.
This is not due to the PR. This is a polygon class issue. In trace, the polygons that are generated can be disconnected ( imagine two squares next to each other.) they are both valid outputs. In matlab, the would jointly be counted as a single polygon. Meanwhile in python, they are referred to as multipolygon. (ie: a shape which consists of multiple polygons). This is a fairly common occurrence.
If you encounter a multipolygon, make sure to use multipolgyon.geoms to access individual shapes.
If you encounter a multipolygon, make sure to use multipolgyon.geoms to access individual shapes.
The graph serialiser needs the same fix you did to the CSV and web serializers in your initial Trace PR. Do you have time today to do that?
Not untill 5-6pm. I have classes till 2, and then we have the final presentation meeting. Then I have another meeting. I can have a look at it at around 5.30
@CZLam7 ?
hey I'm working in 15 and I finish at 7
I cn look into after work today
Try to implement the following solution
if good is not None and good.polygon is not None: # make sure that the footprint polygon is not none. (IT CAN BE AND THATS FINE)
boundaries = np.empty((1, 2))
if isinstance(good.polygon, Polygon):
# Extract the boundary coordinates of a single Polygon
x, y = good.polygon.exterior.xy
boundary_coords = np.array([x, y]).T
boundaries = np.concatenate((boundaries, boundary_coords))
elif isinstance(good.polygon, MultiPolygon):
# Extract the boundary coordinates of each Polygon in MultiPolygon
for poly in good.polygon.geoms:
x, y = poly.exterior.xy
boundary_coords = np.array([x, y]).T
boundaries = np.concatenate((boundaries, boundary_coords))
Hey so is it fixed by someone?
Try to implement the following solution
if good is not None and good.polygon is not None: # make sure that the footprint polygon is not none. (IT CAN BE AND THATS FINE) boundaries = np.empty((1, 2)) if isinstance(good.polygon, Polygon): # Extract the boundary coordinates of a single Polygon x, y = good.polygon.exterior.xy boundary_coords = np.array([x, y]).T boundaries = np.concatenate((boundaries, boundary_coords)) elif isinstance(good.polygon, MultiPolygon): # Extract the boundary coordinates of each Polygon in MultiPolygon for poly in good.polygon.geoms: x, y = poly.exterior.xy boundary_coords = np.array([x, y]).T boundaries = np.concatenate((boundaries, boundary_coords))
@ybguzel has this been added and are there still more issue?
Hey so is it fixed by someone?
csv part is fixed
So graph hasnt been solved ?
@dhjang03 when u add the code Yusuf pointed out above, does it solve the issue?
I am just trying this now. Took a while to locate the line that is actually causing the issue
In the backend, after running the instance space and try to save the result I am encountering error message in the postman.
Code calling instance space from the backend
for
save_graphs
, I am getting "MultiPolygon object has no attributeexterior
"for
save_csv
, saving summary from Trace, Pilot, and Pythia fails. I message I got from postman is as below: