I am trying to find the best way to turn some representation of a line based on 2 pairs of xy coordinates into ascii format in order to extract habitat information associated with used versus randomly generated animal movement paths.
I have approximately 33,000 observations (trajectories) to process and at least 5 expanatory matrices to consult so I am necessarily seeking the most parsimonious method possible. At present I have considered numerous possibilities: 1. Using basic trigonometry, generate points along each trajectory at an optimal uniform distance apart (roughly equal to pixel resolution) and use "x" & "y" values to spatially locate the correct cell in the ascii grid with which to populate a new object (my function, which seems to work fairly well but takes time and difficult to handle if buffers are required). 2. Create lines in ArcGIS using start and end points, buffer lines, then use "Thematic Raster Summary" in Hawth's Tools to generate a frequency table of habitat types (also long, involves a lot of clicking and creates a lot of files) 3. Using the xy points my function generated I can use buffer.line() in adehabitat to iteratively turn a more-or-less continuous line of points into a buffered pixelized line in ascii, but this still still a very time-consuming process as each observation can take numerous minutes depending on step length. 4. Using another method I haven't yet discovered, somehow iteratively create a binary ascii grid for each observation using x1y1 and x2y2 which can then be multiplied against the output grid based on the explanatory grid's coordinates. It should be stated that the reason I cannot just turn my entire dataset into ascii binary format (0, 1) is that there is too much overlap in the trajectories and I would only be able to retain one unique value per pixel, thus losing valuable information. One final option is if there were a way to import line shapefiles directly from ArcGIS into R in ascii format, but this seems to only work for polygons (readShapePoly) and likely points. Any leads? Tyler [[alternative HTML version deleted]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo