This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Thiessen Polygon - Flow assigned to each node

Hello,

I am taking my first steps with QGIS and the 'Thiessen Polygon" tool from WaterCAD. The thing is that the surfaces assigned to each node, using this areal distribution tool, do not seem to be correctly generated and I wish someone could tell me the reason.

I...

- Created the topology and the influence area in AutoCAD.

- Loaded the first one in WaterCAD using ModelBuilder.

- Turned the other into a shape file using QGIS.

- Imported the QGIS file in WaterCAD and applied the Thiessen Polygon tool.

- Imported the segmented areas in QGIS and sized them.

- Created an attribute called 'Q' and assigned proportionally demands to each area in QGIS.

- Used LoadBuilder and ran the model.

Thanks in advance

Parents
  • Hi,

    Did you specify any boundary polygon when specifying the thiessen polygons? Or did you just specify the buffering percentage? See this article for details: Extending service area polygons to fill flow boundary layer

    Can you share the model files (.wtg, .wtg.sqlite) for our testing? See this article for sharing hydraulic model files over the forum.

    From your workflow it seems you might be using "proportional distribution by area" method. See this article to understand the various LoadBuilder methods: Creating Thiessen polygons for certain nodes in your model. See the "Proportional Distribution by Area" method and its example.


    Regards,

    Yashodhan Joshi

  • Hello,

    Thanks for answering. I respond in order:

    1) Yes, I specified a boundary polygon layer (not buffering percentage. By the way, what is it for?). That is what I mencioned as "influence area".

    2) Sure. I uploaded them in a ZIP file as "RED DE AGUA POTABLE".

    3) When I clicked on Thiessen Polygon tool, I selected 'Junction/All Elements' because I wanted to consider all of them.

    Thanks again

    Answer Verified By: Brian Estrin 

  • Hello Scott,

    Thanks for answering. The Thiessen Polygons shown in QGIS (shape file), display the same subdivision that I see on my WaterCAD model. In fact, the polygons where made with the WaterCAD tool. I attach screenshots below.

    Shape before generating Thiessen Polygons with WaterCAD

    Shape after generating Thiessen Polygons with WaterCAD.

    Could you explain me the mistake I am making, please? Or tell me how I should proceed to reach my goal (assign demands to each node in terms of areas)?

    Thanks

  • Hello Brian,

    Try the following to see if it helps. First, create a new Thiessen polygon file in WaterCAD. Don't worry about opening it in QGIS. That step is not necessary. The Thiessen polygon does not need to include the demand data. It is only used to define the area around the nodes.

    After creating the Thiessen polygon, open LoadBuilder. You can create a Proportional Distribution by Area connection or edit the existing one. For the Service Area Layer, select the new Thiessen polygon. For the Flow Boundary Layer, select the shapefile that contains the loading data. Click Next until you finish all of the steps.

    I will note that there is already demand data in the model. Was this created using LoadBuilder and your original data? If so, what is the issue that you are seeing? The steps above or the method using your original data appears to be adding demand data to the nodes in the model.

    Regards,

    Scott

  • Hello Scott,

    Thank you again. I will try to follow your recommendations during these days.

    To introduce the demand, I:

    - Opened the Thiessen polygon file, previouslly obtained with WaterCAD, in QGIS.

    - Opened the 'attributes table' and generated the Areas column (which showed the area of each polygon in rows).

    - Estimated on my own the total Flow needed (all the water needed inside the boundary layer to satisfy the demand)

    - Created a new column called DEMANDAS_Q (demands) with this formula " [Total Flow] * [Polygon Area] / Σ [Polygon Area] "

    - Saved the shape file with these new attributes

    - Opened it with Load Builder in WaterCAD.

    After that, each node had it's own demand charged.

    Regards

  • Hello Scott,

    I did what you suggested, but there are still problems with the Thiessen polygons which WaterCAD generates. Based on the shapes generated after using the tool, it seems not to recognise some nodes and do not link any area (neither demand) to them.

      

    I realized that the problem (Demand = 0 l/s) occurs in nodes that are located on the limit of the boundary polygon. Is it possible that WaterCAD does not recognize those nodes for being exactly at the limit? I cannot find other explanation.

    I uploaded the new files as WATER NETWORK (.zip)

    Thanks

  • Hi Brian,

    Thanks for sharing the updated model files.

    1) Yes, I specified a boundary polygon layer (not buffering percentage. By the way, what is it for?). That is what I mencioned as "influence area"

    Its the percentage by which your polygons would be built considering the influence of each junction. So, at each junction if you specify a buffering percentage of 10%, it will go upto 10% of the total polygon to close the Thiessen Polygon. The other option of having a boundary polygon layer helps define this boundary rather than a percentage for greater accuracy. If you have a boundary polygon layer defined, then the polygons would be only created upto the layer limits.

    I realized that the problem (Demand = 0 l/s) occurs in nodes that are located on the limit of the boundary polygon. Is it possible that WaterCAD does not recognize those nodes for being exactly at the limit? I cannot find other explanation.

    In the data you shared, I realized that the boundary polygon is exactly on top of the edge junctions i.e., the boundary runs along the edge nodes and pipes exactly.  The thiessen polygons are created by bisecting the connecting pipes around a junction. This creates a polygon of the bisecting lines and serves as the flow area for that junction.

    In your data since the boundary passes over the edge junctions it cannot create the bounding area around the junction properly such that the junction lies within the thiessen polygon created for it.

    There are two ways to go about it.

    Option 1: Specify a very small buffering percentage (like 1%) so that the polygons go slightly beyond the junctions. This will help the junctions fall withing these thiessen polygons.

    Option 2. Slightly increase the boundary polygon. If you are editing the shapefiles in QGIS, you can slightly increase the polygon size by offsetting it by a small amount. This can be more accurate as your boundary polygon would limit the thiessen polygons rather than the buffering percentage. Use this boundary polygon and then apply demands.

    See the snapshots of junction J-59 with Option 1 and Option 2 below;

    Option 1: I used buffering percentage as 1%.

    Option 2: I used boundary polygon slightly offset along the boundary. Notice that it is offset very slightly but you can see that it is just beyond the pipe so the polygon is able to close and have the junction within it.

    You can follow your workflow then and see if the demands get applied.

    Try the following to see if it helps. First, create a new Thiessen polygon file in WaterCAD. Don't worry about opening it in QGIS. That step is not necessary. The Thiessen polygon does not need to include the demand data. It is only used to define the area around the nodes.

    After creating the Thiessen polygon, open LoadBuilder. You can create a Proportional Distribution by Area connection or edit the existing one. For the Service Area Layer, select the new Thiessen polygon. For the Flow Boundary Layer, select the shapefile that contains the loading data. Click Next until you finish all of the steps.

    Also, you can consider Scott's approach by having the total demand assigned to your boundary polygon. With the area load method, you can proportionally distribute the demand over the thiessen polygons automatically rather than manually calculating and entering the values in the attribute table. See the below article to know more about this method;

    How do each of the LoadBuilder methods work?

    Hope this helps.


    Regards,

    Yashodhan Joshi

    Answer Verified By: Brian Estrin 

Reply
  • Hi Brian,

    Thanks for sharing the updated model files.

    1) Yes, I specified a boundary polygon layer (not buffering percentage. By the way, what is it for?). That is what I mencioned as "influence area"

    Its the percentage by which your polygons would be built considering the influence of each junction. So, at each junction if you specify a buffering percentage of 10%, it will go upto 10% of the total polygon to close the Thiessen Polygon. The other option of having a boundary polygon layer helps define this boundary rather than a percentage for greater accuracy. If you have a boundary polygon layer defined, then the polygons would be only created upto the layer limits.

    I realized that the problem (Demand = 0 l/s) occurs in nodes that are located on the limit of the boundary polygon. Is it possible that WaterCAD does not recognize those nodes for being exactly at the limit? I cannot find other explanation.

    In the data you shared, I realized that the boundary polygon is exactly on top of the edge junctions i.e., the boundary runs along the edge nodes and pipes exactly.  The thiessen polygons are created by bisecting the connecting pipes around a junction. This creates a polygon of the bisecting lines and serves as the flow area for that junction.

    In your data since the boundary passes over the edge junctions it cannot create the bounding area around the junction properly such that the junction lies within the thiessen polygon created for it.

    There are two ways to go about it.

    Option 1: Specify a very small buffering percentage (like 1%) so that the polygons go slightly beyond the junctions. This will help the junctions fall withing these thiessen polygons.

    Option 2. Slightly increase the boundary polygon. If you are editing the shapefiles in QGIS, you can slightly increase the polygon size by offsetting it by a small amount. This can be more accurate as your boundary polygon would limit the thiessen polygons rather than the buffering percentage. Use this boundary polygon and then apply demands.

    See the snapshots of junction J-59 with Option 1 and Option 2 below;

    Option 1: I used buffering percentage as 1%.

    Option 2: I used boundary polygon slightly offset along the boundary. Notice that it is offset very slightly but you can see that it is just beyond the pipe so the polygon is able to close and have the junction within it.

    You can follow your workflow then and see if the demands get applied.

    Try the following to see if it helps. First, create a new Thiessen polygon file in WaterCAD. Don't worry about opening it in QGIS. That step is not necessary. The Thiessen polygon does not need to include the demand data. It is only used to define the area around the nodes.

    After creating the Thiessen polygon, open LoadBuilder. You can create a Proportional Distribution by Area connection or edit the existing one. For the Service Area Layer, select the new Thiessen polygon. For the Flow Boundary Layer, select the shapefile that contains the loading data. Click Next until you finish all of the steps.

    Also, you can consider Scott's approach by having the total demand assigned to your boundary polygon. With the area load method, you can proportionally distribute the demand over the thiessen polygons automatically rather than manually calculating and entering the values in the attribute table. See the below article to know more about this method;

    How do each of the LoadBuilder methods work?

    Hope this helps.


    Regards,

    Yashodhan Joshi

    Answer Verified By: Brian Estrin 

Children
No Data