Skip to content

lakes file path directory not correct #61

@spencer-tassone

Description

@spencer-tassone

I am trying to open the 110 m geometry of lakes for the whole world and am getting an HTTP Error 404 Not Found message due to what I think is an incorrect file path.

When I run this command:

library(dplyr)
library(rnaturalearth)

lakes <- rnaturalearth::ne_download(scale = 110,
                                    type = 'lakes',
                                    category = 'physical') %>%
  sf::st_as_sf(lakes110, crs = 4269)

I get this error

trying URL 'http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_lakes.zip'
Error in utils::download.file(file.path(address), zip_file <- tempfile()) : 
  cannot open URL 'http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_lakes.zip'
In addition: Warning message:
In utils::download.file(file.path(address), zip_file <- tempfile()) :
  cannot open URL 'https://www.naturalearthdata.com/http/www.naturalearthdata.com/download/110m/physical/ne_110m_lakes.zip': HTTP status was '404 Not Found'

When I go to the naturalearthdata.com website and search lakes I can see the download link for the 110 m lakes, which has the following filepath:

https://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_lakes.zip

Which is a slightly different file path from what the command above is trying

Incorrect file paths that the command above is trying

1. http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_lakes.zip
2. https://www.naturalearthdata.com/http/www.naturalearthdata.com/download/110m/physical/ne_110m_lakes.zip

The first incorrect file path is missing an s in the first http
The second incorrect file path is missing a / in the second http/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions