foursquare / quattroshapes

Other
231 stars 18 forks source link

polygons missing names #4

Closed sevko closed 9 years ago

sevko commented 10 years ago

Five of the Quattroshapes shapefiles have a large number of polygons without any textual names. Here's an example of such records from admin1:

+------+------------+-------------+----------+-----------+--------------------+-----------+--------+------------+-----------+-------+-----------+----------+----------------------+----------------------------------------------+--------+-------+--------------+----------------+--------------------+
| gid  | qs_adm0_a3 |   qs_adm0   | qs_level | qs_iso_cc |       qs_a0        | qs_a0_lc  | qs_a1r | qs_a1r_alt | qs_a1r_lc | qs_a1 | qs_a1_alt | qs_a1_lc |       qs_type        |                  qs_source                   | qs_pop | qs_id |   qs_gn_id   |   qs_woe_id    |      qs_scale      |
+------+------------+-------------+----------+-----------+--------------------+-----------+--------+------------+-----------+-------+-----------+----------+----------------------+----------------------------------------------+--------+-------+--------------+----------------+--------------------+
| 3141 | MRT        | Mauritania  | adm1     | MR        | Mauritania         | MR        | NULL   | NULL       | NULL      | NULL  | NULL      | MRT+99?  | Admin-1 minor island | Natural Earth                                |   NULL |  NULL | 0.0000000000 | -99.0000000000 | 4000000.0000000000 |
| 3286 | CHE        | Switzerland | adm1     | CH        | Switzerland        | NULL      | NULL   | NULL       | NULL      | NULL  | NULL      | 18       | Canton               | SwissTopo                                    |   NULL |  NULL |         NULL |           NULL |               NULL |
| 3287 | CHE        | Switzerland | adm1     | CH        | Switzerland        | NULL      | NULL   | NULL       | NULL      | NULL  | NULL      | 9        | Canton               | SwissTopo                                    |   NULL |  NULL |         NULL |           NULL |               NULL |
| 3288 | CHE        | Switzerland | adm1     | CH        | Switzerland        | NULL      | NULL   | NULL       | NULL      | NULL  | NULL      | 21       | Canton               | SwissTopo                                    |   NULL |  NULL |         NULL |           NULL |               NULL |
| 3289 | CHE        | Switzerland | adm1     | CH        | Switzerland        | NULL      | NULL   | NULL       | NULL      | NULL  | NULL      | 16       | Canton               | SwissTopo                                    |   NULL |  NULL |         NULL |           NULL |               NULL |
| 3290 | CHE        | Switzerland | adm1     | CH        | Switzerland        | NULL      | NULL   | NULL       | NULL      | NULL  | NULL      | 23       | Canton               | SwissTopo                                    |   NULL |  NULL |         NULL |           NULL |               NULL |
| 3291 | CHE        | Switzerland | adm1     | CH        | Switzerland        | NULL      | NULL   | NULL       | NULL      | NULL  | NULL      | 14       | Canton               | SwissTopo                                    |   NULL |  NULL |         NULL |           NULL |               NULL |
| 3292 | CHE        | Switzerland | adm1     | CH        | Switzerland        | NULL      | NULL   | NULL       | NULL      | NULL  | NULL      | 25       | Canton               | SwissTopo                                    |   NULL |  NULL |         NULL |           NULL |               NULL |
| 3358 | DNK        | Denmark     | adm1     | DK        | NULL               | DK0000    | NULL   | NULL       | NULL      | NULL  | NULL      | DK1085   | NULL                 | EuroGlobalMap                                |   NULL |  NULL |         NULL |           NULL |               NULL |
| 3817 | HRV        | Croatia     | adm1     | HR        | NULL               | N_A       | NULL   | NULL       | NULL      | NULL  | NULL      | N_A      | NULL                 | EuroGlobalMap                                |   NULL |  NULL |         NULL |           NULL |               NULL |
| 3359 | DNK        | Denmark     | adm1     | DK        | NULL               | DK0000    | NULL   | NULL       | NULL      | NULL  | NULL      | DK1084   | NULL                 | EuroGlobalMap                                |   NULL |  NULL |         NULL |           NULL |               NULL |
| 3826 | HRV        | Croatia     | adm1     | HR        | Republika Hrvatska | HR0000000 | NULL   | NULL       | NULL      | NULL  | NULL      | N_A      | NULL                 | EuroGlobalMap                                |   NULL |  NULL |         NULL |           NULL |               NULL |
| 4685 | VAT        | Vatican     | adm1     | VA        | Vatican            | NULL      | NULL   | NULL       | NULL      | NULL  | NULL      | NULL     | NULL                 | US State Department, with Natural Earth mods |   NULL |  NULL |         NULL |           NULL |               NULL |
| 3123 | GGY        | Guernsey    | adm1     | GG        | Guernsey           | GG        | NULL   | NULL       | NULL      | NULL  | NULL      | GGY+99?  | Admin-1 minor island | Natural Earth                                |   NULL |  NULL | 0.0000000000 | -99.0000000000 | 4000000.0000000000 |
| 3126 | IDN        | Indonesia   | adm1     | ID        | Indonesia          | ID        | NULL   | NULL       | NULL      | NULL  | NULL      | IDN+99?  | Admin-1 minor island | Natural Earth                                |   NULL |  NULL | 0.0000000000 | -99.0000000000 | 4000000.0000000000 |
+------+------------+-------------+----------+-----------+--------------------+-----------+--------+------------+-----------+-------+-----------+----------+----------------------+----------------------------------------------+--------+-------+--------------+----------------+--------------------+
(15 rows)

I ran some queries and generated the following counts:

shapefile attribute name number of NULL names number of polygons
admin0 a0 5 331
admin1 a1 77 4694
admin2 a2 534 18214
local_admin qs_la 330 110119
localities qs_loc 57 163385

All 57 of the localities records have non-NULL alternative names (in qs_loc_alt), but that isn't true for the other shapefiles. Can they be patched up?

nvkelso commented 10 years ago

The source administrative data did not include this information and it would need to be added as a sidecar file (data or spatial join).

On Tue, Sep 2, 2014 at 6:22 AM, Severyn Kozak notifications@github.com wrote:

Five of the Quattroshapes shapefiles have a large number of polygons without any textual names:

+------+------------+-------------+----------+-----------+--------------------+-----------+--------+------------+-----------+-------+-----------+----------+----------------------+----------------------------------------------+--------+-------+--------------+----------------+--------------------+ | gid | qs_adm0_a3 | qs_adm0 | qs_level | qs_iso_cc | qs_a0 | qs_a0_lc | qs_a1r | qs_a1r_alt | qs_a1r_lc | qs_a1 | qs_a1_alt | qs_a1_lc | qs_type | qs_source | qs_pop | qs_id | qs_gn_id | qs_woe_id | qs_scale | +------+------------+-------------+----------+-----------+--------------------+-----------+--------+------------+-----------+-------+-----------+----------+----------------------+----------------------------------------------+--------+-------+--------------+----------------+--------------------+ | 3141 | MRT | Mauritania | adm1 | MR | Mauritania | MR | NULL | NULL | NULL | NULL | NULL | MRT+99? | Admin-1 minor island | Natural Earth | NULL | NULL | 0.0000000000 | -99.0000000000 | 4000000.0000000000 | | 3286 | CHE | Switzerland | adm1 | CH | Switzerland | NULL | NULL | NULL | NULL | NULL | NULL | 18 | Canton | SwissTopo | NULL | NULL | NULL | NULL | NULL | | 3287 | CHE | Switzerland | adm1 | CH | Switzerland | NULL | NULL | NULL | NULL | NULL | NULL | 9 | Canton | SwissTopo | NULL | NULL | NULL | NULL | NULL | | 3288 | CHE | Switzerland | adm1 | CH | Switzerland | NULL | NULL | NULL | NULL | NULL | NULL | 21 | Canton | SwissTopo | NULL | NULL | NULL | NULL | NULL | | 3289 | CHE | Switzerland | adm1 | CH | Switzerland | NULL | NULL | NULL | NULL | NULL | NULL | 16 | Canton | SwissTopo | NULL | NULL | NULL | NULL | NULL | | 3290 | CHE | Switzerland | adm1 | CH | Switzerland | NULL | NULL | NULL | NULL | NULL | NULL | 23 | Canton | SwissTopo | NULL | NULL | NULL | NULL | NULL | | 3291 | CHE | Switzerland | adm1 | CH | Switzerland | NULL | NULL | NULL | NULL | NULL | NULL | 14 | Canton | SwissTopo | NULL | NULL | NULL | NULL | NULL | | 3292 | CHE | Switzerland | adm1 | CH | Switzerland | NULL | NULL | NULL | NULL | NULL | NULL | 25 | Canton | SwissTopo | NULL | NULL | NULL | NULL | NULL | | 3358 | DNK | Denmark | adm1 | DK | NULL | DK0000 | NULL | NULL | NULL | NULL | NULL | DK1085 | NULL | EuroGlobalMap | NULL | NULL | NULL | NULL | NULL | | 3817 | HRV | Croatia | adm1 | HR | NULL | N_A | NULL | NULL | NULL | NULL | NULL | N_A | NULL | EuroGlobalMap | NULL | NULL | NULL | NULL | NULL | | 3359 | DNK | Denmark | adm1 | DK | NULL | DK0000 | NULL | NULL | NULL | NULL | NULL | DK1084 | NULL | EuroGlobalMap | NULL | NULL | NULL | NULL | NULL | | 3826 | HRV | Croatia | adm1 | HR | Republika Hrvatska | HR0000000 | NULL | NULL | NULL | NULL | NULL | N_A | NULL | EuroGlobalMap | NULL | NULL | NULL | NULL | NULL | | 4685 | VAT | Vatican | adm1 | VA | Vatican | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | US State Department, with Natural Earth mods | NULL | NULL | NULL | NULL | NULL | | 3123 | GGY | Guernsey | adm1 | GG | Guernsey | GG | NULL | NULL | NULL | NULL | NULL | GGY+99? | Admin-1 minor island | Natural Earth | NULL | NULL | 0.0000000000 | -99.0000000000 | 4000000.0000000000 | | 3126 | IDN | Indonesia | adm1 | ID | Indonesia | ID | NULL | NULL | NULL | NULL | NULL | IDN+99? | Admin-1 minor island | Natural Earth | NULL | NULL | 0.0000000000 | -99.0000000000 | 4000000.0000000000 | +------+------------+-------------+----------+-----------+--------------------+-----------+--------+------------+-----------+-------+-----------+----------+----------------------+----------------------------------------------+--------+-------+--------------+----------------+--------------------+ (15 rows)

I ran some queries and generated the following counts: shapefile attribute name number of NULL names number of polygons admin0 a0 5 331 admin1 a1 77 4694 admin2 a2 534 18214 local_admin qs_la 330 110119 localities qs_loc 57 163385

All 57 of the localities records have non-NULL alternative names (in qs_loc_alt), but that isn't true for the other shapefiles. Can they be patched up?

— Reply to this email directly or view it on GitHub https://github.com/foursquare/quattroshapes/issues/4.