I am a R user but I couldn't do this on R and decided it might be easier on ArcMap but I don't know how to use it that well.

I have two shapefiles for same county, one of them has 360 features but attached to a long distance of a road, other one 7345 features but short roads. Example; let's say there is a major artery speed limit range 30-55 in 10 miles. So they separated this road 25 pieces in one shapefile, other one has the volume of road for 10 miles there is only one feature.

class       : SpatialLinesDataFrame 
features    : 7162 
extent      : -84.70612, -83.98041, 30.27399, 30.68428  (xmin, xmax, ymin, ymax)
crs         : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0 
variables   : 52

class       : SpatialLinesDataFrame 
features    : 376 
extent      : 143516.4, 213981, 3353367, 3399153  (xmin, xmax, ymin, ymax)
crs         : +proj=utm +zone=17 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0 
variables   : 22

class       : SpatialLinesDataFrame 
features    : 7538
extent      : 143511.3, 214019.4, 3353367, 3399153  (xmin, xmax, ymin, ymax)
crs         : +proj=utm +zone=17 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0 
variables   : 75

I want to combine these two files, they have different proj4.

I merged them on ArcMap, I have 7538 features and uses Line2. but volume is only available 376 location when I read it on R.

Is there a way carry information on Line2 to Line1 since it has more features and speed changes on a lot of locations but volume is same. if i can add volume in that location, would be amazing.

Getting information from one shapefile to another using QGIS is not helping me.

  • 1
    Look at spatial join tool? – Hornbydd Oct 4 '19 at 21:58
  • I tried that and it gives the columns but shows as zero. Join data-> each line will be given all the attributes. – iHermes Oct 4 '19 at 23:25
  • reproject both layers in the same CRS before doing the spatial join – Léo M Oct 5 '19 at 14:24
  • @LéoM how can I do that? – iHermes Oct 5 '19 at 16:05
  • 1
    ArcToolbox > Data Management Tools > Projections and Transformations > Project – Léo M Oct 5 '19 at 17:20

As @LeoM says in the comments, Project one layer first, then you can Merge the two files. You might want to also look into Dynamic Segmentation as a cleaner way to store speed limit data then breaking the road into a bunch of separate line features.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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