Skip to main content

Hi, 

I have a set of polygons (representing the street blocks) from which I was able to create centroids. I would like to create a grid from those points, meaning that points would represent grid intersections. Have already tried with triangulation but had no success.

imageIf it is helpful I can try and upload a sample. I would really appreciate any suggestion. Thank you.

 

Edit:

I believe I need to explain a bit more. In the current approach I am creating a "grid" based on the street centerlines and merge them with Neighbourhood Aggregator to 800x800m cells. The problem is that at the end grid borders are always on the centerlines (one side of the street is in one cell, where the other side of the street is in neighbouring cell).

currentI would like to now try a different approach, where the grid borders would connect centroids of those blocks, this for example would be the output (red lines). image2newIdeally, they would have a more rectangular shape, but not exclusively, it could also contain squares and triangles. In the end I would still merge them with the Neighbourhood Aggregator to 800x800m cells.

 

Perhaps a solution is in a different approach, cause in the end I would not like to have the grid borders on the centerlines. Perhaps there is just a way to shift borders for a few meters.

Could you try and sketch what kind of grid you would want to get out of it? Should it be a regular grid? Squares/rectangles or triangles?


Maybe use the anchorsnapper transformer using points as anchor and polygon as candidate--perhaps segment snapping?


@mvosner​  Uploading a sample, your current workspace and also a sketch of what you'd like the output to look like would help the community come up with some ideas for a solution.


Could you try and sketch what kind of grid you would want to get out of it? Should it be a regular grid? Squares/rectangles or triangles?

Thank you for the suggestion, hope it is more clear now :)


@mvosner​  Uploading a sample, your current workspace and also a sketch of what you'd like the output to look like would help the community come up with some ideas for a solution.

Thank you for the suggestion, hope it is more clear now :)


Maybe use the anchorsnapper transformer using points as anchor and polygon as candidate--perhaps segment snapping?

Thanks @alexlynch3450​ , the anchorsnapper is the closest that brought me to at least some kind of result. But I can not make it look as nice as I would like to. imageIs there a way to make it more in a rectangular shape? I tried to play around with parameters, but no real success.


Thank you for the suggestion, hope it is more clear now :)

It is a lot clearer now, thanks!

Thinking out loud here (no time to play with this sadly): how about you buffer streets, (anchor)snap the buffers to the centroids and then intersect those lines.


Thanks @alexlynch3450​ , the anchorsnapper is the closest that brought me to at least some kind of result. But I can not make it look as nice as I would like to. imageIs there a way to make it more in a rectangular shape? I tried to play around with parameters, but no real success.

Hey @mvosner​  I might have an approach.

  1. In the attached workspace, navigate to "CenterPointExtractor" and change 'Point Extraction Mode' parameter to "Center of Gravity"'
  2. add "2DGridAccumulator" after vertex creator transformer
    1. edit cell size parameter to 100x100 (this value will likely change as you play around with it).
    2. Change 'Type of Grid to Create' to "Polygons"
  3. add " AnchoredSnapper" use output from vertexcreator as Anchor and output from 2dgridaccumlator as candidate
    1. Change 'Snapping Type:' to "Vertex Snapping"
    2. Assign value to snapping distance (I used 250)

 

Screenshot 2021-01-14 080319


Thanks @alexlynch3450​ , the anchorsnapper is the closest that brought me to at least some kind of result. But I can not make it look as nice as I would like to. imageIs there a way to make it more in a rectangular shape? I tried to play around with parameters, but no real success.

Hi @alexlynch3450​ this is great. Have tried it and played with the parameters. In "2DGridAccumulator" I used cell size 300x300 and in "AnchoredSnapper" I used 500 for snapping distance.

Here is the result:

image (1)Thank you!😀


Thank you for the suggestion, hope it is more clear now :)

thank you for the suggestion. I have tried it and the buffer definitely made a better result than without it. But in the end the result from @alexlynch3450​ was the best one.


Reply