Closed antonioribeiro closed 6 years ago
That's pretty odd – most (but not all) of those should have states. How are you determining this?
On Fri, Dec 29, 2017 at 3:01 PM, Antonio Carlos Ribeiro < notifications@github.com> wrote:
Not sure if I'm looking at this right, but those countries have no states in the database ne_10m_admin_1_states_provinces:
ALA Åland Islands
ATG Antigua and Barbuda
BEL Belgium
BIH Bosnia and Herzegovina
ESH Western Sahara
IRQ Iraq
UNK Kosovo
NOR Norway
PNG Papua New Guinea
PRT Portugal
PSE Palestine
SJM Svalbard and Jan Mayen
SOM Somalia
SRB Serbia
SSD South Sudan
SYR Syria
UMI United States Minor Outlying Islands
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nvkelso/natural-earth-vector/issues/240, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0EO6Wl76VizPgy30G-bkfi4LNeN7ucks5tFW9dgaJpZM4RPb_s .
By loading the shapefile this way:
$shapeRecords = new ShapeFile($this->dataDir('natural_earth/ne_10m_admin_1_states_provinces'));
$result = [];
foreach ($shapeRecords as $record) {
if ($record['dbf']['_deleted']) {
continue;
}
$result[] = $record['dbf'];
}
And generating one file per country. But if you say they should be there, I'll look in a bit further.
You are right, sir, of course ;)
I was using the field gu_a3
to group states by country, but looks like adm0_a3
may be what I need.
Sorry and thank you.
This one is missing: https://en.wikipedia.org/wiki/State_of_Palestine (PSE Palestine) and we have some others with divergent adm0_a3 codes (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) like
ALA | Åland Islands
Which is found in your database as
ALD
The natural-earth-vector database is probably using the correct one, since we cannot rely very much on Wikipedia these days, but could you, please, link a reference to the correct country codes, please? Here's the ones I found different:
[adm0_a3] => ALD !== ALA - Åland Islands
[adm0_a3] => SAH !== ESH - Western Sahara
[adm0_a3] => NOR !== SJM - Svalbard and Jan Mayen
[adm0_a3] => SDS !== SSD - South Sudan
Good to hear!
The adm0_a3
codes are Natural Earth-isms. If you're looking for ISO codes look in the iso_a3
column (and related columns) instead.
The listed country-equivalent features are not going to have admin-1 regions/provinces in Natural Earth anytime soon...
Not sure if I'm looking at this right, but those countries have no states in the database
ne_10m_admin_1_states_provinces
: