Closed lindsayplatt closed 6 years ago
@lindsaycarr projected_sp
has to be in UTM coordinates, those aren't lat/lons
@wdwatkins yeah, I'm not really sure what that means or how to do that?
Hmm, also the min/max you are getting for the raster I think is just the raster cell coordinates (ie it is 21x29 pixels). If you look at a map that won't be anywhere near WI.
Maybe see look into how the base raster is georeferenced?
It looks fairly simple to transform from UTM to lat/lon if you need to. https://stackoverflow.com/questions/36520915/converting-utms-to-lat-long-in-r
OK, so I looked at this page (https://gis.stackexchange.com/questions/23841/create-a-raster-with-georeferenced-information-in-r) and realized I had the exact extent of the raster in order to georeference it to lat/long, so I added that step. I'm much closer because the watershed polygon plots over the same region, but now the precip values don't show up:
Good progress, is there a white background with the polygon maybe?
There was something strange happening with re-projecting it. Something about warping. I kept it in the projection string that geoknife automatically uses and it works:
@wdwatkins can you do another quick review? I can run make and this is what I get for the clip fig:
If you're dealing with cosmetic stuff yet I would say reduce the color scale range so it is all used, unless there will be other maps with values that go to two, and make the legend about twice as big. Will look at the code later this morning.
Well, the maximum value is 1.8 ... so I had the scale round up from the maximum. What's the best way to do it?
Oh ok, never mind then. It must just be a single cell or something.
They all look faded though, like alpha is not 1. I haven't figured that out.
Hmm yep - that's the issue. I thought I had that working for something previously? I'll submit changes to that and then merge this! Thanks!
Here's what it looks like now (still not included in publish)
Still not perfect....without adding the
sp
polygon, the raster map looks like this:but then when I add it, it looks like this:
There seems to be an issue with the projections because of the lat/long values are so different.