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
When I use GeometryOps.polygonize() on a raster the resulting polygons do not have the same coordinates as the input raster although the same CRS is attached to the resulting polygon. This is an example with lon/lat to show effect.
using GLMakie, ArchGDAL
using Rasters, GeometryOps, GeoFormatTypes, GeoInterface
lon, lat = X(120:1:150), Y(-40:-1:-60) # Example used for clear difference from polygonize() output
ras = Raster(rand(lon, lat); crs=GeoFormatTypes.EPSG(4326))
plot(ras)
plot(ras .< 0.3)
polygons = GeometryOps.polygonize(x-> x.<0.3, ras[:, end:-1:1]) # Flip reverseordered Y
poly(polygons)
GeoInterface.coordinates(polygons)