Skip to content

Add empty cell filter into Read_shapefile.m#315

Merged
krober10nd merged 4 commits intoCHLNDDEV:Projectionfrom
alexander0042:patch-1
Jun 1, 2024
Merged

Add empty cell filter into Read_shapefile.m#315
krober10nd merged 4 commits intoCHLNDDEV:Projectionfrom
alexander0042:patch-1

Conversation

@alexander0042
Copy link
Copy Markdown
Contributor

When shapefiles are edited in QGIS, empty indexes can sometimes be created, which crashes the script. This line adds a check to see if there are any empty cells and removes them.

When shapefiles are edited in QGIS, empty indexes can sometimes be created, which crashes the script. This line adds a check to see if there are any empty cells and removes them.
@krober10nd
Copy link
Copy Markdown
Collaborator

Thanks, Alexander! Maybe also add a warning message to be output to the screen too?

@krober10nd
Copy link
Copy Markdown
Collaborator

Please also add the change to the changelog.

@alexander0042
Copy link
Copy Markdown
Contributor Author

Thanks for the quick reply! Added in a warning if applicable and edited the changelog to explain the change. I don't think this is a super common edge case, but it can definitely happen when shapefiles are modified in QGIS, so probably worth having the handling code.

@krober10nd krober10nd merged commit 9653a14 into CHLNDDEV:Projection Jun 1, 2024
@Jiangchao3
Copy link
Copy Markdown
Contributor

Jiangchao3 commented Sep 17, 2024

Hi @alexander0042 and @krober10nd,

I am trying to use the 'window'=20 to smooth the shoreline, but something is wrong like:

image

If I use the default 'window'=5, 6, 7, it works well. when larger than 8, the error occured.

I edited the shoreline in QGIS, I am not sure if the error here is same with what you met previously.

I also test it using the GSHHS_f_L1 shoreline with 'window'=20, no error occured.

I appreciate if you could give some suggestion.

Thanks.

Jiangchao

@krober10nd
Copy link
Copy Markdown
Collaborator

krober10nd commented Sep 18, 2024 via email

@Jiangchao3
Copy link
Copy Markdown
Contributor

thanks @krober10nd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants