4

I am trying to draw a line (vector layer) of a certain length that that tries as much as possible to dodge the green polygons.

enter image description here

Assuming a starting point, is there some sort of line centroid algorithm/function already created that I could use?

enter image description here

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
  • In a raster world you could do a cost route along cells weighted 0 (empty vector coded as 0) while coding the cells that 'were' vector as 100 and create a seperate raster as start and end points and simply convert the result to a vector line (from a raster of a path of cell width of 1) – DPSSpatial_BoycottingGISSE Jul 12 '19 at 23:47

1 Answers1

3

I believe the best way would be rasterizing your polygon and calculating the best cost-effective route, as proposed here:

Create an optimised path between nodes avoiding polygons entities

Ruben FV
  • 346
  • 1
  • 10