Skip to content

Infrastructure updates

Test group: test_combine_sites

Test case: test_combine_multiple_sites

In this case we have three sites with exactly the same geometry but different unique IDs, metadata and priorities. We should combine them into a single site.

BeforeAfter

Test case: test_combine_sites_priority_for_larger_area

Ensure that the metadata is chosen from the site with the largest area when they are both have the same priority.

BeforeAfter

Test case: test_combine_sites_take_non_null_metadata

When creating a site union we want to take metadata from the site that has the non-null value when one of them is blank.

BeforeAfter

Test case: test_combine_sites_take_non_null_metadata_reversed

When creating a site union we want to take metadata from the site that has the non-null when one of them is blank.

This is identical to the other test case but the site with the missing metadata is swapped around.

BeforeAfter

Test case: test_combine_two_sites

Combine two sites at the same location but with different polygons. The result should be a single site with the union of the two polygons and metadata from the higher priority site.

BeforeAfter

Test case: test_combine_two_sites_different_surveys

In this case we have two sites with the same geometry but different priorities. We should combine them into a single site. The metadata and site name from the higher priority site should be chosen.

BeforeAfter

Test group: test_duplicate_geometries

Test case: test_identify_changes_1

In this test we check that when there are two identical geometries the metadata from the higher priority data will be used to replace that on the original site.

BeforeAfter

Test case: test_identify_changes_2

In this test we check that when there are two identical geometries with no new metadata, that the original data is preserved (including no change to the priority).

BeforeAfter

Test group: test_remove_duplicate_sites

Test case: test_allow_some_overlapping_sites

In this test we have two lower priority sites that overlap with a higher priority site. We want to allow some overlap so that the lower priority sites are kept. For this case we have set the overlap_threshold to 0.9 (90%).

BeforeAfter

Test case: test_metadata_handling

We want to test that metadata is passed on if the new or updated site has empty metadata. For example, if the new geometry is selected but the corresponding record does not have a site name, we should use the original site name (if there is not any ambiguity).

BeforeAfter

Test case: test_multiple_existing_sites_inside_new_site

Test that when there are multiple existing sites inside a new site, that the larger site is kept.

BeforeAfter

Test case: test_multiple_existing_sites_inside_new_site_ambiguous_metadata

Test that when there are multiple existing sites inside a new site, that the larger site is kept. If the metadata is ambiguous, the metadata from the new site is used.

BeforeAfter

Test case: test_remove_any_overlapping_sites

Test remove the smaller sites when they have a lower priority with the overlap_threshold set to zero.

BeforeAfter

Test case: test_remove_duplicate_sites

Test that the overlapping sites are removed and the site with the highest priority is kept.

BeforeAfter

Test case: test_remove_duplicate_sites_without_priority

Test remove duplicate sites when there is not a priority column specified.

BeforeAfter

Test case: test_small_overlap

TODO: fill this out.

BeforeAfter

Test case: test_split_site_into_smaller_sites

Test that a site is split into smaller sites if it overlaps with a lower priority site.

BeforeAfter

Test group: test_remove_overlaps

Test case: test_with_real_data

This real world example shows two polygons that have a very small overlap. This test demonstrates how we can remove the overlapping section by cutting off part of one polygon.

BeforeAfter

Test group: test_remove_point_sites

Test case: test_metadata_handling

Test that if the polygon site is missing metadata (such as site name) then it is taken from the point site.

BeforeAfter

Test case: test_metadata_handling_different_surveys

Test that if the polygon site is missing metadata (such as site name) then it is take from the point site.

BeforeAfter

Test case: test_metadata_handling_multiple_points

Test that if the polygon site is missing metadata (such as site name) then it is taken from the point site. This is for the case of multiple points within the single polygon site.

BeforeAfter

Test case: test_remove_point_close_to_polygon_example_1

Sometimes the original point is very close to the polygon site but not actually contained within it.

This test uses a real example.

BeforeAfter

Test case: test_remove_point_close_to_polygon_example_2

Sometimes the original point is very close to the polygon site but not actually contained within it.

This test uses a real example.

BeforeAfter

Test case: test_remove_point_close_to_polygon_same_name

If the nearby_point matching is turned off we still want to match to points that are close and have the same name.

This has been adjusted from a real example (same geometries but different metadata),

BeforeAfter

Test case: test_remove_point_close_to_polygon_twice

In this case we have a point which is removed due to being close with identical name, but also would be valid for removal due to just being close. So we check that these two methods being in play do not cause any issues in the program.

BeforeAfter