I have a project where I load in different WMS layers. These layer consist of different colours that represent roofs, lawns, trees, roads,...
Users are able to draw polygons of the contours of their houses, lawns, driveways,... But is there a way to generate an approximation of these polygons using OpenLayers or maybe another Javascript image processing library?
I have done some research but I couldn't find anywhere if there is even the possibility of achieving this.
In the image below you see that the red represents roofs, gray stands for roads and green is lawn or bushes.
application/json
orapplication/vnd.ogc.gml
you could get the geometry with a GetFeatureInfo request as in codesandbox.io/s/getfeatureinfo-image-forked-y97h8 (useol/format/WMSGetFeatureInfo
forapplication/vnd.ogc.gml
). You might also be a able to obtain data via a WFS request if the server supports that.