Use Counter to number the points, LabelPointReplacer to create the text and PDFStyler to confugure text style (font, size, color)
Use Counter to number the points, LabelPointReplacer to create the text and PDFStyler to confugure text style (font, size, color)
thanks for reply ,but how could i achieve to add a number over the point ,position of numbers . i have found points that intersecting between lines and border of polygon so i would like to show this point on polygon at pdf file and upper each point has specific number that we have already counted .
so i want to show points at pdf file and also number upper each point .
I don't really understand what you are trying to accomplish. But for the most of it, you seem to be in one of the following situations:
In red are the labels centered on the vertices and in blue are the labels offset to the outside of the polygon.
In either way you have some processing to do.
For the red situation, label centered on the vertex:
- use LabelPointReplacer folowed by TextStroker (specify Font Name, style and size), CenterPointReplacer (set to Center Point of Bounding Box)
- use the output from LabelPointReplacer as Base and the output of CenterPointReplacer as Candidate in a NeighborFinder with GroupBy enabled and set to the _count attribute
- send the output from MatchedBase to Offseter set to Polar Coordinates with Distance set to -@Value(_distance) and Polar angle set to _angle
- use the output from Offsetter and the original polygon to create your PDF
For the blue case, labels outside polygon (you have to do some calculation using the typography point size, 0.3528mm, set to the scale you want to output to your PDF):
- use a Bufferer on your polygons set to font size x 0.3528 x scale nominator (you can do a few tests and get a value that fits most of the situations)
- send the output to Generalizer set to Douglas and tolerance font size x 0.3528 x scale nominator + 10%
- sent that to a Chopper set to By Vertex and Max vertices 1
- to counter
- to Label Point Replacer and sent this to PDFStyler
I have also attached a workspace that contains both cases (except the typography point size, you figure that out).
I don't really understand what you are trying to accomplish. But for the most of it, you seem to be in one of the following situations:
In red are the labels centered on the vertices and in blue are the labels offset to the outside of the polygon.
In either way you have some processing to do.
For the red situation, label centered on the vertex:
- use LabelPointReplacer folowed by TextStroker (specify Font Name, style and size), CenterPointReplacer (set to Center Point of Bounding Box)
- use the output from LabelPointReplacer as Base and the output of CenterPointReplacer as Candidate in a NeighborFinder with GroupBy enabled and set to the _count attribute
- send the output from MatchedBase to Offseter set to Polar Coordinates with Distance set to -@Value(_distance) and Polar angle set to _angle
- use the output from Offsetter and the original polygon to create your PDF
For the blue case, labels outside polygon (you have to do some calculation using the typography point size, 0.3528mm, set to the scale you want to output to your PDF):
- use a Bufferer on your polygons set to font size x 0.3528 x scale nominator (you can do a few tests and get a value that fits most of the situations)
- send the output to Generalizer set to Douglas and tolerance font size x 0.3528 x scale nominator + 10%
- sent that to a Chopper set to By Vertex and Max vertices 1
- to counter
- to Label Point Replacer and sent this to PDFStyler
I have also attached a workspace that contains both cases (except the typography point size, you figure that out).
thanks for workspace but it is not compatible with my version because i have version 2018
as shown as image ,i would like to define the point that (intersecting from lines and polygon ) and declare the point and over each point add counting number for intersecting black lines and for intersecting red lines declare also points and add (a,b,c,d,...)depend on amount of points .
i have no problem to get points ,but my problem i want to add numbers or alphabet over geometry of each point then write in pdf file . thanks alot for help
FME 2018
@spiderman You can Use counter transformer for the points output. If you need alpha, then you may need to write small python where you can convert 1 to a , 2 to b ... something like that. Hope I understood your requirement.
@spiderman You can Use counter transformer for the points output. If you need alpha, then you may need to write small python where you can convert 1 to a , 2 to b ... something like that. Hope I understood your requirement.
thanks ,i will try it .
but how i put the numbers above a little bit of each required point .
thanks ,i will try it .
but how i put the numbers above a little bit of each required point .
Add delta x and y to the point. And add label point replacer with text and newly created delta x and y.
For example create new xy attribute add x+0.005 and y+ 0.005 for the existing point. Then use this new point for label point replacer.
Thanks
F. Kemminje