0

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:

  1. 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
  2. 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      
    
  3. 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.

  4. 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...).

closed as too broad by PolyGeo Mar 21 at 9:07

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • For the record, the 100 record limit with ET GeoWizard or GeoTools is only present in the demo/unregistered version of the software. Once you purchase/register the software this limitation is removed. – Chris W Mar 28 '14 at 23:19
  • Hi Chris, I was not in a position to buy extra extensions that is why I didn't purchase it. Also, the fact that it breaks the hexagon in 24 was an extra complication. The tool "Polygon to Line" of the ArcInfo license has done a perfect job. – Greta Apr 1 '14 at 17:04
1

You did not specify you licence, but if you have ArcInfo you can do this easily using "polygon to line"

Polygon boundaries are split at nodes in the output line feature class.

The right and left polygon FIDS are written in the output line feature class. These IDs can be used to associate polygon attributes with each side of a line in the output feature class. The orientation of lines that make up a polygon cannot be controlled. The arcs along the outer boundary of each polygon are always drawn in a clockwise direction. By default, interior or island boundaries are drawn in a counterclockwise direction.

if you don't have arcinfo, you can use "planarize line" (in an edit session) to split you lines, then spatial join could help you recovering the attributes.

If you start from lines, I think that the union tool will also do what you want (using a single input), but I don't remember if this was possible with ArcGIS 9.3 (it works with ArcGIS10).

finally, the concatenation can be done with the field calculator

[field1] & "_" & [field2]
  • It has worked. It turns out I didn't have such a good license after all... So it has taken me more time to get it done. The tool you have mentioned worked perfectly and it gives the lines with the fields LEFT_ID and RIGHT_ID so the spatial joining was not necessary, using concatenate with both tables was enough to join them. Thank you very much for your help and sorry for the burden. – Greta Apr 1 '14 at 17:00

Not the answer you're looking for? Browse other questions tagged or ask your own question.