In the map shown below, I have manually created the dummy lines (in green). Using python, and without using PostGIS or sextante, I would like to automate the creation of these dummy links between a point and a line layer, based on the following criteria:
- Depending on the polygon size, I should be able to add an
Xamount of dummy links between the centroid (point) and its nearest projection(s) onto the roadway layer.
- The script so that the largest polygons get the most amount of dummy links and the smallest get the least amount.
- The script should connect the newly created dummy link to nearest highway based on a classifications scheme, i.e. connect to "busier" highways first
- If a polygon does not have any roads/links in it, the script should allow the centroid of that polygon to connect to roads outside of its boundaries within
Yunits of distance
- The dummy links must be connected to the roadway layer in such a way that this roadway layer could be potentially used for routing including the dummy links.
- Therefore, the dummy link layer must have the same attributes as the road layer
- Create a new layer with all the new dummy links
Question: Is this possible using Qgis and Python alone? any pointers as to where to start or can you help in providing a pseudocode to assist me to solve this problem?