My first guess is possibly because of what the Densifier is doing... Look at http://www.fmepedia.com/index.php/Sandbox
Imagine image 1 shows a coordinate grid, zoomed right in to your maximum precision. Each grid might be 1m, might be 0.0000000001m; the point is that is as small as you can go, so any point has to be on the grid and not in-between. In image 2 there is a simple 2 point line. You run a densifier to place a point mid-way along the line. Image 3 shows what happens. The mid point is actually in-between the grid - to depict it in the exact position would take more precision than is possible. So the point is shifted to the nearest grid point, causing a kink in the line. Now run the generalizer. The point isn't removed when tol=0 because the line isn't truly straight. I know it looks like a bug, but it's more a problem of coordinate geometry limitations. So, two suggestions as to how to prove and fix the issue. 1) Set tolerance not to zero exactly, but to 0.000001 - small enough not to make big changes, but large enough to catch cases like this. 2) Try a CoordinateRounder - seems it ought to help, I'm just not convinced if it will. If either (or both) of these remove the unnecessary vertices then I think that proves the issue - though of course you could get out a calculator and calculate the mid point to see if there is a discrepancy with the densifier output. Another proof would be if horizontal and vertical lines don't exhibit this problem (only lines at an angle would). If none of this works then ignore everything I've said (put it down to the ramblings of a warped mind) and send it to [EMAIL PROTECTED] so we can look at the data directly. Regards, Mark --- In [email protected], "jamison_leach" <[EMAIL PROTECTED]> wrote: > > Good afternoon, > > In order to test the LineGeneralizer's results (using the Douglas > algorithm and a zero tolerance), I first used the Densify transformer > to add vertices to my lines. These densified lines were then processed > by the LineGeneralizer, and I hoped all the vertices added by Densify > would be removed. However, LineGeneralizer appears to only remove some > of the added (unnecessary) vertices. I haven't yet figured out why > this is. > > Regards, > JD > > --- In [email protected], "mark2atsafe" <mark.ireland@> wrote: > > > > I think the LineGeneralizer will do what you need if you use the > > Douglas(-Poiker) algorithm and set the tolerance to zero. When the > > tolerance is zero it should just remove intermediate points on a > > straight line, without changing the shape of the feature. > > > > Regards, > > > > Mark > > > > > > --- In [email protected], "jamison_leach" <hemsidan@> wrote: > > > > > > Good afternoon, > > > > > > Does anyone know if there is there a way to remove unnecessary > > > vertices from lines? By unnecessary, I mean vertices that contribute > > > nothing to the shape of the line. If we were to compute an angle at > > > such vertices, it would be 180 degrees. Using the Generalizer > > > transformer would eliminate non-redundant vertices and change the > > > shape of my lines, which is undesirable, even if the shape would > > > change only slightly. > > > > > > Many thanks, > > > J.D. Leach > > > U.S. Census Bureau > > > > > > For insights into what's up at Safe Software and what's on the development horizon, visit Safe's blog at spatial-etl.blogspot.com. Safe Software has also made slides available that outline enhancements planned for FME 2007. The slides are from the "Road Ahead" presentation given on Day 2 of the FME Worldwide Users Conference. To view these slides, visit www.safe.com/2006uc. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/fme/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/fme/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
