opengisch / openchaussee

GNU General Public License v3.0
1 stars 2 forks source link

Calculating the polygons #6

Open m-kuhn opened 6 years ago

m-kuhn commented 6 years ago

When a new pavement is created (a new line), the polygon attribute of the same object shall be automatically filled with the following:

This should only be done on insert, NOT on update

signedav commented 6 years ago

This should only be done on insert, NOT on update

Why? Doesn't it need to recalculate the polygon when I change a line?

pvl_geom_area in t_pavement_layers

signedav commented 6 years ago

I think, I understand now regarding the https://github.com/opengisch/openchaussee/issues/7

When inserting it should calculate the polygon with the buffor of 20 meters.

When updating only the line should be calculated. Then the user selects the line, and launches the recalculation of the polygon manually with the buffersize as parameter.

Am I right?

m-kuhn commented 6 years ago

Am I right?

I think so

Why? Doesn't it need to recalculate the polygon when I change a line?

Sometimes polygons are adjusted manually, this is a safety measure to not interfere with these.

So for the few cases where a derived geometry is required...

When updating only the line should be calculated. Then the user selects the line, and launches the recalculation of the polygon manually with the buffersize as parameter.

... this is easy enough to do

signedav commented 6 years ago

Committed the calculation of the polygon on insert https://github.com/opengisch/openchaussee/commit/7c11b63ce3e30586a6ce7f9af3f0d920348ee08e, but need more time for #7

intersect_openchaussee