You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing you to ask a question about the output geojson and pkl files (SITENAME_output.geojson/pkl).
I'm trying to add a new section of the script where the extracted shorelines are clipped basing on a given polygon, to clean possible incorrect points which are not related to the shoreline.
Thus, I'm using the output geojson, clipping it using a polygon shapefile and I want to load the clipped geojson back to your script.
For the following steps, I would need the clipped output to be read again as a dictionary and as a pkl file, right?
But the exported output.geojson seems to have only the following keys: (['type', 'crs', 'features']), and to be not complete having: (['dates', 'shorelines', 'filename', 'cloud_cover', 'geoaccuracy', 'idx', 'MNDWI_threshold', 'satname']).
What do you suggest?
Thank you in advance
Enrica
The text was updated successfully, but these errors were encountered:
hi @evecchi , I remember there was another issue where someone was loading the geojson in QGIS/Arc, cleaning it up and wanted to continue with the cleaned geometry. I'll flag it as an enhacement. I would suggest that you add a section where you do the follow:
read the output.pkl file and your cleaned .geojson shorelines (named by date?) with gdf = gpd.read_file(filename_geojson)
then in the output dictionary for each date replace the 'shorelines' numpy array with the coordinates of your geojson np.array(gdf.iloc[0].geometry.coords). Make sure that the index is matching with the right date. Then you can save output.pkl again and continue with the notebook.
While writing this I'm realising that it may be much easier to bring in your polygon shapefile with geopandas and then clip all the shoreline points based on the polygon. Have a go at either option and let me know if you need help, should be feasible. Also make sure that the coordinate system is not altered when going in and out of QGIS/Arc.
Hi @kvos,
I'm writing you to ask a question about the output geojson and pkl files (SITENAME_output.geojson/pkl).
I'm trying to add a new section of the script where the extracted shorelines are clipped basing on a given polygon, to clean possible incorrect points which are not related to the shoreline.
Thus, I'm using the output geojson, clipping it using a polygon shapefile and I want to load the clipped geojson back to your script.
For the following steps, I would need the clipped output to be read again as a dictionary and as a pkl file, right?
But the exported output.geojson seems to have only the following keys: (['type', 'crs', 'features']), and to be not complete having: (['dates', 'shorelines', 'filename', 'cloud_cover', 'geoaccuracy', 'idx', 'MNDWI_threshold', 'satname']).
What do you suggest?
Thank you in advance
Enrica
The text was updated successfully, but these errors were encountered: