Skip to main content

Hi,

I have a dataset that as part of a cleanup I am generalising. It is a vector dataset derived from aerial photography, therefore it has a slightly pixelated look. The point of the generalising is to remove this look and 'smooth' the output.

The problem is that at times the output becomes too generalised. See below where relatively straight lines become quite pronounced.

OneTwo

In this instance, I do not want the lines to change much. But for example below these particular parameters do a great job. Here, with the same parameters as above it has done a great job of removing the pixelated look.

Three

Four

Is there any way to limit the generalisation of the 90 degree angles and allowing the smoothing to take place in other areas?

I think it might be unlikely there is a solution, it may just be a limitation of the generaliser transformer. I have tried all the different smoothing parameters/algorithms and this seems to be the best. I'm currently using the NURBfit (Smooth) with a degree of basis polynomial of between 2 and 4.

 

Thanks for any help.

B

Hey, just had a go at generalizing a perfect polygon. The NURBfit algorithm produced an oval like in your example. this is because its a smoothing algorith, you're most likely after a generalizing algorithm.

See here: http://docs.safe.com/fme/2020.1/html/FME_Desktop_Documentation/FME_Transformers/Transformers/generalizer.htm

 

With the douglas algorithm with tolerance set to 1 (or something else) what does your second example look like?


To expand on @hkingsbury​ 's suggestion, a combination of a generalizing and a smoothing algorithm, e.g a Douglas followed by a NURBfit (so 2 Generalizer transformers in a row), could yield good results. You'll also need to play a bit with the tolerances. For the Douglas I'd start experimenting around half the original pixel size and see what that does.


Thanks @hkingsbury​ and @Hans van der Maarel​, in the end I used the Densifier transformer. This put more structure on the polygon and the edges were much more in check with what they were before.

Thanks for the help.

B


Reply