I am creating a turnover map of species communities using R and ArcGIS 9.3.
As a summary, here are my main questions:
- How can I split hexagonal polylines into six lines?
- How can I dissolve identical lines into one line keeping the attributes from both?
Here is the long story:
I have an hexagonal grid as a polyline shapefile, in R I have calculated the Jaccard distance between each hexagon. The table looks like this:
hexid1 hexid2 jaccard A A 0 A B ab A C ac B A ba B B 0 B C bc C A ca C B cb C C 0
Each of the features in my shapefile has hexid as a field.
I think what I want to achieve is in several parts:
- Split my polylines into lines that keep the hexid, this should give me for each polyline two lines that are in top of each other but with different hexid
Somehow "dissolve" the lines that are geographically the same and obtain an attribute table similar to:
hexid1 hexid2 A B A C B A B C C A C B
Then for both the shapefile and my table I can create a field that concatenates both hexagones (hexid1_hexid2), that I can do it using R for the table and the "add field" function, plus the field calculator.
- That field/column that I have just created would be used as the index to join the table to the shapefile
For the task 1 I have tried ET GeoWizard but it is limited to 100 and each hexagon is not divided in 6 lines, but in 24, plus I have a limit of doing 100 hexagons each time, which I would be glad to avoid, if possible.
I also don't know how to "dissolve" the split lines by distance, I guess the distance is 0, or I could use something like "falls entirely in" as they will be identical.
Maybe I am asking for too much, but I am really frustrated because I cannot access my notebooks from 5 years ago (they are in another country...).