| Author |
Message |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 24/02/2010 17:38:24
|
Michel Machado
Joined: 24/02/2010 15:53:49
Messages: 3
Offline
|
Hi there,
I've downloaded the US.zip file today and found two things that I can't say if they are features or bugs. If they are features, could someone provide some explanation for them?
1. Is it possible to have two cities with the same name in the same state?
Query:
SELECT name, admin1_code, count(*) as count
FROM US
WHERE feature_class = 'P'
GROUP BY name, admin1_code
HAVING count > 1
ORDER BY count desc
LIMIT 10;
Output:
Five Points|PA|31
Oak Grove|TN|30
Fairview|TN|27
Midway|TX|24
Midway|TN|23
Fairview|AL|21
Five Points|GA|21
Mount Pleasant|PA|20
Five Points|AL|17
New Hope|TN|17
Looking at the first entry of the previous output, one has the following:
SELECT geonameid, name, admin1_code, admin2_code, admin3_code, feature_code
FROM US
WHERE name = 'Five Points' AND admin1_code = 'PA';
4557976|Five Points|PA|001||PPL
4557977|Five Points|PA|029||PPL
5189749|Five Points|PA|007||PPL
5189750|Five Points|PA|007||PPL
5189751|Five Points|PA|011||PPL
5189752|Five Points|PA|011||PPL
5189753|Five Points|PA|011||PPL
5189754|Five Points|PA|017||PPL
5189755|Five Points|PA|017||PPL
5189756|Five Points|PA|019||PPL
5189757|Five Points|PA|031||PPL
5189758|Five Points|PA|033||PPL
5189759|Five Points|PA|037||PPL
5189760|Five Points|PA|047||PPL
5189761|Five Points|PA|049||PPL
5189762|Five Points|PA|049||PPL
5189763|Five Points|PA|063||PPL
5189764|Five Points|PA|079||PPL
5189765|Five Points|PA|085||PPL
5189766|Five Points|PA|085||PPL
5189767|Five Points|PA|085||PPL
5189768|Five Points|PA|085||CAPE
5189769|Five Points|PA|085||PPL
5189770|Five Points|PA|085||PPL
5189771|Five Points|PA|085||PPL
5189772|Five Points|PA|091||PPL
5189773|Five Points|PA|091||PPL
5189774|Five Points|PA|095||PPL
5189775|Five Points|PA|097||PPL
5189776|Five Points|PA|101||
5189777|Five Points|PA|105||PPL
5189778|Five Points|PA|121||PPL
5189779|Five Points|PA|125||
5189780|Five Points|PA|129||PPL
2. Shouldn't the field asciiname have a value equivalent to the field name?
SELECT count(*)
FROM US
WHERE asciiname = name || ' Census Designated Place';
5519
By the way, is there a reference that provides the map that is followed to obtain asciiname from name?
|
--
[ ]'s |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 26/02/2010 08:02:34
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
1. place names are not unique. there are several places with the same name.
2. this is a bug.
Marc
|
 |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 27/02/2010 15:51:55
|
Michel Machado
Joined: 24/02/2010 15:53:49
Messages: 3
Offline
|
Hi Marc,
Excluding geonameid, which set of fields is supposed to be unique?
Which function do you use to get asciiname from name?
Thanks a lot for this great service!
[ ]'s
|
--
[ ]'s |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 28/02/2010 16:39:39
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
only the geonameid is unique and the admincode1 per country if <>'00'.
the asciiname bug was a manual update to remove the string 'Census Designated Place' from the names and it was forgotten to also remove it from the asciiname column.
Best
Marc
|
 |
|
|
 |
|
|