andrew-plowright / TileManager

Create and detect tiling schemes for raster datasets
3 stars 0 forks source link

Tile has more than four diagonal neighbours #1

Open spono opened 3 years ago

spono commented 3 years ago

Hi, I'm working on a pretty basic land cover classification procedure for aerial RGB imagery and it seems that your package comes in help. The provided tiles are appr. 3.5x3.1 km in size with buffer included. Unfortunately tileDetector returns this error. Any idea where to check for the issue?

> file.list = list.files( img.folder, pattern = "\\.tif$", full.names = TRUE)
> ts = tileDetector(file.list)
Error in FUN(X[[i]], ...) : Tile 3 has more than four diagonal neighbours
andrew-plowright commented 3 years ago

Yeah tileDetector is pretty shaky. Any chance I could take a look at the data to debug? (You can replace the raster values if it's confidential, I just need the raster extents and resolutions)

spono commented 3 years ago

great, thanks. I had to aggregate resolution from 0.20 cm to 1 m but it shouldn't be an issue for the aim.

andrew-plowright commented 3 years ago

Thanks for sending those along. Unfortunately, tileDetector isn't flexible enough to detect irregularly placed tiles like these. As you can see in this plot, although they loosely form a grid, their actual placement and their degree of overlap isn't consistent.

image

spono commented 3 years ago

mmm, weird...I didn't realise it was THAT irregular...BTW, thanks for checking: I'll dig a bit more!