• Hello,

    When you import the US.zip file West Virginia is not being imported as state ( feature_class = ‘A’ and feature_code = ‘ADM1’ )

    You will get only 50 ‘states’ instead of 51 (DC being actually accounted as a state because feature_class = ‘A’ and feature_code = ‘ADM1’, and no WV)

    The main concern here is that if there is a problem for that row (WV) it may be more problems that I haven’t noticed yet and ending up with an incomplete dataset.

    thank you for checking it out.

    • This topic was modified 4 years, 8 months ago by genidex.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jacques Malgrange

    (@sojahu)

    Hi,

    This is not a plugin issue.
    You should post your remark to the GeoNames forum.

    Regards

    Thread Starter genidex

    (@genidex)

    Hello,

    No, it is a plugin issue because I have checked the US.zip file before posting my remark and the state of “West Virginia” is correctly present in it with all its data like any other states.
    I have checked also your plugin and how you are inserting the data into the db and you are using the close IGNORE which would simply skip all non-inserted data without throwing an error. So maybe many other entries have the same problem and could easily go unnoticed.

    I think you should definitely check it.

    Thank you.

    Plugin Author Jacques Malgrange

    (@sojahu)

    Hi,

    The West Virginia line contain more than 4096 characters. This is the cause of the issue.
    You can simply increase this value in the wpGeonames_addZip function :

    while(($v = fgets($handle, 8192))!==false)

    8192 give you 2 new lines (225358 in place of 225356). West Virginia is one of this.

    Thanks for your report, I will make an update.

    Regards

    Thread Starter genidex

    (@genidex)

    Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Not importing all the US States (missing WV)’ is closed to new replies.