Skip to content

Imports are performed partly without ois_fixes when starting from an empty database

Using v1.5 and starting the import from a completely empty database the first 487 post codes (from 1050 to 1974) are processed without the ois_fixes table being populated.

This results in reversion of previously corrected names resetting OSM fixed names to the names specified by DAR. This happened during the initial production run after server migration done by mikini on 2023-09-30. The post codes and street names which were affected before intervention were:

  • 1820 Frederiksberg C, "Frederiksberg Allé" -> "Frederiksberg Alle": 141937671 (achavi)
  • 1854 Frederiksberg C, "Doktor Priemes Vej" -> "Dr. Priemes Vej": 141937848 (achavi)
  • 1955 Frederiksberg C, "Doktor Abildgaards Alle" -> "Dr. Abildgaards Alle": 141939123 (achavi)
  • 1961 Frederiksberg C, "J.M. Thieles Vej" -> "J.M.Thieles Vej", 141939287 (achavi)

The cause is the condition of index.php:30 which makes the update of ois_fixes & post codes happen only when the post code being processed is divisible by 1000. As the lowest post code in use by DAR is 1089 this does not happen before 2000 is hit, disregarding ois_fixes (missing post codes are handled specifically) on all post codes below on that initial run (or whenever the db is dropped/ois_fixes cleared).

Additional info

Excerpt of log output:

[30-Sep-2023 00:41:01 Europe/Berlin] PHP Warning:  Trying to access array offset on value of type bool i
n <redacted>/autoAWS/index.php on line 1415
[30-Sep-2023 00:41:01 Europe/Berlin] ERROR: Unable to determine next postcode to update. The attempted p
ostcodes was 0
[30-Sep-2023 00:41:01 Europe/Berlin] INFO: Updating the list of postcodes
[30-Sep-2023 00:42:02 Europe/Berlin] INFO: Now updating postcode 1050
[30-Sep-2023 00:42:04 Europe/Berlin] INFO: 39 addresses downloaded from OSM
[30-Sep-2023 00:42:04 Europe/Berlin] INFO: 39 addresses downloaded from AWS
[30-Sep-2023 00:42:04 Europe/Berlin] INFO: 0 addresses need updating
[30-Sep-2023 00:42:04 Europe/Berlin] INFO: 0 addresses are missing from OSM and will be added
[30-Sep-2023 00:42:04 Europe/Berlin] INFO: 0 addresses will be deleted from OSM
[30-Sep-2023 00:42:04 Europe/Berlin] INFO: Clearing database
[30-Sep-2023 00:42:04 Europe/Berlin] INFO: Database cleared
...
[30-Sep-2023 08:12:01 Europe/Berlin] INFO: Now updating postcode 1820
[30-Sep-2023 08:12:02 Europe/Berlin] INFO: 105 addresses downloaded from OSM
[30-Sep-2023 08:12:02 Europe/Berlin] INFO: 105 addresses downloaded from AWS
[30-Sep-2023 08:12:02 Europe/Berlin] INFO: 103 addresses need updating
[30-Sep-2023 08:12:02 Europe/Berlin] INFO: 0 addresses are missing from OSM and will be added
[30-Sep-2023 08:12:02 Europe/Berlin] INFO: 0 addresses will be deleted from OSM
[30-Sep-2023 08:12:03 Europe/Berlin] INFO: New changeset created with ID: 141937671
[30-Sep-2023 08:12:03 Europe/Berlin] INFO: Updating nodes
[30-Sep-2023 08:12:53 Europe/Berlin] INFO: Deleting nodes
[30-Sep-2023 08:12:53 Europe/Berlin] INFO: Creating nodes
[30-Sep-2023 08:12:53 Europe/Berlin] INFO: Closing changeset
[30-Sep-2023 08:12:53 Europe/Berlin] INFO: Clearing database
[30-Sep-2023 08:12:53 Europe/Berlin] INFO: Database cleared
...
[30-Sep-2023 08:25:02 Europe/Berlin] INFO: Now updating postcode 1854
[30-Sep-2023 08:25:03 Europe/Berlin] INFO: 15 addresses downloaded from OSM
[30-Sep-2023 08:25:03 Europe/Berlin] INFO: 15 addresses downloaded from AWS
[30-Sep-2023 08:25:03 Europe/Berlin] INFO: 15 addresses need updating
[30-Sep-2023 08:25:03 Europe/Berlin] INFO: 0 addresses are missing from OSM and will be added
[30-Sep-2023 08:25:03 Europe/Berlin] INFO: 0 addresses will be deleted from OSM
[30-Sep-2023 08:25:04 Europe/Berlin] INFO: New changeset created with ID: 141937848
[30-Sep-2023 08:25:04 Europe/Berlin] INFO: Updating nodes
[30-Sep-2023 08:25:12 Europe/Berlin] INFO: Deleting nodes
[30-Sep-2023 08:25:12 Europe/Berlin] INFO: Creating nodes
[30-Sep-2023 08:25:12 Europe/Berlin] INFO: Closing changeset
[30-Sep-2023 08:25:12 Europe/Berlin] INFO: Clearing database
[30-Sep-2023 08:25:13 Europe/Berlin] INFO: Database cleared
...
[30-Sep-2023 09:25:02 Europe/Berlin] INFO: Now updating postcode 1955
[30-Sep-2023 09:25:03 Europe/Berlin] INFO: 17 addresses downloaded from OSM
[30-Sep-2023 09:25:03 Europe/Berlin] INFO: 17 addresses downloaded from AWS
[30-Sep-2023 09:25:03 Europe/Berlin] INFO: 17 addresses need updating
[30-Sep-2023 09:25:03 Europe/Berlin] INFO: 0 addresses are missing from OSM and will be added
[30-Sep-2023 09:25:03 Europe/Berlin] INFO: 0 addresses will be deleted from OSM
[30-Sep-2023 09:25:03 Europe/Berlin] INFO: New changeset created with ID: 141939123
[30-Sep-2023 09:25:03 Europe/Berlin] INFO: Updating nodes
[30-Sep-2023 09:25:13 Europe/Berlin] INFO: Deleting nodes
[30-Sep-2023 09:25:13 Europe/Berlin] INFO: Creating nodes
[30-Sep-2023 09:25:13 Europe/Berlin] INFO: Closing changeset
[30-Sep-2023 09:25:13 Europe/Berlin] INFO: Clearing database
[30-Sep-2023 09:25:13 Europe/Berlin] INFO: Database cleared
...
[30-Sep-2023 09:31:02 Europe/Berlin] INFO: Now updating postcode 1961
[30-Sep-2023 09:31:03 Europe/Berlin] INFO: 25 addresses downloaded from OSM
[30-Sep-2023 09:31:03 Europe/Berlin] INFO: 25 addresses downloaded from AWS
[30-Sep-2023 09:31:03 Europe/Berlin] INFO: 25 addresses need updating
[30-Sep-2023 09:31:03 Europe/Berlin] INFO: 0 addresses are missing from OSM and will be added
[30-Sep-2023 09:31:03 Europe/Berlin] INFO: 0 addresses will be deleted from OSM
[30-Sep-2023 09:31:03 Europe/Berlin] INFO: New changeset created with ID: 141939287
[30-Sep-2023 09:31:03 Europe/Berlin] INFO: Updating nodes
[30-Sep-2023 09:31:16 Europe/Berlin] INFO: Deleting nodes
[30-Sep-2023 09:31:16 Europe/Berlin] INFO: Creating nodes
[30-Sep-2023 09:31:16 Europe/Berlin] INFO: Closing changeset
[30-Sep-2023 09:31:16 Europe/Berlin] INFO: Clearing database
[30-Sep-2023 09:31:16 Europe/Berlin] INFO: Database cleared

Affected post codes count and range:

MariaDB [autoaws]> select count(*),min(postnummer),max(postnummer) from last_update where postnummer <2000;
+----------+-----------------+-----------------+
| count(*) | min(postnummer) | max(postnummer) |
+----------+-----------------+-----------------+
|      487 |            1050 |            1974 |
+----------+-----------------+-----------------+
1 row in set (0.001 sec)

MariaDB [autoaws]> 

Total post code count and range:

MariaDB [autoaws]> select count(*),min(postnummer),max(postnummer) from last_update;
+----------+-----------------+-----------------+
| count(*) | min(postnummer) | max(postnummer) |
+----------+-----------------+-----------------+
|     1089 |            1050 |            9990 |
+----------+-----------------+-----------------+
1 row in set (0.000 sec)

MariaDB [autoaws]> 

Post codes at which ois_fixes & post codes are updated during a run:

MariaDB [autoaws]> select postnummer from last_update where postnummer%1000=0;
+------------+
| postnummer |
+------------+
|       2000 |
|       3000 |
|       4000 |
|       5000 |
|       6000 |
|       7000 |
|       8000 |
|       9000 |
+------------+
8 rows in set (0.001 sec)

MariaDB [autoaws]>