3

I am not sure if this is possible, because it seems like a very complex problem. I have some polygons with attributes that have an attribute indicating a percentage. I would like to construct a new set of polygons whose area is proportional to their source polygon's area multiplied by its percentage. So, for example, a polygon with an area of 10 000 and a percentage value of 90% should produce a polygon with an area of 9 000.

Essentially I need to negatively buffer polygon features by a variable distance so that the resultant feature's area is a desired value.

Is this possible in QGIS?

closed as off-topic by Vince, whyzar, mgri, ahmadhanb, lynxlynxlynx Oct 14 '17 at 14:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking help to debug/write/improve code must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Providing a clear problem statement and evidence of a code attempt will help others to help you. See: How to create a Minimal, Complete, and Verifiable example." – Vince, whyzar, mgri, ahmadhanb, lynxlynxlynx
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    I've done this with an Esri library, but it was an iterative process on individual shapes, requiring scores of buffers for each polygon before an approximate solution ("close enough") was achieved. The answer to almost all, "Is this possible?" questions is, "Yes." Please Edit your question to focus on what you have attempted, including your source, and detailing the problem you have encountered. – Vince Oct 14 '17 at 11:32
  • @Vince, I haven't really tried anything so far because I just wanted to know if this was possible with a simple tool. I was thinking that I may have to employ an iterative solution, and so I will be attempting that. I will respond with an answer when I get it working. – wfgeo Oct 14 '17 at 11:34
  • I think you'll have to write a python script to do this in QGIS. You'll have to take each feature separately, and use a binary search algorithm to find the desired buffer width that satisfies the condition at a given tolerance. I think I've done similar things in R. – Spacedman Oct 14 '17 at 12:27
  • 1
    Binary-ish search. If you assume a proportional relationship with the area and square of the buffer distance, then you can choose a new radius proportionally between the high and low previous guesses. – Vince Oct 14 '17 at 14:25
  • 3
    i think the buffer by percentage plugin does this? – Steven Kay Oct 14 '17 at 17:01

Browse other questions tagged or ask your own question.