Select to view content in your preferred language

Connecting information of elements of one layer to elements of an other layer

4007
3
Jump to solution
01-23-2015 05:43 AM
AndreasGriessbach
Occasional Contributor

Hallo dears,

I ran up against my limits so I need some help and I hope I'm right here.

I have some segments painted (streets) in a map. This is my first layer. In a second layer are some accidents. I imported them (the coordinates were given in several columns) from an excel-table. In another column of the excel-table is the accident-ID (Un-Key … please have a look to the attachment).

Now it is necessary for me, to know which accidents are on which segment. So at its best, I need the accident-IDs in the Attribute Table of the streets. Therefor I add 15 further columns to the Attribute Table of the streets (for 15 potential accidents within a segment). But know I don’t know if it is possible and how it is realizable to connect the accidents to the Attribute Table of the street-segment-layer. Of course, I can’t insert the IDs by hand (I am 32 years old and I won’t do it for the rest of my life)

I would be very thankful if anyone has an idea to solve my problem.

I attached the files of my project in an zip-file and. I hope It will helps you.

If you need any further information please feel free to ask me.

Thanks by now!!!!!

Andreas

p.s. using ESRI ArcMap 10.0. (Win 7, 32 Bit)

0 Kudos
1 Solution

Accepted Solutions
TedKowal
Honored Contributor

Andreas,

I can give you a methodology to get you started.  It is not the best, but it uses the tools that come with ArcGIS and no added programming...

Looking at your data the only link between your accidents and the road is a coordinate value.  Some of these fall greater than 55 meters away from the nearest road so any relationships made between the two datasets will still need to be checked for correctness especially those points that are the greatest distance from you road as well as those close to intersections.  Having a road-name or identifier with your accidents would make this process much easier, however as GIS folks we have to work with what we have

First of all it is not a good practice to place fields for 15 accidents on your road layer.  I removed these fields and copied your road layer to a shape called RoadSeg.  The goal is to create a link between your accidents and the road layer and use a join to bring the information together!  I will be using the FID or the road layer to make this linkage between the road and accidents (Best practice would be to create your own unique Identifier for your road segments ones that don't change)  You cannot guarantee that the FID will not change for a segment.

I then exported your accident data to a shape file and added a field called SegID (We will populate this with the FID of the Road Segment).

I then used the Toolbox Tool Near  Toolbox/Analysis Tool/Proximity/Near

Using the Accident points as input and the near RoadSeg with a search radius 60 meter (Much too big accident coordinate may not be accurate).  This created two field in the accident shape called Near_FID (RoadSeg FID) and the Near_Dist (the distance away the point was located from the road...

Now you have everything you need to join the accidents to the road segments...(you can populate the SegID field of the Accidents with the Near_FID of the roads)

Join.png

Hope this helps getting you going without manually inputting all those accidents!

View solution in original post

3 Replies
TedKowal
Honored Contributor

Andreas,

I can give you a methodology to get you started.  It is not the best, but it uses the tools that come with ArcGIS and no added programming...

Looking at your data the only link between your accidents and the road is a coordinate value.  Some of these fall greater than 55 meters away from the nearest road so any relationships made between the two datasets will still need to be checked for correctness especially those points that are the greatest distance from you road as well as those close to intersections.  Having a road-name or identifier with your accidents would make this process much easier, however as GIS folks we have to work with what we have

First of all it is not a good practice to place fields for 15 accidents on your road layer.  I removed these fields and copied your road layer to a shape called RoadSeg.  The goal is to create a link between your accidents and the road layer and use a join to bring the information together!  I will be using the FID or the road layer to make this linkage between the road and accidents (Best practice would be to create your own unique Identifier for your road segments ones that don't change)  You cannot guarantee that the FID will not change for a segment.

I then exported your accident data to a shape file and added a field called SegID (We will populate this with the FID of the Road Segment).

I then used the Toolbox Tool Near  Toolbox/Analysis Tool/Proximity/Near

Using the Accident points as input and the near RoadSeg with a search radius 60 meter (Much too big accident coordinate may not be accurate).  This created two field in the accident shape called Near_FID (RoadSeg FID) and the Near_Dist (the distance away the point was located from the road...

Now you have everything you need to join the accidents to the road segments...(you can populate the SegID field of the Accidents with the Near_FID of the roads)

Join.png

Hope this helps getting you going without manually inputting all those accidents!

AndreasGriessbach
Occasional Contributor

Dear Ted,

I am really sorry for my late response. I was not in the office for the last two days, but the first think I did this morning was to try out your suggestions.

But now first thank you very, very much for the well explained proceed. And that’s why I am a little bit dissatisfied with me, because you take so much time for checking out and explaining an my thanks come so late.

Everything is fine! I need some minutes this morning to find all tabs and buttons but at the end all data are together know! My original table has some columns more. That means there is an unique ID. 

Once again. Thank you!!! With your help I discovered a new field of possibilities of ArcMap and I am sure I can use your helping suggestions in the future many times.

Have a nice day. I will now have one.

Andreas

0 Kudos
TedKowal
Honored Contributor

No problem!  We all started new to the GIS Field and received help.  My background is not computers or GIS, I am a Structural Engineer -- but I had to learn GIS and Programming....  I receive lots of help from this site from some very smart and intelligent people.  So I help others out when and if I can.

Thanks for your gracious comments!

0 Kudos