ReprojectImage

Hello!

I am running the nutrient retention model and have two questions:

1) A good bit of time is being taken up by a process that looks like "ReprojectImage" in the message log. I tried feeding in a layer with a different projection on purpose just to see what would happen, and I got a warning right away. I am not getting this same warning message when I input my real (same projection) inputs, so I am pretty sure they really do have the same projection.

Do you know if this ReprojectImage process indicates that there is some problem?

2) I also get a warning message that looks like: "no flow direction found for 0 1" etc. up to 0 15. What do these numbers represent? I am wondering if they are cells on the edge of my DEM, or if there may be something wrong with my DEM. 

Thank you!!!

Keri

Comments

  • DougDoug Administrator, NatCap Staff
    edited January 2016
    Hi Keri,

    As per your first question, that function can take a bit of time depending. How big are the inputs you are using? What's the resolution on your files? Do you think you could attach the log file generated by the model run to this thread? The log file can found in the workspace directory.

    As for the second question I'll punt that to @Rich

    Cheers,

    Doug

    Post edited by Doug on
  • RichRich Administrator, NatCap Staff
    Hi Keri, ReprojectImage is used in part to align all the raster and rasterized inputs to be the same projection, dimentions, and cell size.  This can take some time if the rasters are large, or the raster to snap to is large.  For example, say your landcover map is 1k X 1k at 30m but your dem is at 30k X 30k at 1m; InVEST will resample the landcover map to the DEM and you'll see a lot of long waiting calls to ReprojectImage.  In short, it's not an error, but can be expensive if input data are large.

    The flow direction errors occur when the routing algorithm can't determine a flow direction for a non-nodata pixel.  The coordinates given are [row, column] format with the upper left hand corner starting at 0.  In pratice I've seen a fair number of DEMs that have non-nodata values in the upper left hand corners whereas the rest of the DEM is masked by a watershed or something.  It's unlikely to affect your results, but if you are curious you can take a look at those pixels in your DEM and make sure there's not something strange happening there.
  • Thanks both of you!

    I thought that might be what reproject image was doing, and was confused because I had controlled the projection, cell size, cell alignment etc. of my inputs using environments settings in arc... I think I've determined that all of this reprojectinghappens because my inputs didn't all have exactly the same edges: I ran the model on a subwatershed in the interior of my original area of interest, and I got no "reproject" messages, and it ran SO much faster. 

    I have now corrected all of my rasters so they have exactly the same edges, except for the DEM. I hadave buffer around the DEM (so that it is a bit larger than all other layers), to avoid weird edge effects. Should I keep this buffer of clip the DEM to match the extent of my other layers?

    Thank you both very much!

    Keri
  • RichRich Administrator, NatCap Staff
    Hey Keri, if you want to have a rippin' fast run, then keep the rasters all the same dimensions, cell size, and bounding box.  But if you're concerned about edge effects for whatever reason, maybe you can make a buffer around the other rasters?  You could also try a downsampled set to see if this has any effect.

    At any rate, this is an aspect of InVEST we don't face front because we care first that the result is a correct representation of the underlying mathematics that model the real world processes on raw data.  It would be a shame if your jiggered your data to run InVEST faster but ended up with an inaccurate result.  Make sense?
  • Makes sense! I am a ok with a slow run, just wanted to make sure the need for re-projections wouldn't have any real adverse effect....
  • One more question!

    It looks like the users guide for the nutrient delivery model has been taken down, and I see that the nutrient delivery ratio model guide is up. Is there a way I can get back to the users guide, or alternatively go ahead and start working with the nutrient delivery ratio model?

    Thanks!

    Keri
  • jdouglassjdouglass Administrator, NatCap Staff
    Hi Keri,

    If you would like to take a look at the documentation for the nutrient model for the version that you are running, there's a link to the documentation in the nutrient model's UI:
    image

    You can also find the documentation in the InVEST installation directory under "documentation/index.html", or else as a PDF in the installation directory.

    Alternatively, if you would like to start using the NDR model, it's available in our latest development build: http://data.naturalcapitalproject.org/invest-releases/3.3.0a1.post231+n32cbff471949/InVEST_3.3.0a1.post231+n32cbff471949_x86_Setup.exe and will be officially released in the next version of InVEST.
  • RichRich Administrator, NatCap Staff
    Also just a comment so it's a little more obvious what's going on.  The link to documentation on our main website is the latest development build of that documentation.  That'a a decision by natcap staff to allow us to fix issues with the users guide without needing to release a new version of InVEST every time.  The downside of that is that developmental changes like upcoming models or model deprecations are reflected in that guide.  In this case, the nutrient model will be depreciated in the next InVEST release to be replaced with NDR and we were updating the documentation in anticipation of that change.  Specifically, I removed that chapter a couple of days ago and removed the references to NDR being an unstable model.

    James points out directly how to link to the model documentation associated with that release in the UI.  And also note we archive the major versions of the user's guide (and InVEST) along this link: http://data.naturalcapitalproject.org/invest-releases/documentation/3_2_0/ although the original 3.2.0 documentation has been updated in a bunch of places since then.

    And yes, awesome if you'd like to start using the NDR model.  We've been using it internally for months and it is quite ready for public release.  Use the link provided by James above for the latest as of Feb 16th and also note the nutrient model is removed from that build.  :)

Sign In or Register to comment.