Skip to contents

Get the Segment ShapeGraph connections

Usage

# S4 method for class 'SegmentShapeGraph'
connections(map)

Arguments

map

An Segment ShapeGraph

Value

A matrix with the connected refs

Examples

mifFile <- system.file(
    "extdata", "testdata", "barnsbury",
    "barnsbury_small_segment_original.mif",
    package = "alcyon"
  )
  sfMap <- st_read(mifFile,
    geometry_column = 1L, quiet = TRUE
  )
  shapeGraph <- as(sfMap, "SegmentShapeGraph")
connections(shapeGraph)
#> $backward
#>   [1] 0 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 0 0 1 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 0
#>  [38] 1 1 1 0 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 1 1 0 1 1 1 0 0 1 1 0
#>  [75] 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 1 1 1 0 0 1 1 0 0 1 1 0 0 0 1
#> [112] 1 0 0 1 1 1 0 0 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 0 0 1 1 0 0 1 1 0 1 1 0 1
#> [149] 0 0 1 1 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 1 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 1
#> [186] 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 0 0 0 1 1
#> [223] 0 0 1 1 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 0 0 1 0 0 1 0 1 1
#> [260] 0 0 0 1 0 0 1 1 1 0 0 1 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0
#> [297] 1 1 0 0 0 1 1 0 0 0 1 1 1 0 1 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 1 1 1 0 0 0 1
#> [334] 0 1 1 1 0 0 1 0 0 1 1 0 0 0 1 1 0 1 1 1 0 0 1 0 0 1 1 0 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-1 -1 -1  1 -1
#> [101]  1 -1 -1  1  1 -1  1 -1  1  1 -1  1 -1  1 -1  1 -1  1 -1  1  1 -1 -1 -1  1
#> [126]  1 -1 -1 -1  1  1 -1  1  1  1  1  1 -1  1  1  1 -1  1  1 -1  1  1 -1  1 -1
#> [151] -1  1  1 -1 -1 -1 -1  1  1 -1 -1 -1  1  1 -1  1 -1 -1 -1  1 -1  1 -1 -1  1
#> [176]  1 -1  1 -1 -1  1  1 -1 -1  1  1 -1  1 -1  1  1 -1  1 -1 -1  1 -1  1 -1 -1
#> [201]  1  1 -1  1 -1  1 -1  1  1 -1 -1  1  1  1 -1  1 -1  1 -1  1 -1  1  1 -1 -1
#> [226] -1  1  1 -1 -1  1  1 -1  1  1 -1  1 -1  1 -1 -1 -1 -1 -1 -1  1 -1  1  1 -1
#> [251] -1  1 -1 -1  1 -1  1 -1 -1  1 -1  1 -1  1  1 -1 -1  1  1  1 -1  1  1 -1  1
#> [276] -1  1  1 -1 -1 -1  1  1  1 -1 -1 -1  1  1 -1  1 -1 -1  1  1  1 -1 -1 -1  1
#> [301]  1 -1  1 -1  1  1 -1  1 -1 -1 -1  1 -1  1 -1  1 -1  1 -1  1  1 -1 -1  1 -1
#> [326]  1 -1  1 -1 -1  1  1  1  1 -1  1 -1  1  1 -1  1  1 -1  1  1 -1  1 -1  1 -1
#> [351] -1 -1  1  1 -1 -1  1  1 -1 -1  1  1 -1  1 -1 -1  1 -1  1 -1 -1  1 -1  1  1
#> [376] -1  1 -1  1 -1  1 -1 -1  1  1 -1 -1  1 -1  1  1 -1  1 -1 -1  1 -1  1  1 -1
#> [401] -1 -1  1 -1  1  1 -1 -1  1 -1  1  1 -1 -1 -1  1 -1  1 -1 -1  1  1 -1  1  1
#> [426]  1 -1  1 -1 -1  1 -1  1 -1  1 -1  1  1  1 -1  1  1  1 -1 -1 -1  1 -1  1 -1
#> [451]  1  1 -1  1  1 -1 -1  1 -1 -1 -1 -1  1 -1  1 -1  1 -1 -1 -1  1 -1  1  1  1
#> [476] -1  1 -1  1 -1  1  1 -1  1  1 -1  1 -1  1 -1  1 -1 -1  1  1 -1  1 -1  1  1
#> [501] -1  1  1  1 -1  1 -1 -1  1 -1  1  1 -1 -1  1 -1  1 -1 -1  1  1 -1  1  1 -1
#> [526]  1 -1  1 -1  1  1 -1  1 -1 -1  1 -1 -1 -1  1  1  1  1 -1  1  1 -1  1 -1  1
#> [551] -1  1 -1 -1  1 -1 -1  1 -1  1  1  1 -1  1 -1 -1  1  1 -1  1 -1  1  1 -1 -1
#> [576]  1 -1 -1  1 -1  1  1 -1  1  1 -1 -1  1 -1  1  1 -1 -1 -1  1 -1  1 -1  1  1
#> [601] -1  1  1 -1 -1  1  1 -1  1 -1  1  1 -1  1 -1  1  1 -1  1 -1 -1  1  1 -1  1
#> [626] -1  1 -1  1  1  1 -1 -1  1 -1  1  1 -1 -1  1  1 -1 -1  1 -1 -1 -1 -1  1  1
#> [651] -1  1 -1 -1 -1 -1  1 -1  1  1 -1  1 -1  1 -1  1 -1 -1  1 -1 -1 -1  1 -1  1
#> [676] -1  1 -1 -1 -1  1  1  1  1 -1  1 -1 -1  1  1 -1 -1 -1  1 -1  1 -1  1  1 -1
#> [701]  1  1 -1  1 -1 -1
#> 
#> $from
#>   [1]   0   0   0   1   1   1   1   2   2   2   2   3   3   3   3   4   4   4
#>  [19]   5   5   5   6   6   6   6   7   7   7   7   8   8   8   8   8   9   9
#>  [37]   9   9   9   9  10  10  10  10  11  11  11  11  12  12  12  12  13  13
#>  [55]  13  13  14  14  14  14  15  15  15  15  15  16  16  16  16  17  17  17
#>  [73]  17  18  18  18  18  19  19  19  19  19  20  20  20  20  20  20  21  21
#>  [91]  21  21  21  21  22  22  22  22  22  23  23  23  23  24  24  24  24  25
#> [109]  25  25  25  25  26  26  26  26  26  27  27  27  28  28  28  28  29  29
#> [127]  29  29  30  30  30  30  31  31  31  32  32  32  32  33  33  33  33  34
#> [145]  34  34  35  35  36  36  36  36  37  37  37  37  38  38  38  38  38  39
#> [163]  39  39  39  39  39  40  40  40  40  41  41  41  41  42  42  42  42  42
#> [181]  43  43  43  43  43  44  44  44  44  44  45  45  45  45  45  45  46  46
#> [199]  46  46  46  47  47  47  47  47  48  48  48  48  48  48  49  49  49  49
#> [217]  49  50  50  50  50  50  51  51  51  51  51  52  52  52  53  53  53  53
#> [235]  54  54  54  54  55  55  55  55  56  56  56  57  57  57  58  58  59  59
#> [253]  59  60  60  60  61  61  61  62  62  62  62  63  63  63  63  63  64  64
#> [271]  64  64  65  65  65  65  65  66  66  66  66  66  67  67  67  67  68  68
#> [289]  68  68  69  69  69  69  70  70  70  70  71  71  71  71  71  72  72  72
#> [307]  72  72  72  73  73  73  73  74  74  74  74  74  75  75  75  75  75  75
#> [325]  76  76  76  76  76  77  77  77  77  78  78  78  78  79  79  79  80  80
#> [343]  80  80  81  81  81  81  81  82  82  82  82  83  83  83  84  84  84  84
#> [361]  85  85  85  86  86  86  86  87  87  87  87  88  88  88  89  89  89  89
#> [379]  90  90  90  90  90  90  91  91  91  91  92  92  92  92  93  93  93  93
#> [397]  93  94  94  94  94  95  95  95  95  96  96  96  96  97  97  97  97  97
#> [415]  98  98  98  98  98  99  99  99  99  99 100 100 100 100 100 101 101 101
#> [433] 101 102 102 102 102 103 103 103 104 104 104 104 105 105 105 106 106 107
#> [451] 107 107 107 107 108 108 108 108 108 109 109 109 110 110 110 110 110 111
#> [469] 111 111 111 112 112 112 112 113 113 113 113 113 114 114 114 114 115 115
#> [487] 115 115 115 116 116 116 116 116 117 117 117 118 118 118 118 118 119 119
#> [505] 119 119 119 120 120 120 120 121 121 121 121 122 122 122 122 123 123 124
#> [523] 124 124 124 125 125 125 125 125 126 126 126 126 126 126 127 127 127 127
#> [541] 128 128 128 129 129 129 129 129 130 130 130 130 130 131 131 131 132 132
#> [559] 133 133 133 134 134 134 134 135 136 136 136 136 137 137 137 137 138 138
#> [577] 138 139 139 139 139 140 140 140 141 141 141 141 142 142 142 142 142 143
#> [595] 143 143 143 143 144 144 145 145 145 145 146 146 146 146 146 147 147 147
#> [613] 147 147 147 148 148 148 148 148 149 149 149 149 150 150 150 150 150 151
#> [631] 151 151 151 151 152 152 152 152 153 153 154 154 154 154 155 155 155 156
#> [649] 156 156 157 157 157 157 158 158 158 159 159 159 159 159 160 160 160 160
#> [667] 160 161 161 161 161 162 162 162 162 163 163 163 163 164 164 164 164 165
#> [685] 165 165 165 166 166 166 166 167 167 167 167 168 168 169 169 169 170 170
#> [703] 170 171 171 172
#> 
#> $ss_weight
#>   [1] 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1
#>  [38] 0 0 1 1 0 1 0 0 1 0 1 0 0 0 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0
#>  [75] 0 0 1 0 1 0 0 1 0 1 0 0 0 1 0 1 0 0 0 1 0 0 0 0 1 1 0 0 1 0 1 0 1 1 0 0 0
#> [112] 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0
#> [149] 0 1 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 1
#> [186] 0 1 0 0 0 0 1 0 0 0 1 1 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1 0 0 1 0 0 1
#> [223] 0 1 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0
#> [260] 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0
#> [297] 0 0 1 0 0 0 1 1 0 0 0 1 0 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 0 1 0 1 0 1 0 0 0
#> [334] 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 1 1 0 1 0 0
#> [371] 0 0 0 1 0 1 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 1
#> [408] 1 0 1 0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 1 0 0 0 0 0 0
#> [445] 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 0
#> [482] 1 0 1 0 1 0 0 0 0 1 0 0 1 1 1 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 0 1 1 0 1 0 0
#> [519] 0 0 0 1 0 1 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0
#> [556] 0 1 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 1 0 0 0
#> [593] 0 1 0 0 1 0 1 0 1 0 0 0 0 1 0 0 1 0 1 0 1 0 0 0 0 1 0 0 0 1 1 0 0 1 0 0 1
#> [630] 0 0 0 0 1 1 0 1 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 1 0 1 0 1 1 0 0 1 0 0 0 0 1
#> [667] 0 1 0 1 0 1 0 1 0 0 1 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0
#> [704] 0 0 1
#> 
#> $to
#>   [1]   1  99  31   2  46   0  99   3  17   1  46   4 106   2  17   5   3 106
#>  [19]   6 102   4   7  26   5 102   8  98   6  26   9  72  73   7  98  10  39
#>  [37]  40   8  72  73  16   9  39  40  12  23  29  30  13 110  11  23  14 113
#>  [55]  12 110  15 117  13 113  16  38  39  14 117  10  15  38  39  18  76   2
#>  [73]   3  19 102  17  76  20  25  26  18 102  21  97  98  19  25  26  22  71
#>  [91]  72  20  97  98  23  30  21  71  72  11  12  22  30  25 121 123 124  19
#> [109]  20  26  24 121   6   7  19  20  25  28 132  77  29  87  27 132  11  30
#> [127]  28  87  22  23  11  29  32  74   0  33  88  31  74  34  47  32  88  35
#> [145]  33  47  83  34  37  68  53  54  38 138  36  68  15  16  39  37 138   9
#> [163]  10  40  15  16  38  73   9  10  39  42 139  84  85  43  48  49  41 139
#> [181]  44  86  42  48  49  45  92  93  43  86  46  75  76  44  92  93   1   2
#> [199]  45  75  76  48 118 119  33  34  42  43  49  47 118 119  50 140  42  43
#> [217]  48  51 133 134  49 140  52 131  50 133 134  60  51 131  36  54  67  68
#> [235]  55 116  36  53  56 143  54 116 109  55 143  58 103 104  59  57  60  61
#> [253]  58  59  61  52  62  59  60  63  77  78  61  64 153  62  77  78  65 125
#> [271]  63 153  66 147 148  64 125  67 130  65 147 148  53  68  66 130  36  37
#> [289]  53  67  70  95 136 137  71 158  69  95  21  22  72  70 158   8   9  73
#> [307]  21  22  71  40   8   9  72  75  99 100  31  32  45  46  76  74  99 100
#> [325]  17  18  45  46  75  62  63  78  27  79  62  63  77  80 150  78  81 159
#> [343]  79 150  82 107 108  80 159 105  81 107 108  84 120  35  41  85  83 120
#> [361] 103  41  84  87 137  43  44  28  29  86 137  89  32  33  90 164 165  88
#> [379]  91 166 167  89 164 165  92  90 166 167  44  45  93  91  94 145  44  45
#> [397]  92  95 136  93 145  69  70  94 136  97 122 144 145  20  21  98  96 122
#> [415]   7   8  20  21  97  74  75 100   0   1 101 154  74  75  99 156 157 100
#> [433] 154   5   6  18  19  57 104  85 105 107  57 103  82 104 107   3   4  81
#> [451]  82 108 104 105 109 163  81  82 107  56 108 163 111 112 113  12  13 127
#> [469] 110 112 113 110 111 113 128  13  14 110 111 112 115 162 151 152 116 142
#> [487] 143 114 162  54  55 115 142 143 168  14  15  47  48 119 169 170 120 139
#> [505]  47  48 118  83  84 119 139 122 124  24  25  96  97 121 124  24 124 121
#> [523] 122  24 123 126 146 147  64  65 127 129 130 125 146 147 111 126 129 130
#> [541] 129 146 112 126 127 130 128 146  66  67 126 127 129  51  52 171  27  28
#> [559]  50  51 134 135  50  51 133 134  69 137  94  95  86  87  69 136  37  38
#> [577] 168  41  42 119 120 171  49  50 142 161 148 149 115 116 143 141 161  55
#> [595]  56 115 116 142  96 145  93  94  96 144 125 126 147 128 129  65  66 148
#> [613] 125 126 146 141 149  65  66 147 160 161 141 148 151 159 160  79  80 114
#> [631] 152 150 159 160 162 163 114 151  63  64 155 157 100 101 167 154 157 101
#> [649] 157 164 154 155 101 156 172  70  71 150 151 160  80  81 149 161 150 151
#> [667] 159 141 142 149 160 152 163 114 115 108 109 152 162  89  90 165 156 169
#> [685]  89  90 164  90  91 167 170 155  90  91 166 138 117 118 170 165 166 118
#> [703] 169 131 140 158
#>