Hi everyone, Thanks for your thoughts on this - some ingenious ideas there!
On this occasion I'm going to admit defeat and digitise them - I don't think there are too many of them, so I suspect it would take longer to get a script right to do it! However, thanks again. No prizes, I'm afraid... Cheers, Roland. On 03/02/07, Jeff Konnen <[EMAIL PROTECTED]> wrote:
Hi, this is really a good problem ... I would try something like this: try a centerlinereplacer to get a line through the longest axis of the building. The quality of the result should depend on the complexity of your buildings. If this line is not really straight, you can generalize it to make a 2 vertex line out of it. Finally calculate the length of this line. Then you should know the length of the other side of the rectangle, there are more than one approach. The first one is the easiest one, but not necessarily the most reliable one: Divide the surface area through the length of your newly created centerline. With this new Value you can set up a squared buffer on your centerline to get a perfect rectangle ... What do you think about this? Greetings from Switzerland, Jeff On 2/2/07, Roland Martin < [EMAIL PROTECTED]> wrote: > > Hi everyone, > > This is a bit of a tricky one... > > I need to convert some buildings (9-10 vertices apiece) to perfect > rectangles (in FME terms, 5 vertices), with 90 degree (or as near as makes > no odds) corners. I will then need to extract the vertices, but that I can > do... Any ideas? > > Unfortunately all the corners on the buildings are pretty much 90 > degrees, so all the simplifying procedures seem to be fairly indiscriminate > about which vertices to remove. I'm not overly familiar with what the > different tools (AreaGeneralizer; AreaSmoother; etc.) do, and what affect > the specific settings have, so I may have missed something here... > > Alternatively I'm going down the traditional FME "lateral thinking" > route, and contemplating the following: > - Run house through CentreLineReplacer > - Duplicate centreline, and rotate by 180 degrees or some such > > Trouble is, if the building isn't exactly square I don't think this will > work. > > Or... maybe do something with a BoundingBoxReplacer? Except they don't > all face North! > > The obvious question is where the rectangle should fall - fully inside > the building; fully outside; or somewhere inbetween? Probably ideally > somewhere inbetween... Most of the buildings have three straight edges and > one with indentations, but some of them are more complex shapes. > > Maybe I should pack it all in, and digitise them instead!!! > > Does anyone have any bright ideas? Any help would be gratefully > received! > > Cheers, > Roland. >
