Hi Thom, Glad to hear it is working. That precision can be a strange beast.
I guess other users might like to see the workspace solution, so if you can send a copy to me 'off-group' I'll post it to the example workspace page on fmepedia. Thanks Mark --- In [email protected], "Thom DeCarlo" <[EMAIL PROTECTED]> wrote: > > Hey Mark, > Very interesting... The CoordinateRounder did the trick. Rounding to > the nearest 0.0001 meters (transformer parameters = 4) was sufficient > to make the SpatialRelator work with a "TOUCHES" test. > > Thanks for all the help! > Thom > > (I was going to send along a sample workspace that shows the problem > and solution, but it is probably not needed at this point.) > > > --- In [email protected], "mark2atsafe" <mark.ireland@> wrote: > > > > Hi Thom, > > I'm sure this isn't a limitation; the SpatialRelator should handle > > points and lines easily enough. However, it is incredibly complex - or > > so it seems to me - plus there may be other factors at work. Possible > > issues are... > > > > 1) Precision problem. > > Route the points and lines into the Visualizer. Ensure the precision > > display is set to its fullest (view > options > display full > > precision) and compare the points to the line end points. > > If there are differences this is where the problem lies. > > > > Why would this happen? Well there are issues caused by a limit on > > precision (ie it isn't infinite) and by FME converting from integer to > > floating point and vice versa. If it doesn't make much sense don't > > worry - a lot of it goes way over my head too. Simply add a > > CoordinateRounder to your workspace and it would usually fix the issue. > > > > 2) Predicate problem. > > Do you know what a Dimensionally Extended 9 Intersection Matrix is? Me > > neither. But if you look up the SpatialFilterFactory in the FME > > Functions, Factories and Transformers manual (part of FME help) then > > it may help to explain. > > > > To test a point on a line you would be testing the point INTERIOR > > against the line EXTERIOR. That means the upper right square in the > > matrix needs to be true to get a match. The CROSSES predicate has this > > test, but also requires the top left square to be true, which probably > > doesn't work for you. > > > > Basically you need to check what you are exactly testing, and if no > > default predicate uses those tests you can create your own. > > This would also help to explain why the predicates work using an area > > feature as the candidate. > > > > > > If neither of these help, or you just think that something is going > > plain wrong, then feel free to send the workspace, with a small sample > > of data that demonstrates the problem, to support@ > > > > Oh - and don't read this email more than twice, or you'll get a fairly > > severe headache just thinking about it all. The help docs have pretty > > diagrams that explain the predicate matrix much better! > > > > Mark > > > > > > --- In [email protected], "Thom DeCarlo" <t.r.decarlo@> wrote: > > > > > > Ok, I think I've got it. The problem I was having with the > > > SpatialRelator transformer was that it does not seem to be able to > > > compare points to lines. > > > > > > To solve the problem I applied the Bufferer transformer to my lines > > > and used the generated areas as the candidate features in my > > > SpatialRelator. I also changed the test parameter to WITHIN (i.e., "Is > > > the BASE within S ground units of the CANDIDATE line segment?"). By > > > this method I was able to create the relationships that I expected. > > > > > > Is this a known limitation of the SpatialRelator? > > > > > > Thom > > > > > > --- In [email protected], "Thom DeCarlo" <t.r.decarlo@> wrote: > > > > > > > > I'm real close now, but I can't seem to make the SpatialRelator work > > > > properly. I'm using the input line segments to generate the 2D > points > > > > via the CoordinateFetcher and 2DPointReplacer. I eliminate duplicate > > > > nodes with the Matcher and then use the remaining points as the Base > > > > for the SpatialRelator and the original lines as the Candidates. > But, > > > > regardless of which test I perform (touches, contains, intersects, > > > > etc) I always get 0 related candidates. Am I using this thing > > > > incorrectly? (I can provide the data and workspace if that would > > help.) > > > > > > > > Thanks! > > > > Thom > > > > > > > > --- In [email protected], "mark2atsafe" <mark.ireland@> wrote: > > > > > > > > > > That's exactly what I wrote in the update request: "the geometry > > > > > already matches the required network, and all overlaps are > genuine" > > > > > > > > > > To create end nodes you can either use the Chopper or - a better > > > > > solution I think - grab the coords with the CoordinateFetcher and > > > > > write them with the 2DPointReplacer. > > > > > > > > > > I'll let you know the response to the update request. Obviously > > if you > > > > > can come up with a compelling business case there is more chance > > of it > > > > > being implemented. Anyone else in the group need this function? > > > > > > > > > > Mark > > > > > > > > > > --- In [email protected], "Thom DeCarlo" <t.r.decarlo@> wrote: > > > > > > > > > > > > I think the problem is that the TopologyBuilder is smarter than > > > i need > > > > > > it to be. My line network is already "clean" in that the lines > > > connect > > > > > > and their endpoints are the only things I want to calculate > upon. > > > > > > > > > > > > I'm not certain, but it *looks* like I can use the > > > > > > SpatialRelationshipFactory to build the topology. If I can > create > > > > > > seperate node features for each line endpoint, I can pass the > > nodes > > > > > > and lines through seperate counters to provide unique ids and > > > then use > > > > > > the node as the base and the line as the candidate for the > > > > > > SpatialRelator. > > > > > > > > > > > > Is there a factory that will generate nodes from the > endpoints of > > > > lines? > > > > > > > > > > > > But, it might take two passes through the SpatialRelator, > > > because the > > > > > > nodes must know what lines they touch and the lines must > know what > > > > > > nodes they touch. > > > > > > > > > > > > Thanks! > > > > > > Thom > > > > > > > > > > > > --- In [email protected], "mark2atsafe" <mark.ireland@> wrote: > > > > > > > > > > > > > > Bah! You can tell that first glance was the only one I took! > > > > > > > > > > > > > > In that case I don't believe there is anything you can do; > > the two > > > > > > > functions appear to be mutually exclusive. Of course you could > > > > always > > > > > > > number the nodes manually and then apply the values to the > > lines. > > > > > > > Wouldn't be too hard to do. > > > > > > > > > > > > > > In the meantime I can file a request to implement such > > > > functionality. > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > > > Mark > > > > > > > > > > > > > > > > > > > > > --- In [email protected], "Thom DeCarlo" <t.r.decarlo@> > wrote: > > > > > > > > > > > > > > > > Hey Mark, > > > > > > > > At first glance the results looked good. The lines crossed > > > without > > > > > > > > producing nodes at the intersections while the endpoints > > > generated > > > > > > > nodes. > > > > > > > > > > > > > > > > However, the connectivity is now broken. All of the > lines say > > > > > that the > > > > > > > > "_from_node" is 1 and the "_to_node" is 2. Is there > something > > > > else I > > > > > > > > can do to generate the complete endpoint connectivity > > structure? > > > > > > > > > > > > > > > > Thanks! > > > > > > > > Thom > > > > > > > > > > > > > > > > --- In [email protected], "mark2atsafe" <mark.ireland@> > > wrote: > > > > > > > > > > > > > > > > > > Hi Thom, > > > > > > > > > I think you can do what you want quite easily. > > > > > > > > > > > > > > > > > > Run all of your line features through a Counter to give > > them a > > > > > > unique > > > > > > > > > ID (unless they have one already). > > > > > > > > > > > > > > > > > > Then set the TopologyBuilder group-by to use the > unique ID. > > > > > > > > > > > > > > > > > > Doing this will exclude overlapping lines from the node > > > > > generation; > > > > > > > > > overlaps would only get noded where their IDs are the > same. > > > > > However, > > > > > > > > > nodes are still created where end-points meet. > > > > > > > > > > > > > > > > > > Hope this helps, > > > > > > > > > > > > > > > > > > Mark > > > > > > > > > > > > > > > > > > Mark Ireland, Product Support Engineer > > > > > > > > > Safe Software Inc. Surrey, BC, CANADA > > > > > > > > > support@ http://www.safe.com > > > > > > > > > Solutions for Spatial Data Translation, Distribution and > > > Access > > > > > > > > > > > > > > > > > > > > > > > > > > > --- In [email protected], "Thom DeCarlo" <t.r.decarlo@> > > > wrote: > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > Now that I've finally gotten my line network mostly > > cleaned > > > > > up I'm > > > > > > > > > > trying to figure out how to work with the > TopologyBuilder. > > > > > > Right off > > > > > > > > > > the bat the first problem I'm having is that I only > > want to > > > > > > generate > > > > > > > > > > nodes where line endpoints touch either other > endpoints or > > > > other > > > > > > > > > > lines. I *don't* want to generate nodes where lines > cross > > > > > lines. > > > > > > > > > > > > > > > > > > > > Is there any way to do this with the TopologyBuilder? > > Or is > > > > > there > > > > > > > > > > another factory that can do this? I don't see anything > > > in the > > > > > > > > > > documentation to help me here. > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > Thom > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Get the maximum benefit from your FME, FME Objects, or SpatialDirect via our Professional Services team. Visit www.safe.com/services for details. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/fme/ <*> 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/
