-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image Service Pixel Size Cannot be Controlled with arc.raster #54
Comments
You can use the
I ran this once successfully and second time I tried to run it got a read error and currently this is what the Ortho Image Service is returning: Once the server is back up the above should work. |
Thanks so much @orhuna, this is much closer! When I ran your code (and it looks like their servers are back up) I got an error after the line I thought maybe the raster created by the operation was too big, so I tried reducing the size of the extent object, but it still outputs the same error:
Maybe it has to do with my version of
|
@Nova-Scotia apologies for the late response. Here is a "fix" for the problem above. It is not a sustainable fix and I will walk you through my brooding over process: Get the Rest Definition for Image Service
This returns:
Subset the Image Service with Blagdon
This returns
Note that extent is updated by Blagdon BUT nrow and ncol are the same. It seems we cannot control the resolution of a remote imager service from our As for my "fix" (for lack of a better word)
Set the number of rows and columns explicitly. This is not a good solution since it changes the original resolution but this is the size I can fit into an R matrix. We will be working on functionality for on-the-fly clipping so that we don't need this "fix". |
@Nova-Scotia glad it is working with the fix above. We will track this internally but will keep this issue open and you can track our progress here. |
@orhuna any progress on this? |
@Nova-Scotia thanks for following up! Unfortunately, I am not with the R-ArcGIS team anymore. I am adding @JosiahParry who would be a great person to follow up on the latest |
I'm trying to produce a map using R in RStudio that uses an image service as the baselayer. I'd like to use the arcgisbinding package to clip a raster from an image service provided in ArcGIS Online.
So far, I've "cheated" - I bring the image service into ArcGIS, export the area of interest as a georeferenced .TIF, and bring it into R:
Then, I map my points onto that map, using
ggplot2
andRStoolbox
:Ideally, I'd like to be able to specify an extent and then use tools within R to clip and use part of a raster from an image service. Is this possible currently? I'm having trouble finding any resources on how to do this. The closest I got was how to access raster imagery already on a local machine.
What if I'm starting with a study area polygon (defined below), and I want to use it to define the extent of a basemap layer for a map I'm creating in R? For example, what if I wanted to use "Aerial Photography Image Service (Orthophoto) - 2019", an image service in ArcGIS online, as the basemap?
View imagery
https://www.arcgis.com/home/webmap/viewer.html?url=https%3A%2F%2Fimagery.dcgis.dc.gov%2Fdcgis%2Frest%2Fservices%2FOrtho%2FOrtho_2019%2FImageServer&source=sd
Image service url
https://imagery.dcgis.dc.gov/dcgis/rest/services/Ortho/Ortho_2019/ImageServer
The text was updated successfully, but these errors were encountered: