ropensci / FedData

Functions to Automate Downloading Geospatial Data Available from Several Federated Data Sources
https://docs.ropensci.org/FedData
Other
96 stars 22 forks source link

Corrupt files when specifying 2016 NLCD in get_nlcd #45

Closed jhemberger closed 4 years ago

jhemberger commented 5 years ago

When trying to pull the 2016 NLCD for a given feature area, I get an error:

Error in value[[3L]](cond) : nlcd file ./RAW/NLCD/NLCD2016_LC_N36W084.zip corrupt or incomplete. Please delete the file and try again.

The same code using 2011 and 2006 both work. Wondering if there's an issue server side for pulling the tiles? I've tried purging those files and starting a fresh R session, both to no avail.

bocinsky commented 5 years ago

Hi there. Thanks for submitting this. Yeah, there've been some issues with the NLCD tiles hosted on AWS (mainly missing tiles) that I'd been accessing for FedData, so I've actually gone ahead and just pushed a change to start using the MRLC web coverage service instead. The function parameters are a little different, but you should be able to get up and running very fast. Have a look at

?get_nlcd

for the new parameter options. I'll leave this open in case you still have trouble getting what you need.

jhemberger commented 5 years ago

Thank you! I'll take a stab with the new change.

tvanlaar commented 4 years ago

Hi there! I'm having the same issue and checking the new parameter options didn't seem to help. I appreciate any info!

bocinsky commented 4 years ago

Hey @tvanlaar ~

For now, you need to install the dev version of FedData from GitHub, as I haven't released this feature on CRAN yet. Try:

install.packages("devtools")
devtools::install_github("ropensci/FedData")

get_nlcd(template = paleocar::mvnp, year = 2011, dataset = "Tree_Canopy", label = "NLCD2011can")

The complete list of available datasets for each year is listed here: https://www.mrlc.gov/geoserver/ows?service=WCS&version=2.0.1&request=GetCapabilities

tvanlaar commented 4 years ago

Thanks! I tried that but ended up with this error. I'm pretty new to doing this kind of work. Do you think this is an error on my end or MRLC? Error in curl::curl_fetch_disk(url, x$path, handle = handle) : Empty reply from server

On Wed, Oct 30, 2019 at 8:02 AM R. Kyle Bocinsky notifications@github.com wrote:

Hey @tvanlaar https://github.com/tvanlaar ~

For now, you need to install the dev version of FedData from GitHub, as I haven't released this feature on CRAN yet. Try:

install.packages("devtools")devtools::install_github("ropensci/FedData")

get_nlcd(template = paleocar::mvnp, year = 2011, dataset = "Tree_Canopy", label = "NLCD2011can")

The complete list of available datasets for each year is listed here:

https://www.mrlc.gov/geoserver/ows?service=WCS&version=2.0.1&request=GetCapabilities

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGAJFZGFRQIZ35FV35HTQRGOZBA5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECUQ6ZI#issuecomment-547950437, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3CGANHH2RTCCL45DJETNTQRGOZBANCNFSM4IKXDH6A .

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu

bocinsky commented 4 years ago

Hey, that’s not a problem! Did you try that exact series of commands that I suggested?

Sent from my mobile; please excuse my brevity.

On Oct 30, 2019, at 11:55, tvanlaar notifications@github.com wrote:

Thanks! I tried that but ended up with this error. I'm pretty new to doing this kind of work. Do you think this is an error on my end or MRLC? Error in curl::curl_fetch_disk(url, x$path, handle = handle) : Empty reply from server

On Wed, Oct 30, 2019 at 8:02 AM R. Kyle Bocinsky notifications@github.com wrote:

Hey @tvanlaar https://github.com/tvanlaar ~

For now, you need to install the dev version of FedData from GitHub, as I haven't released this feature on CRAN yet. Try:

install.packages("devtools")devtools::install_github("ropensci/FedData")

get_nlcd(template = paleocar::mvnp, year = 2011, dataset = "Tree_Canopy", label = "NLCD2011can")

The complete list of available datasets for each year is listed here:

https://www.mrlc.gov/geoserver/ows?service=WCS&version=2.0.1&request=GetCapabilities

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGAJFZGFRQIZ35FV35HTQRGOZBA5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECUQ6ZI#issuecomment-547950437, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3CGANHH2RTCCL45DJETNTQRGOZBANCNFSM4IKXDH6A .

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

tvanlaar commented 4 years ago

I did! I tried first changing to the 2016 database because that's the one I'm more interested in, but then I also tried your command too (simply switching out the template for mine). I can try using your template though as well

On Wed, Oct 30, 2019 at 11:13 AM R. Kyle Bocinsky notifications@github.com wrote:

Hey, that’s not a problem! Did you try that exact series of commands that I suggested?

Sent from my mobile; please excuse my brevity.

On Oct 30, 2019, at 11:55, tvanlaar notifications@github.com wrote:

Thanks! I tried that but ended up with this error. I'm pretty new to doing this kind of work. Do you think this is an error on my end or MRLC? Error in curl::curl_fetch_disk(url, x$path, handle = handle) : Empty reply from server

On Wed, Oct 30, 2019 at 8:02 AM R. Kyle Bocinsky < notifications@github.com> wrote:

Hey @tvanlaar https://github.com/tvanlaar ~

For now, you need to install the dev version of FedData from GitHub, as I haven't released this feature on CRAN yet. Try:

install.packages("devtools")devtools::install_github("ropensci/FedData")

get_nlcd(template = paleocar::mvnp, year = 2011, dataset = "Tree_Canopy", label = "NLCD2011can")

The complete list of available datasets for each year is listed here:

https://www.mrlc.gov/geoserver/ows?service=WCS&version=2.0.1&request=GetCapabilities

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGAJFZGFRQIZ35FV35HTQRGOZBA5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECUQ6ZI#issuecomment-547950437 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AG3CGANHH2RTCCL45DJETNTQRGOZBANCNFSM4IKXDH6A

.

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGAL3M7RQM2CTOSUNWYDQRHFF3A5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECVIBAY#issuecomment-548044931, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3CGAMXZPFD4QSKD2GAJQTQRHFF3ANCNFSM4IKXDH6A .

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu

bocinsky commented 4 years ago

Yeah, try using my template, first, which will help us tell what’s up. You’ll have to install paleocar, though. Do:

devtools::install_github(“bocinsky/paleocar”)

Then try the command. Let me know how it goes!

Sent from my mobile; please excuse my brevity.

On Oct 30, 2019, at 12:21, tvanlaar notifications@github.com wrote:

I did! I tried first changing to the 2016 database because that's the one I'm more interested in, but then I also tried your command too (simply switching out the template for mine). I can try using your template though as well

On Wed, Oct 30, 2019 at 11:13 AM R. Kyle Bocinsky notifications@github.com wrote:

Hey, that’s not a problem! Did you try that exact series of commands that I suggested?

Sent from my mobile; please excuse my brevity.

On Oct 30, 2019, at 11:55, tvanlaar notifications@github.com wrote:

Thanks! I tried that but ended up with this error. I'm pretty new to doing this kind of work. Do you think this is an error on my end or MRLC? Error in curl::curl_fetch_disk(url, x$path, handle = handle) : Empty reply from server

On Wed, Oct 30, 2019 at 8:02 AM R. Kyle Bocinsky < notifications@github.com> wrote:

Hey @tvanlaar https://github.com/tvanlaar ~

For now, you need to install the dev version of FedData from GitHub, as I haven't released this feature on CRAN yet. Try:

install.packages("devtools")devtools::install_github("ropensci/FedData")

get_nlcd(template = paleocar::mvnp, year = 2011, dataset = "Tree_Canopy", label = "NLCD2011can")

The complete list of available datasets for each year is listed here:

https://www.mrlc.gov/geoserver/ows?service=WCS&version=2.0.1&request=GetCapabilities

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGAJFZGFRQIZ35FV35HTQRGOZBA5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECUQ6ZI#issuecomment-547950437 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AG3CGANHH2RTCCL45DJETNTQRGOZBANCNFSM4IKXDH6A

.

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGAL3M7RQM2CTOSUNWYDQRHFF3A5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECVIBAY#issuecomment-548044931, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3CGAMXZPFD4QSKD2GAJQTQRHFF3ANCNFSM4IKXDH6A .

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

tvanlaar commented 4 years ago

Yours worked! Must be an issue with my template. I'll recreate and rerun.

On Wed, Oct 30, 2019 at 11:26 AM R. Kyle Bocinsky notifications@github.com wrote:

Yeah, try using my template, first, which will help us tell what’s up. You’ll have to install paleocar, though. Do:

devtools::install_github(“bocinsky/paleocar”)

Then try the command. Let me know how it goes!

Sent from my mobile; please excuse my brevity.

On Oct 30, 2019, at 12:21, tvanlaar notifications@github.com wrote:

I did! I tried first changing to the 2016 database because that's the one I'm more interested in, but then I also tried your command too (simply switching out the template for mine). I can try using your template though as well

On Wed, Oct 30, 2019 at 11:13 AM R. Kyle Bocinsky < notifications@github.com> wrote:

Hey, that’s not a problem! Did you try that exact series of commands that I suggested?

Sent from my mobile; please excuse my brevity.

On Oct 30, 2019, at 11:55, tvanlaar notifications@github.com wrote:

Thanks! I tried that but ended up with this error. I'm pretty new to doing this kind of work. Do you think this is an error on my end or MRLC? Error in curl::curl_fetch_disk(url, x$path, handle = handle) : Empty reply from server

On Wed, Oct 30, 2019 at 8:02 AM R. Kyle Bocinsky < notifications@github.com> wrote:

Hey @tvanlaar https://github.com/tvanlaar ~

For now, you need to install the dev version of FedData from GitHub, as I haven't released this feature on CRAN yet. Try:

install.packages("devtools")devtools::install_github("ropensci/FedData")

get_nlcd(template = paleocar::mvnp, year = 2011, dataset = "Tree_Canopy", label = "NLCD2011can")

The complete list of available datasets for each year is listed here:

https://www.mrlc.gov/geoserver/ows?service=WCS&version=2.0.1&request=GetCapabilities

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <

https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGAJFZGFRQIZ35FV35HTQRGOZBA5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECUQ6ZI#issuecomment-547950437

,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AG3CGANHH2RTCCL45DJETNTQRGOZBANCNFSM4IKXDH6A

.

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGAL3M7RQM2CTOSUNWYDQRHFF3A5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECVIBAY#issuecomment-548044931 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AG3CGAMXZPFD4QSKD2GAJQTQRHFF3ANCNFSM4IKXDH6A

.

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGANOA2PNVTYXWJ5UKXDQRHGW5A5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECVJOVY#issuecomment-548050775, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3CGANW4OAFUNEXAC4XWITQRHGW5ANCNFSM4IKXDH6A .

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu

bocinsky commented 4 years ago

Yeah, make sure it is in the contiguous US... my guess is that you are requesting an area that doesn’t overlap the NLCD.

Sent from my mobile; please excuse my brevity.

On Oct 30, 2019, at 12:40, tvanlaar notifications@github.com wrote:

Yours worked! Must be an issue with my template. I'll recreate and rerun.

On Wed, Oct 30, 2019 at 11:26 AM R. Kyle Bocinsky notifications@github.com wrote:

Yeah, try using my template, first, which will help us tell what’s up. You’ll have to install paleocar, though. Do:

devtools::install_github(“bocinsky/paleocar”)

Then try the command. Let me know how it goes!

Sent from my mobile; please excuse my brevity.

On Oct 30, 2019, at 12:21, tvanlaar notifications@github.com wrote:

I did! I tried first changing to the 2016 database because that's the one I'm more interested in, but then I also tried your command too (simply switching out the template for mine). I can try using your template though as well

On Wed, Oct 30, 2019 at 11:13 AM R. Kyle Bocinsky < notifications@github.com> wrote:

Hey, that’s not a problem! Did you try that exact series of commands that I suggested?

Sent from my mobile; please excuse my brevity.

On Oct 30, 2019, at 11:55, tvanlaar notifications@github.com wrote:

Thanks! I tried that but ended up with this error. I'm pretty new to doing this kind of work. Do you think this is an error on my end or MRLC? Error in curl::curl_fetch_disk(url, x$path, handle = handle) : Empty reply from server

On Wed, Oct 30, 2019 at 8:02 AM R. Kyle Bocinsky < notifications@github.com> wrote:

Hey @tvanlaar https://github.com/tvanlaar ~

For now, you need to install the dev version of FedData from GitHub, as I haven't released this feature on CRAN yet. Try:

install.packages("devtools")devtools::install_github("ropensci/FedData")

get_nlcd(template = paleocar::mvnp, year = 2011, dataset = "Tree_Canopy", label = "NLCD2011can")

The complete list of available datasets for each year is listed here:

https://www.mrlc.gov/geoserver/ows?service=WCS&version=2.0.1&request=GetCapabilities

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <

https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGAJFZGFRQIZ35FV35HTQRGOZBA5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECUQ6ZI#issuecomment-547950437

,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AG3CGANHH2RTCCL45DJETNTQRGOZBANCNFSM4IKXDH6A

.

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGAL3M7RQM2CTOSUNWYDQRHFF3A5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECVIBAY#issuecomment-548044931 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AG3CGAMXZPFD4QSKD2GAJQTQRHFF3ANCNFSM4IKXDH6A

.

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGANOA2PNVTYXWJ5UKXDQRHGW5A5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECVJOVY#issuecomment-548050775, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3CGANW4OAFUNEXAC4XWITQRHGW5ANCNFSM4IKXDH6A .

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

tvanlaar commented 4 years ago

I must be making the template file incorrectly. I used the following command to get an area including Colorado, Northern New Mexico, and Utah.

extentCO<-polygon_from_extent(raster::extent(-112.80233, -98.739831, 33.910812, 44.7500847), proj4string="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs")

On Wed, Oct 30, 2019 at 11:44 AM R. Kyle Bocinsky notifications@github.com wrote:

Yeah, make sure it is in the contiguous US... my guess is that you are requesting an area that doesn’t overlap the NLCD.

Sent from my mobile; please excuse my brevity.

On Oct 30, 2019, at 12:40, tvanlaar notifications@github.com wrote:

Yours worked! Must be an issue with my template. I'll recreate and rerun.

On Wed, Oct 30, 2019 at 11:26 AM R. Kyle Bocinsky < notifications@github.com> wrote:

Yeah, try using my template, first, which will help us tell what’s up. You’ll have to install paleocar, though. Do:

devtools::install_github(“bocinsky/paleocar”)

Then try the command. Let me know how it goes!

Sent from my mobile; please excuse my brevity.

On Oct 30, 2019, at 12:21, tvanlaar notifications@github.com wrote:

I did! I tried first changing to the 2016 database because that's the one I'm more interested in, but then I also tried your command too (simply switching out the template for mine). I can try using your template though as well

On Wed, Oct 30, 2019 at 11:13 AM R. Kyle Bocinsky < notifications@github.com> wrote:

Hey, that’s not a problem! Did you try that exact series of commands that I suggested?

Sent from my mobile; please excuse my brevity.

On Oct 30, 2019, at 11:55, tvanlaar notifications@github.com wrote:

Thanks! I tried that but ended up with this error. I'm pretty new to doing this kind of work. Do you think this is an error on my end or MRLC? Error in curl::curl_fetch_disk(url, x$path, handle = handle) : Empty reply from server

On Wed, Oct 30, 2019 at 8:02 AM R. Kyle Bocinsky < notifications@github.com> wrote:

Hey @tvanlaar https://github.com/tvanlaar ~

For now, you need to install the dev version of FedData from GitHub, as I haven't released this feature on CRAN yet. Try:

install.packages("devtools")devtools::install_github("ropensci/FedData")

get_nlcd(template = paleocar::mvnp, year = 2011, dataset = "Tree_Canopy", label = "NLCD2011can")

The complete list of available datasets for each year is listed here:

https://www.mrlc.gov/geoserver/ows?service=WCS&version=2.0.1&request=GetCapabilities

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <

https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGAJFZGFRQIZ35FV35HTQRGOZBA5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECUQ6ZI#issuecomment-547950437

,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AG3CGANHH2RTCCL45DJETNTQRGOZBANCNFSM4IKXDH6A

.

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <

https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGAL3M7RQM2CTOSUNWYDQRHFF3A5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECVIBAY#issuecomment-548044931

,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AG3CGAMXZPFD4QSKD2GAJQTQRHFF3ANCNFSM4IKXDH6A

.

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGANOA2PNVTYXWJ5UKXDQRHGW5A5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECVJOVY#issuecomment-548050775 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AG3CGANW4OAFUNEXAC4XWITQRHGW5ANCNFSM4IKXDH6A

.

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGALVGG4TH6D6GDUGHE3QRHIYFA5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECVLLMI#issuecomment-548058545, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3CGAMFANPMWKBKUF6MFKTQRHIYFANCNFSM4IKXDH6A .

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu

bocinsky commented 4 years ago

Hey again,

What you sent looks just fine!

I can't find it documented anywhere, but there must be a limit to the size of the request you can back to the NLCD web coverage service, or else the server is timing out or something. The area you are requesting is pretty big, especially given the dataset is 30 m resolution.

A smaller area works though:

library(FedData)
#> Loading required package: sp
#> Loading required package: sf
#> Linking to GEOS 3.7.2, GDAL 2.4.2, PROJ 5.2.0
extentCO <- polygon_from_extent(
  raster::extent(-112, -111, 33, 34),
  proj4string="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
)
extentCO_nlcd <- get_nlcd(template = extentCO, 
                          label = "extentCO",
                          force.redo = TRUE)
plot(extentCO_nlcd)

Created on 2019-10-30 by the reprex package (v0.3.0)

Perhaps you could break up your region into smaller ones, and then use the raster::mosaic function to stitch them together?

tvanlaar commented 4 years ago

Thanks! That worked for me.

I have one last question and then I promise I'll leave you alone. When I try to extract the land cover category names (e.g. open water, etc) I'm getting an error that the subscript is out of bounds. nlcd_cover_df<-subset(nlcdCO@data@attributes[[1]]) Error in nlcdCO@data@attributes[[1]] : subscript out of bounds

I checked a raster file I had generated with your older script and under @data @attributes, there was a list of items. In the newer raster, that area is empty. Is there a different place I should be looking in the newer data to pull cover categories? I'm able to match numbers with proportions, so it's not the end of the world if not. It would just make analysis a little easier to have the names.

I have attached two screenshots to show you what I mean. Thanks again for this great package and all your help!

On Wed, Oct 30, 2019 at 2:57 PM R. Kyle Bocinsky notifications@github.com wrote:

Hey again,

What you sent looks just fine!

I can't find it documented anywhere, but there must be a limit to the size of the request you can back to the NLCD web coverage service, or else the server is timing out or something. The area you are requesting is pretty big, especially given the dataset is 30 m resolution.

A smaller area works though:

library(FedData)#> Loading required package: sp#> Loading required package: sf#> Linking to GEOS 3.7.2, GDAL 2.4.2, PROJ 5.2.0extentCO <- polygon_from_extent( raster::extent(-112, -111, 33, 34), proj4string="+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" )extentCO_nlcd <- get_nlcd(template = extentCO, label = "extentCO", force.redo = TRUE) plot(extentCO_nlcd)

Created on 2019-10-30 by the reprex package https://reprex.tidyverse.org (v0.3.0)

Perhaps you could break up your region into smaller ones, and then use the raster::mosaic function to stitch them together?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ropensci/FedData/issues/45?email_source=notifications&email_token=AG3CGANSPFBX32PQYKBMRQLQRH7N7A5CNFSM4IKXDH6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECV43JY#issuecomment-548130215, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3CGAPW5GDLQPWSY7X5GFTQRH7N7ANCNFSM4IKXDH6A .

-- Tricia Van Laar, PhD Assistant Professor Department of Biology College of Science and Mathematics California State University, Fresno Science 202A 2555 E. San Ramon Ave., M/S SB73 Fresno, CA 93740-8034 Tel: 559-278-4095 Fax: 559-278-3963 tvanlaar@csufresno.edu

bocinsky commented 4 years ago

Hey hey,

The legend is available at @legend, but unfortunately they don't provide the categories (I have no idea why). In the old FedData I had created a CSV of the classification system, but this is sub-optimal in that they could feasibly change the system. I'll try to develop a way to add it. In the mean time, you can access the legend here: https://www.mrlc.gov/data/legends/national-land-cover-database-2016-nlcd2016-legend

Just change the year in that path to get the legend for a different year (there really aren't that many changes).

dmontecino commented 4 years ago

Hi Kyle:

me again. Something similar happens when using get_ned (30 Mts)

(Down)Loading NED tile for 38N and 72W. Downloading file: https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/ArcGrid/n38w072.zip WARNING: NED file /private/var/folders/g0/dcbxlb912574rny4t_gjjjbw0000gt/T/RtmpmdVo55/FedData/raw/ned/1/n38w072.zip corrupt or incomplete. Please delete the file and try again.

bocinsky commented 4 years ago

Hmm, that sometimes happens when a download is stopped part of the way through. Did you try deleting the file and running it again, or running it from a new session?

On Mar 24, 2020, at 8:47 AM, dmontecino notifications@github.com wrote:

Hi Kyle:

me again. Something similar happens when using get_ned (30 Mts)

(Down)Loading NED tile for 38N and 72W. Downloading file: https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/ArcGrid/n38w072.zip https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/1/ArcGrid/n38w072.zip WARNING: NED file /private/var/folders/g0/dcbxlb912574rny4t_gjjjbw0000gt/T/RtmpmdVo55/FedData/raw/ned/1/n38w072.zip corrupt or incomplete. Please delete the file and try again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ropensci/FedData/issues/45#issuecomment-603282259, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7SSM3MEDROUENBBQMWG5DRJDBY3ANCNFSM4IKXDH6A.

dmontecino commented 4 years ago

both... some of them do download

ehestir commented 4 years ago

Hi Kyle,

I just followed this thread trying to troubleshoot issues with get_nlcd().

I followed your template exactly (include the devtools install of paleocar). I receive the following error message:

Area of interest includes 1 NLCD tile(s). (Down)Loading NLCD tile: N36W108 Downloading file: https://prd-tnm.s3.amazonaws.com/StagedProducts/NLCD/data/2011/canopy/3x3/NLCD2011_CAN_N36W108.zip Error in value[3L] : nlcd file /Users/ehestir/Downloads/RAW/NLCD/NLCD2011_CAN_N36W108.zip corrupt or incomplete. Please delete the file and try again.

I have tried restarting the session multiple times.

Any help you can provide would be much appreciated.

SessionInfo

R version 3.6.3 (2020-02-29) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Catalina 10.15.5

Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] FedData_2.5.7 sp_1.4-2

loaded via a namespace (and not attached): [1] Rcpp_1.0.4.6 urca_1.3-0 pillar_1.4.4
[4] compiler_3.6.3 xts_0.12-0 tseries_0.10-47
[7] iterators_1.0.12 tools_3.6.3 ncdf4_1.17
[10] gtable_0.3.0 lubridate_1.7.9 lifecycle_0.2.0
[13] tibble_3.0.1 nlme_3.1-144 lattice_0.20-38
[16] pkgconfig_2.0.3 rlang_0.4.6 foreach_1.5.0
[19] rgdal_1.5-10 curl_4.3 parallel_3.6.3
[22] dplyr_1.0.0 stringr_1.4.0 raster_3.1-5
[25] paleocar_4.0.1 generics_0.0.2 vctrs_0.3.1
[28] rgeos_0.5-3 hms_0.5.3 nnet_7.3-12
[31] lmtest_0.9-37 forecast_8.12 grid_3.6.3
[34] tidyselect_1.1.0 glue_1.4.1 care_1.1.10
[37] data.table_1.12.8 R6_2.4.1 TTR_0.23-6
[40] ggplot2_3.3.2 readr_1.3.1 purrr_0.3.4
[43] tidyr_1.1.0 corpcor_1.6.9 magrittr_1.5
[46] matrixStats_0.56.0 scales_1.1.1 backports_1.1.8
[49] codetools_0.2-16 ellipsis_0.3.1 quantmod_0.4.17
[52] timeDate_3043.102 colorspace_1.4-1 fracdiff_1.5-1
[55] quadprog_1.5-8 stringi_1.4.6 munsell_0.5.0
[58] broom_0.5.6 crayon_1.3.4 zoo_1.8-8

bocinsky commented 4 years ago

Hi Erin. Thanks for working through the earlier posts, and sorry they aren’t working for you. Have you tried deleting "/Users/ehestir/Downloads/RAW/NLCD/NLCD2011_CAN_N36W108.zip” and then re-running? The restarting R thing only works if you are writing to the temporary directory (which changes with each R session), and not when you specify a directory.

Give that a try, and then we’ll trouble shoot more. Sorry it isn’t working for you!

KB

On Jun 25, 2020, at 6:22 PM, Erin Hestir notifications@github.com wrote:

Hi Kyle,

I just followed this thread trying to troubleshoot issues with get_nlcd().

I followed your template exactly (include the devtools install of paleocar). I receive the following error message:

Area of interest includes 1 NLCD tile(s). (Down)Loading NLCD tile: N36W108 Downloading file: https://prd-tnm.s3.amazonaws.com/StagedProducts/NLCD/data/2011/canopy/3x3/NLCD2011_CAN_N36W108.zip https://prd-tnm.s3.amazonaws.com/StagedProducts/NLCD/data/2011/canopy/3x3/NLCD2011_CAN_N36W108.zip Error in value[3L] <x-msg://13/cond> : nlcd file /Users/ehestir/Downloads/RAW/NLCD/NLCD2011_CAN_N36W108.zip corrupt or incomplete. Please delete the file and try again.

I have tried restarting the session multiple times.

Any help you can provide would be much appreciated.

SessionInfo

R version 3.6.3 (2020-02-29) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS Catalina 10.15.5

Matrix products: default BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] FedData_2.5.7 sp_1.4-2

loaded via a namespace (and not attached): [1] Rcpp_1.0.4.6 urca_1.3-0 pillar_1.4.4 [4] compiler_3.6.3 xts_0.12-0 tseries_0.10-47 [7] iterators_1.0.12 tools_3.6.3 ncdf4_1.17 [10] gtable_0.3.0 lubridate_1.7.9 lifecycle_0.2.0 [13] tibble_3.0.1 nlme_3.1-144 lattice_0.20-38 [16] pkgconfig_2.0.3 rlang_0.4.6 foreach_1.5.0 [19] rgdal_1.5-10 curl_4.3 parallel_3.6.3 [22] dplyr_1.0.0 stringr_1.4.0 raster_3.1-5 [25] paleocar_4.0.1 generics_0.0.2 vctrs_0.3.1 [28] rgeos_0.5-3 hms_0.5.3 nnet_7.3-12 [31] lmtest_0.9-37 forecast_8.12 grid_3.6.3 [34] tidyselect_1.1.0 glue_1.4.1 care_1.1.10 [37] data.table_1.12.8 R6_2.4.1 TTR_0.23-6 [40] ggplot2_3.3.2 readr_1.3.1 purrr_0.3.4 [43] tidyr_1.1.0 corpcor_1.6.9 magrittr_1.5 [46] matrixStats_0.56.0 scales_1.1.1 backports_1.1.8 [49] codetools_0.2-16 ellipsis_0.3.1 quantmod_0.4.17 [52] timeDate_3043.102 colorspace_1.4-1 fracdiff_1.5-1 [55] quadprog_1.5-8 stringi_1.4.6 munsell_0.5.0 [58] broom_0.5.6 crayon_1.3.4 zoo_1.8-8

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ropensci/FedData/issues/45#issuecomment-649881080, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7SSMZDXSSMWNHKWXHIIE3RYPS6DANCNFSM4IKXDH6A.

ehestir commented 4 years ago

Thank you. I have ensured that I am deleting all corrupt files (not overwriting). I am still getting the error.

I have also tried a full re-install of gdal and also updating to rgdal 1.5-12.

The error persists. Any other thoughts would be great!

bocinsky commented 4 years ago

Hi again. It looks like from your sessionInfo that you aren't running the development version of FedData.

Try:

devtools::install_packages("ropensci/FedData")

Your sessionInfo() should report:

FedData_3.0.0.9000
ehestir commented 4 years ago

Thanks Kyle. I have reinstalled via devtools(). Here is the error:

Error in get_nlcd(template = paleocar::mvnp, year = 2011, dataset = "canopy", : No web coverage service at https://www.mrlc.gov/geoserver/mrlc_display/NLCD_2011_canopy_L48/ows. See available services at https://www.mrlc.gov/geoserver/ows?service=WCS&version=2.0.1&request=GetCapabilities

bocinsky commented 4 years ago

Hey hey. Check out the help file for get_nlcd. “dataset” has to be one of 'Impervious', 'Land_Cover’, or ‘Tree_Canopy’.

KB

On Jun 30, 2020, at 1:43 PM, Erin Hestir notifications@github.com wrote:

Thanks Kyle. I have reinstalled via devtools(). Here is the error:

Error in get_nlcd(template = paleocar::mvnp, year = 2011, dataset = "canopy", : No web coverage service at https://www.mrlc.gov/geoserver/mrlc_display/NLCD_2011_canopy_L48/ows https://www.mrlc.gov/geoserver/mrlc_display/NLCD_2011_canopy_L48/ows. See available services at https://www.mrlc.gov/geoserver/ows?service=WCS&version=2.0.1&request=GetCapabilities https://www.mrlc.gov/geoserver/ows?service=WCS&version=2.0.1&request=GetCapabilities — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/ropensci/FedData/issues/45#issuecomment-652004128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB7SSM5IZAYN6TX47HLANQLRZI56VANCNFSM4IKXDH6A.