SDR Error

Hi, 

I tried to run the SDR model but it gave an ERROR such as;

ERROR 1: No PROJ.4 translation for source SRS, coordinate transformation initialization has failed 

image



I am a new user of InVEST model and unable to solve this error, please guide me how to solve this issue.

Thank you and regards, 
Tagged:

Comments

  • swolnyswolny Member, NatCap Staff
    Hi @Shedayi -

    Please post the log file that the model creates when you run it. It will be in the Workspace you specified, and is called something like InVEST-Sediment-Delivery-Ratio-Model-(SDR)-log-2018-03-03--16_02_58.txt. The log file contains a lot of additional information that might help us see what the problem is. Thanks.

    ~ Stacie

  • ShedayiShedayi Member
    Hi Stacie, 

    Thank you for the response. Here is the log file. 



  • RichRich Administrator, NatCap Staff
    Hi, your log file shows that you're passing a .lyr file in for the biophysical table. That parameter expects a csv file. But the error in that log file is not the one you described earlier. Does that fix your issue? Or if not, can you post your log that describes your PROJ4 error?
  • ShedayiShedayi Member
    Hi Rich,

    Thank you for the response. I used a CSV file for the Biophysical table. 
    But now again it gave Errors like;

    03/24/2018 10:22:59 osgeo ERROR [errno 4] `C:/Users/Arshad/Desktop/SDR/Biophysical table.csv' not recognised as a supported file format.

    03/24/2018 10:22:59 osgeo ERROR [errno 4] `C:/Users/Arshad/Desktop/SDR/watershed1/SJ.Basin.shp' not recognised as a supported file format.

    03/24/2018 10:22:59 osgeo ERROR [errno 4] `F:\SDR.Results' not recognised as a supported file format.

    03/24/2018 10:22:59 osgeo ERROR [errno 1] Unable to compute a transformation between pixel/line and georeferenced coordinates for C:/Users/Arshad/Desktop/SDR/DEM.Pak1/dem/dem.ovr. There is no affine transformation and no GCPs.

    03/24/2018 10:22:59 osgeo ERROR [errno 1] Unable to compute a transformation between pixel/line and georeferenced coordinates for C:/Users/Arshad/Desktop/SDR/LULCPak.2013/LULCPak1.tif.ovr. There is no affine transformation and no GCPs.

    03/24/2018 10:22:59 osgeo ERROR [errno 1] Unable to compute a transformation between pixel/line and georeferenced coordinates for C:/Users/Arshad/Desktop/SDR/R.factorMap/Rfactor.ovr. There is no affine transformation and no GCPs.

    03/24/2018 10:22:59 osgeo ERROR [errno 1] Unable to compute a transformation between pixel/line and georeferenced coordinates for C:/Users/Arshad/Desktop/SDR/Soil.Pak/Soil_PolygonToRaster11.tif.ovr. There is no affine transformation and no GCPs.

    03/24/2018 10:22:59 natcap.invest.sdr INFO calculating slope

    03/24/2018 10:22:59 natcap.invest.ui.model ERROR Exception while executing <function execute at 0x0DDFEAF0>

    Traceback (most recent call last):


    Attached is the log file. How to solve these Errors....? 


    Regards, 



  • swolnyswolny Member, NatCap Staff
    Hi @Shedayi -

    When you enter .tif rasters into the model, you need to provide the actual <input>.tif file, not .tif.ovr, etc.

    I believe that you can ignore the errors about SJ.Basin.shp not recognised as a supported file format, it's not actually a problem for running the model. 

    ~ Stacie
  • ShedayiShedayi Member
    Hi Stacie, 

    Thank you for the response. I checked using other input formats as well for the raster files but the model did not accept it showed: not a raster (with red cross sign), while the raster files with .tif.ovr, it accepts, but after clicking the run button, it gives the Errors mentioned earlier. 

    Any solution, please. 

    Regards, 
  • ShedayiShedayi Member
    Hi Stacie, 

    I also doubt about the Threshold Flow Accumulation value. How to select this value? Please guide me
  • swolnyswolny Member, NatCap Staff
    If you send or post your datastack, I'll test your inputs. The easy way to do this is through the SDR tool interface. 

    Go to File -> Save as
    Datastack type: Data archive

    Send it to swolny at stanford.edu.

    The threshold flow accumulation (TFA) value is used to create the stream network from the DEM. Higher values of TFA create a stream network with fewer tributaries, lower values of TFA produce more tributaries. The "correct" value is different for each place. It's the value that creates a stream network that is as close as possible to the real-world stream network in your area of interest. So you'll need to find a real-world stream map, compare it with the stream.tif output from the model, and adjust the TFA until the streams come close.

    ~ Stacie
  • swolnyswolny Member, NatCap Staff
    I just tried the datastack, and either it didn't save correctly, or there are multiple issues with the input file types. 

    It looks like you're entering fill_dem21.tfw for the DEM but you should be entering fill_dem21.tif
    Similarly, Rfctor2.tfw should be Rfctor2.tif
    Soil_PolygonToRaster11.tfw should be Soil_PolygonToRaster11.tif
    LULCPak1.tif.ovr should be LULCPak1.tif
    BasinStreamJoinLt.lyr should be a table of file type .csv

    Please verify that you're entering these correctly and let us know if that helps.

    ~ Stacie

  • ShedayiShedayi Member
    Hi, Stacie, 

    I have entered all raster files in .tif format and the Biophysical table a CSV table. I do not know, why the model saves previous wrong entry files always. When I return back to the SDR after some time it displays a previous entry. Anyhow, I am sending again, with the files entered as directed. Please check the attached file for the SDR interface. 

    Regards, 








  • swolnyswolny Member, NatCap Staff
    The model will save the inputs that were used in the previous run, if the model was actually run, and you checked the box that says "Remember inputs" that's on the screen saying "Are you sure you want to quit?" when you quit the model. If you don't actually run the model, it won't remember the new inputs. 

    One thing I see is that there are several folders with periods in the names, such as C:/Users/Arshad/Desktop/SDR.files/R.factorMap. Sometimes apps have trouble with this. Can you try changing the folder names to something like SDR_files/R_factorMap, and enter the inputs like you show them in the interface screenshot and try to run it again? If you get an error, please post the latest logfile. Thanks.

    ~ Stacie

  • ShedayiShedayi Member
    Hi 

    Stacie, 

    Yes, I run the model again it gives Error and didn't success to complete. 

    I am attaching the Log file here. 

    Please check it. 


  • swolnyswolny Member, NatCap Staff
    Hi @Shedayi -

    The error message says this:
    DatasetUnprojected: These datasets are unprojected set(['F:\\SDR.Results\\aligned_dem.tif'])

    So you need to check your input rasters to make sure they are all in the same projected coordinate system. If they are not (and it looks like the DEM is not), reproject them all to the same projected coordinate system and try again.

    ~ Stacie
  • ShedayiShedayi Member
    Hi Stacie, 

    All raster files have the same projected coordinates, although I will try changing the projections again. 



  • swolnyswolny Member, NatCap Staff
    If that doesn't work, how about zipping up all of your inputs and sending them to me. This time, don't use the SDR Save function, but do it manually, so we can get all of your related input files, not just the specific ones entered into the interface. That way I have all of the data to test it fully. Thanks.

    ~ Stacie
  • ShedayiShedayi Member
    Hi
    Stacie,
    Thank you for being a great help in this forum for me. I am sending a zipped file of the all SDR input files. 

    Best regards, 
  • swolnyswolny Member, NatCap Staff
    I just looked at your data, and they are not in a projected coordinate system, they are in a geographic coordinate system. The spatial data needs to be in a projected coordinate system such as UTM, not a geographic one like GCS_WGS_1984.

    Please find an appropriate projected coordinate system for your area, reproject the inputs and let me know if that helps.

    ~ Stacie
  • ShedayiShedayi Member

    Hi, Stacie, 

    I transformed all raster and vector files into the projected coordinate system and run the model, but again, it did not complete successfully. 

    The log file is attached here. Please check, what's wrong. 


    Regards, 

    Arshad 

  • RichRich Administrator, NatCap Staff
    Hi, the error message says that there's at least one raster or vector that doesn't overlap with the others. A common mistake is that the data sources have different projections but appear to overlap when you load them in a GIS tool. If you're sure you projected them correctly, I'd happily take a look if you want to zip up your rasters/vectors and Dropbox them to richsharp@stanford.edu.
  • swolnyswolny Member, NatCap Staff
    Rich, I have Arshad's data, I'll check it out. Arshad, no need to send it again.

    ~ Stacie
  • swolnyswolny Member, NatCap Staff
    The inputs are projected properly, but the watershed layer is a line vector, when it needs to be a polygon. Please consult the User Guide Data Needs section to make sure that your inputs are the correct format. Try using a polygon shapefile for the watershed input and let us know how it goes.

    ~ Stacie
  • ShedayiShedayi Member
    Hi, Stacie and Rich, 

    I converted the polyline file to polygon but still, it didn't work, it gave the same Error. 

    Log file is attached. 


  • swolnyswolny Member, NatCap Staff
    Hi @Shedayi -

    How did you do the conversion to polygon? Here's what I did to create a polygon that worked, and ran in the model with no errors:

    - Reclassified the DEM so all cells have a value of 1
    - Used Arc's Raster to Polygon tool to convert that to a single polygon
    - Assigned a ws_id field to the polygon

    ~ Stacie
  • ShedayiShedayi Member
    Hi, Stacie, 

    Thank you for this. I have also done but gave one Error. Actually, the watershed had projection problem. I retransformed it and ran the model. 
    Attached is the Log file. 

    Thank you and regards, 
  • swolnyswolny Member, NatCap Staff
    Does your watershed shapefile have a "ws_id" field? It looks like the model mostly finished, but might have had trouble aggregating the pixel results to the watershed shapefile.

    ~ Stacie
  • ShedayiShedayi Member

    Hi Stacie, yes it does. I run the model again and got the output files. A warming message displayed during the run. I am attaching the log file. Please check it again whether it is successful or any Error still there. 

    Secondly, as you said in your comment that " 

    - Reclassified the DEM so all cells have a value of 1
    - Used Arc's Raster to Polygon tool to convert that to a single polygon

    Can you email me those results to know the difference? 

    I think in USLE/RUSLE model the elevation, slope and length are vital in determining the LS factors. If all the cells in the DEM are reclassified to value 1, will not this affect the overall values of USLE and SDR? 

    Thank you and best regards, 

  • swolnyswolny Member, NatCap Staff
    edited April 12
    I did not use the reclassified DEM as input to the model, I only used it for the purpose of creating a watershed polygon, and I used that watershed polygon as the Watershed input. You're right that if I were to put a DEM with all 1s in it that it would produce terrible results. Attached is the watershed polygon that I used that ran successfully with your other input data.

    ~ Stacie
    Post edited by swolny on
  • swolnyswolny Member, NatCap Staff
    Shoot, it didn't take the zipfile - you can download the watershed here.

    ~ Stacie
  • ShedayiShedayi Member
    Hi, Stacie, 

    I run the model twice using both the watershed (with one polygon as you developed and with many polygons I already had) separately. Surprisingly, the final results and values in both the cases are exactly the same, but the runtime was much longer for multiple polygons as compared to with one and secondly, there were many more files (output) with the multiple polygons (watershed) run than with the one polygon (watershed) run. 

    This was indeed a new experience and learning. 

    Stacie, you are so kind and supportive. I am thankful to you for your time, patience and determination during this process. 

    Indeed I learnt a lot from mistakes and coming back to make the correction. 

    Cheers, 

    Best regards, 

    Arshad 














  • ShedayiShedayi Member
    Hi everyone, 
    In the SDR output files, I didn't find the "watershed_results_sdr.shp", as it is mentioned in the user guide manual as under; 
    watershed_results_sdr.shp: Table containing biophysical values for each watershed, with fields as follows:
    – sed_export (tons/watershed): Total amount of sediment exported to the stream per watershed. This should
    be compared to any observed sediment loading at the outlet of the watershed. Knowledge of the hydrologic
    regime in the watershed and the contribution of the sheetwash yield into total sediment yield help adjust
    and calibrate this model.
    * usle_tot (tons/watershed): Total amount of potential soil loss in each watershed calculated by the
    USLE equation.
    * sed_retention (tons/watershed): Difference in the amount of sediment delivered by the current watershed
    and a hypothetical watershed where all land use types have been cleared to bare soil.

    Please guide me why it is missing in the output (results) folder? 
  • swolnyswolny Member, NatCap Staff
    Hi Arshad -

    That's strange that the watershed results are missing, if the model completed successfully, without errors. Are you sure that there were no errors running the model? 

    ~ Stacie

  • ShedayiShedayi Member
    Hi, 

    Stacie yes I am sure, there were no errors and found all other results such as intermediate and final output, but didn't find watershed results (shp file). 
Sign In or Register to comment.