Skip to main content

I have a point dataset representing the locations of streetlights. I want to replace each point with a small line drawing that symbolizes a streetlight. This symbol is stored as a set of line geometries and can stay line geometry.

I suspect I may not be using the correct approach, but here’s what I’ve tried so far:

I used a GeometryExtractor to extract the line geometry of the symbol, and a GeometryReplacer to apply that geometry to each point. This almost works — however, instead of placing the symbol at the location of each point, the points are being moved to the location of the symbol. As a result, I end up with over 4000 symbols stacked on top of each other at the original symbol location.

I’ve included an image of my workspace to illustrate the issue.

 

Hi ​@wrijs 

I am curious to see if this method would work. I would think we would need to treat the symbol, which i assume is a collection of lines, made from x,y points, as a ‘package’ in which all the points making the lines would have to have their coords updated. So not just updating one point on the set of geometry but the all the points that make up the geometry.

That said, I think you could turn the street light symbol collection of lines into a raster which could then be treated as the point.

Another more flexible option might be to use the MapnikRasterizer. This very powerful at setting up visualizations for geometry with symbolization.

Hope that helps!


Hi ​@wrijs ,

If I understand your requirement correctly, the workflow shown in the screenshot below might help you. Assuming that the origin coordinate of the symbol geometry (MultiLine) is (0, 0). 

 


Hi ​@wrijs ,

I finally understand how your workflow works.

  • Sorter : Sort the input features to put the symbol feature (aggregated lines) the first.
  • AttributeCreator_6 : Propagate "_geometry" from the symbol feature to subsequent every point feature, leveraging the Enable Adjacent Feature Attributes option.
  • Tester_4 : Keep only point features.

Doesn’t it?

 

If you would modify your workflow above to achive the goal, try adding:

  • CoordinateExtractor before the GeometryReplecer to extract coordinate of each point
  • Offsetter after the GeometryReplacer to move the symbol geometry to the location of the point coordinate.

Hi ​@takashi,

I have now tried your first suggestion and this works. And you are right about how my workflow works.

As your first workflow has less transformers I am going to use that one in my workspace. 

 

Thank you


Reply