From 8fbe41c66ae9bd9e7538f8ca78ec2c43addd1e11 Mon Sep 17 00:00:00 2001 From: Doug Wright Date: Thu, 11 Nov 2021 16:31:19 +0000 Subject: [PATCH] Remove unused extents --- .../Import/EPSGCodegenFromGeoRepository.php | 20 ++++- .../Extents/BoundingBoxOnly/Extent1038.php | 43 ----------- .../Extents/BoundingBoxOnly/Extent1281.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2292.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2293.php | 48 ------------ .../Extents/BoundingBoxOnly/Extent2307.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2308.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2309.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2310.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2317.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2318.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2320.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2321.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2322.php | 38 ---------- .../Extents/BoundingBoxOnly/Extent2402.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2403.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2548.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2549.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2550.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2551.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2553.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2554.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2556.php | 38 ---------- .../Extents/BoundingBoxOnly/Extent2557.php | 48 ------------ .../Extents/BoundingBoxOnly/Extent2558.php | 38 ---------- .../Extents/BoundingBoxOnly/Extent2559.php | 33 --------- .../Extents/BoundingBoxOnly/Extent2962.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2965.php | 28 ------- .../Extents/BoundingBoxOnly/Extent2966.php | 28 ------- .../Extents/BoundingBoxOnly/Extent3227.php | 43 ----------- .../Extents/BoundingBoxOnly/Extent3332.php | 73 ------------------- .../Extents/BoundingBoxOnly/Extent3358.php | 28 ------- .../Extents/BoundingBoxOnly/Extent3359.php | 28 ------- .../Extents/BoundingBoxOnly/Extent3360.php | 28 ------- .../Extents/BoundingBoxOnly/Extent3397.php | 28 ------- .../Extents/BoundingBoxOnly/Extent3848.php | 33 --------- .../Extents/BoundingBoxOnly/Extent3850.php | 33 --------- .../Extents/BoundingBoxOnly/Extent4614.php | 28 ------- src/Geometry/Extents/Extent2732.php | 28 ------- src/Geometry/Extents/Extent2733.php | 28 ------- src/Geometry/Extents/Extent2734.php | 28 ------- src/Geometry/Extents/Extent2735.php | 28 ------- src/Geometry/Extents/Extent2736.php | 28 ------- src/Geometry/Extents/Extent2737.php | 28 ------- src/Geometry/Extents/Extent2738.php | 28 ------- src/Geometry/Extents/Extent2739.php | 28 ------- src/Geometry/Extents/Extent2740.php | 28 ------- 47 files changed, 18 insertions(+), 1450 deletions(-) delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent1038.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent1281.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2292.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2293.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2307.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2308.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2309.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2310.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2317.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2318.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2320.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2321.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2322.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2402.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2403.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2548.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2549.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2550.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2551.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2553.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2554.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2556.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2557.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2558.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2559.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2962.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2965.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent2966.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent3227.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent3332.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent3358.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent3359.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent3360.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent3397.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent3848.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent3850.php delete mode 100644 src/Geometry/Extents/BoundingBoxOnly/Extent4614.php delete mode 100644 src/Geometry/Extents/Extent2732.php delete mode 100644 src/Geometry/Extents/Extent2733.php delete mode 100644 src/Geometry/Extents/Extent2734.php delete mode 100644 src/Geometry/Extents/Extent2735.php delete mode 100644 src/Geometry/Extents/Extent2736.php delete mode 100644 src/Geometry/Extents/Extent2737.php delete mode 100644 src/Geometry/Extents/Extent2738.php delete mode 100644 src/Geometry/Extents/Extent2739.php delete mode 100644 src/Geometry/Extents/Extent2740.php diff --git a/src/EPSG/Import/EPSGCodegenFromGeoRepository.php b/src/EPSG/Import/EPSGCodegenFromGeoRepository.php index 29fea2c53..4573df3ab 100644 --- a/src/EPSG/Import/EPSGCodegenFromGeoRepository.php +++ b/src/EPSG/Import/EPSGCodegenFromGeoRepository.php @@ -85,11 +85,27 @@ public function generateExtents(): void SELECT e.extent_code, e.extent_name FROM epsg_coordoperation o + JOIN epsg_coordinatereferencesystem sourcecrs ON sourcecrs.coord_ref_sys_code = o.source_crs_code AND sourcecrs.coord_ref_sys_kind NOT IN ('engineering', 'derived') AND sourcecrs.deprecated = 0 JOIN epsg_usage u ON u.object_code = o.coord_op_code AND u.object_table_name = 'epsg_coordoperation' JOIN epsg_extent e ON u.extent_code = e.extent_code LEFT JOIN epsg_deprecation dep ON dep.object_table_name = 'epsg_coordoperation' AND dep.object_code = o.coord_op_code AND dep.deprecation_date <= '2020-12-14' - WHERE dep.deprecation_id IS NULL AND e.deprecated = 0 - AND o.coord_op_name NOT LIKE '%example%' + LEFT JOIN epsg_supersession s ON s.object_table_name = 'epsg_coordoperation' AND s.object_code = o.coord_op_code + WHERE dep.deprecation_id IS NULL AND e.deprecated = 0 AND s.supersession_id IS NULL + AND o.coord_op_type != 'conversion' AND o.coord_op_type != 'concatenated operation' AND o.coord_op_name NOT LIKE '%example%' AND o.coord_op_name NOT LIKE '%mining%' + AND o.coord_op_method_code NOT IN (" . implode(',', EPSGCodegenFromDataImport::BLACKLISTED_METHODS) . ') + AND o.coord_op_code NOT IN (' . implode(',', EPSGCodegenFromDataImport::BLACKLISTED_OPERATIONS) . ") + + UNION + + SELECT e.extent_code, e.extent_name + FROM epsg_coordoperation o + JOIN epsg_coordinatereferencesystem projcrs ON projcrs.projection_conv_code = o.coord_op_code AND projcrs.coord_ref_sys_kind NOT IN ('engineering', 'derived') AND projcrs.deprecated = 0 + JOIN epsg_usage u ON u.object_code = o.coord_op_code AND u.object_table_name = 'epsg_coordoperation' + JOIN epsg_extent e ON u.extent_code = e.extent_code + LEFT JOIN epsg_deprecation dep ON dep.object_table_name = 'epsg_coordoperation' AND dep.object_code = o.coord_op_code AND dep.deprecation_date <= '2020-12-14' + LEFT JOIN epsg_supersession s ON s.object_table_name = 'epsg_coordoperation' AND s.object_code = o.coord_op_code + WHERE dep.deprecation_id IS NULL AND e.deprecated = 0 AND s.supersession_id IS NULL + AND o.coord_op_type = 'conversion' AND o.coord_op_type != 'concatenated operation' AND o.coord_op_name NOT LIKE '%example%' AND o.coord_op_name NOT LIKE '%mining%' AND o.coord_op_method_code NOT IN (" . implode(',', EPSGCodegenFromDataImport::BLACKLISTED_METHODS) . ') AND o.coord_op_code NOT IN (' . implode(',', EPSGCodegenFromDataImport::BLACKLISTED_OPERATIONS) . ') diff --git a/src/Geometry/Extents/BoundingBoxOnly/Extent1038.php b/src/Geometry/Extents/BoundingBoxOnly/Extent1038.php deleted file mode 100644 index 171563b2f..000000000 --- a/src/Geometry/Extents/BoundingBoxOnly/Extent1038.php +++ /dev/null @@ -1,43 +0,0 @@ -