Hi everyone,
I had the same problem when I was doing this. In my case, it was due to possibility 2. A few of my dots fell within the no-value areas of the raster. I used the Add control points tool in the georeferencing toolbar to move my initial polygon data layer slightly to one side and then repeated steps 6-13. This worked for me.
I hope this helps,
Antonella
Hi Ewan,I'll need to have a think about what might be going on here, but there are two quick possibilities you can try. The first is to double-check the projection/coordinate system of your St. Kilda data layer (just to make sure it's in the same one as the raster data layer and the data frame you're doing everything in). You can do this by right clicking clicking on the name of the data layer in the TABLE OF CONTENTS window and selecting PROPERTIES. The information can be found under the SOURCE tab, and then check the projection/coordinate system of the data frame. However, by the sounds of it you've already checked this as a possibility and ruled it out.The second one is to make sure that yoru St. Kilda location falls within a grid cell with a value of one in your raster data layer. It may be that your point falls in a grid cell that has a no data value (since it's a point on land), which would cause problems when you run the COST DISTANCE tool. If this is the case, you'd need to make sure that the point marking the locations of St. Kilda falls in a cell with a value of 1. This can either be done by moving it slightly to one side, or by removing the polygon that represents St. Kilda before you make the raster data layer in step 6.Try looking into this second possibility, and let me know if this makes any difference. In the mean time, I'll see if I can think of any other possible reasons (although I'm teaching all week so I might not get round to this until the weekend - is this too late for you?).If anyone else has any suggestions, feel free to pitch in with them.All the best,Colin--
On Tuesday, November 6, 2012 12:51:37 PM UTC, Ewan Edwards wrote:Hi Colin,
The description here is excellent, however I seem to be hitting a brick wall at point 10: i.e., when I try to calculate the cost distance from all raster cells to my point (in this case, a single point at St Kilda), the output raster values are from 0 to 0.
Please see attached screenshots:
The area of my raster, and point location to calculate distances to, in North Pole Lambert Azimuthal Equal Area projection
A screen shot of step 10 from your instructions.
The resulting raster, with values from 0 to 0 and unable to view its attribute table
I look forward to hearing from you if you think you can help!
Ewan-- ======================================================================
You received this message because you are subscribed to the "GIS In Ecology Forum" discussion group (http://www.gisinecology.com/GIS_in_Ecology_forum.htm).
To control how often you get emails from this group, go to http://groups.google.com/group/gis-in-ecology-forum/subscribe (you will need to log on to get to this page).
To post to this group, either log onto the group's home page or send an email to
gis-in-eco...@googlegroups.com.
The rules for posting to this group can be found here: http://groups.google.com/group/gis-in-ecology-forum/browse_thread/thread/df31a0822742203f#.
To unsubscribe from this group, email:
gis-in-ecology-f...@googlegroups.com
All information on this forum is provided on an 'as is' basis. GIS In Ecology is not responsible for checking the accuracy or suitability of any posting or response.
======================================================================
Hi Antonella,Thanks for ths posting. Since you have a large number of locations that you want to get distances to, I would suggest the following:Firstly, create a new empty folder on yoru C:/ drive where you will save all your data layers (your going to end up with a lot of them, so its best to keep them al in once place otherwise things will get messy).Next, follow the instructions up to step 7 of the original version (this creates your grid that identifies which areas are in sea and which are not), and then follow these slightly ammended ones.8. Add a point data layer with all your locations and transform it into the appropriate projection/coordinate system.9. Separate your point data layer within all your locations into individual feature data layers so that you have just one location in each new data layer. To do this, first make sure that each data point has a unique ID number associated with it (this needs to be a whole, positive integer - if you don't have this, it's best to add it before you add your point data layer). You can then split your data layer based on this unique ID number. There are a number of possible tools for doing this. The one I would recommend would be in Geospatial Mocdelling Environment (see http://www.spatialecology.com/gme/splitdataset.htm) if you are using ArcGIS 10, or the Split Vector Layer By Unique Value Field in Hawths Tools if you are using ArcGIS 9.3. If you want to do it all in ArcGIS itself, you can find scripts that will help at http://resources.arcgis.com/gallery/file/geoprocessing/details?entryID=37AEB018-1422-2418-A036-CA6D9920F808 (for ArcGIS 10) and http://arcscripts.esri.com/details.asp?dbid=14127 for ArcGIS 9.3. I haven't used these scripts myself as yet, and you may find that there is an upper limit to the number of new data layers you can create from the original data layer. If this is the case, break your data down into smaller sets before applying the tool. Make sure all the new data layers you create are saved to your empty folder on your C:/ drive10. The next step is to use the COST DISTANCE tool to create the distance rasters to each point. However, unlike in the original step, you will use batch processing. Batch processing allows you to run a tool repeatedly without having to be sitting in front of your computer. To do this, in the ArcToolbox window, select the COST DISTANCE tool but don't open it. Instead, right-click on it to open the COST DISTANCE Batch grid. In this grid, select the data layer with your first location (and only that location) in it under the INPUT RASTER OR FEATURE SOURCE DATA LAYER. If this data layer is not loaded into your GIS project (and it doesn't have to be), right click on the box for this field and select BROWSE. Once you have selected the right point data layer for your first location, select the raster data layer created in step 7 under INPUT COST RATSER. Finally, select where you want to save your distance raster data layer, and what name you want to save it under, in the OUTPUT DISTANCE RASTER field (make sure that they are saved in the folder that you are using for this process and that the name is the Unique ID for that specific location) . Now you need to repeat this for every other point data layer with a location in it. Finally, before you run the tool, you need to set the extent of the data layer you wil create. Click on the ENVIRONMENTS button at the bottom right of the tool window and select teh PROCESSING EXTENT so that it is the same as the raster created in step 7. Finally click OK to batch run the tool. With a lot of locations this may take a long time and it can be best to set it running in the evening and come back to it the next day (but make sure that you have changed the settings on your computer so it doesn't go into hibernation if it senses you are not there for too long!).11. You now need to extract the values from all these cost distance rasters to your original points. This is done with the SAMPLE tool (SPATIAL ANALYST TOOLS> EXTRACTION> SAMPLE). Select all your cost distance raster data layers created in step 10 as the INPUT RASTERS (if they are not loaded into your GIS project, you can browse to them to select them from where they are stored). Once they are all loaded in, select the point data layer with all your locations in it (this has to be the one that is in the projection/coordinate system you are using for your project) for the INPUT LOCATION RASTER OR POINT FEATURE section of the tool window. Now set it to save the table that will be created in the appropriate folder by filling this information in in the OUTPUT TABLE section. Finally, click OK to run this tool. This will produce a table with the location ID numbers (as reflected in the name of each raster data layer) along the top, and with each row reflecting a different location. The values in the cells will then be the distance between each individual pair of points. Again if you find that you reach the maximum number of layers you can process, break it down into smaller batches.12. Check that this process has worked properly by checking that the distance from each point to itself is zero.13. Now you need to convert these values into the actual distances. This is done by opening your table in something like Excell 2007 or later (not Excell 2003 as it can't handle more than 256 fields). Add a new sheet and then apply the conversion formula (se the original step 11) to convert the values in the first sheet into the correct values in the second sheet (this formula will look something like =Sheet1B2 * Converstion Factor for cell B2).This should give you the required table with the distances between all the locations. if you need the information in a different arrangement, you can create a macro in Excell to help you do this. It won't necessarily be quick, but by using the batch processing, you can run a lot of it while you are doing something else.Let me know if this works (or indeed if it doesn't - I can see if I've missed something out or got something wrong as I'm writing this without having tried it out in full myself so the instructions may need some tweaking). Similarly, if anything is unclear, let me know and I can try and clarify it.Good luck!All the best,Colin
On Wednesday, June 27, 2012 10:49:14 AM UTC+1, Antonella wrote:Thanks for the information! I tried it for 1 point and it was very useful. However, I'm having trouble with this process because I have many locations (over 500) and I need to measure the distances among all of them. Could you elaborate on how I can" create a tool to do this process automatically and batch process all my locations"?The end result I need to obtain is an output table (like the one given by the point-distance tool) of all the distances among points, calculated only through water.Thank you for your help.
Hi Colin,
Thank you for your prompt reply. I am having difficulty in achieving a final result of some cost paths (or what I am really after is the lines that the cost distance is being measured by to plot on my map). I have been using the batch file method, but for this purpose I have tried using the normal one off method of simply opening the tool with a double left click. I presume in the “Input raster or feature source data” section I would navigate to my source data all points? “Input Cost raster” would be for argument sake point No.1 cost raster?
Then for the Cost path calculation for point No.1 to all other points the “Input raster or feature destination data” would again be the all points shape file (point file) with destination field referring to the No. of each point in question (1 thru 85) then the “input cost distance and input cost backlink raster areas would be for the respective rasters for point No. 1 that have been calculated earlier?
I presume the path type should be for each cell?
One problem I am facing using this whole method is however that the original distance table (that I get from step 11 in your methodology) seems to be reporting distances with errors of around 20 km out for points that should be around 600m apart with straight lines (not going around any land) and around 11km out when going around land and around 137 Km apart. Could this is comparing table lengths with the measure tool snapping to points in ArcMap. The data is projected to GDA94 mga ZONE 55 south (so distance are natively in metres). I presume differences in calculated versus measure with measure tool could be because of calculated can only go N,E,S,W and not diagonally through the raster cells using the cost distance tool?
Thanks in advance,
Rory
Thanks in advance,
Rory
Hi Kathryn,
Sorry to take so long to get back to you on this. However, it’s a relatively complex problem and I needed a bit of extra time to think about it.
If you were working with a species where there was a simple invasion front, this would be relatively straight forward. However, since your species distribution is more of a mosaic, it makes things a bit more complicated.
I’m going to assume that you have a point data layer of where the species was recorded along each transect. In the original instructions here, it assumed that you were starting with a single point location. However, you can also use a data layer with multiple point locations as your starting point. Thus, if you start by creating a cost distance raster layer based on all the locations where the species was recorded in your first year (2003). You’d then repeat this until you have cost distance raster data layers based on the locations where the speies was recorded in each of the other years.
Next, starting with the points where your species was recorded in 2004, use the EXTRACT MULTI VALUE TO POINTS tool (SPATIAL ANALYST TOOLS> EXTRACTION> EXTRACT MULTI VALUE TO POINTS) and extract the cost distance values for the raster data layers for all the other years. This will give you a matrix of the minimum distance between each location where the species was recorded in 2004, and where it was recorded in all other years. You can then sort the data descendingly based on the distances for eaech year, and read off the maximum value. This will tell you the longest by sea distance between a presence point in 2004 and in each of the other years. Repeat this for all other years.
Now, there’s a couple of things you need to be aware of here. Firstly, this is makig an assumption that a new location was colonised from the nearest other location occupied in the previous year. This may not be biologically valid, and because of currents and tides, and you might find that the actual colonisation locations differ from the nearest ones. This means your maximum colonisation distances could be an under-estimate.
Secondly, the greatest distance travelled is just a single measurement, and as such it is potentially vulnerable to biases from the presence of outliers. As a result, you might be better using something like the average of the longest five distances moved, or something similar.
As an alternative to just measuring distances travelled, you might also want to consider doing something like a kernel analysis (again using barriers). This would allow you to identify which areas have been occupied throughout all the years and which new areas have been occupied in successive years. Kernel density estimates have traditionally been done on data from individual animals, but there’s no reason why you cannot do it for individual species. You can find out about using kernels on this posting here: https://groups.google.com/forum/#!searchin/gis-in-ecology-forum/home$20range/gis-in-ecology-forum/k13R3rNpXts/A5mV4C_HkWEJ
Anyway, I hope this helps, and if you have any further questions, or if any of this isn’t clear/doesn’t work, just let me know.
All the best,
Colin
Hi Colin,