ken iwa
ken iwa

Reputation: 191

How to fill a shapefile with holes

Currently, I am processing spatial data in R. https://rstudio-pubs-static.s3.amazonaws.com/259089_2f5213f21003443994b28aab0a54cfd6.html

I created a time trade area by the method described on the above page. However, the shapefile I created is perforated and incomplete. I want you to tell me how to fill this hole.

https://drive.google.com/file/d/10wJxptWxs59MB9KZVTsrs0biFYN9pOa-/view?usp=sharing

Thank you for your cooperation.

Upvotes: 0

Views: 545

Answers (1)

Vincé
Vincé

Reputation: 126

Hard to say, what's the exact issue here, as the information is not that clear. But looking at the file, you shared screenshot from shapefile in QGIS it seems that this is just a single layer for a a travel time bracket, e.g. 05-20 min travel time. Then it also makes sense that the layer is "Doughnut-shaped". This code produces several separate shapefiles, each for a different travel-time.

Could you share your code, so one could see, how you arrived at your result? Can you share which code you used for setting up the intervals, similar to this:

iso <- osrmIsochrone(loc = c(151.207049, -33.886475), breaks = seq(from = 0,to = 30, by = 5))
class(iso)

If you really just want a single shapefile, without a hole inside, try chainging breaks = seq(from = 0,to = 30, by = 5) to seq(from = 0,to = 30, by = 1) and make sure, it starts with from = 0 , not with something like from = 5.

Upvotes: 1

Related Questions