1 Reply Latest reply on Jun 14, 2018 8:55 PM by Zhouyi Zhang

    How to check if a point (lon/lat) in one data source is located at the same lon/lat in a Shapefile?

    Jason Kim



      Sorry for the clunky way of describing what I want to do in the title, hopefully I can make it clearer here.


      I have two data sources:


      - A shapefile that contains the lon and lat coordinates of every intersection, an object id for each, and the name of the intersecting streets (as well as other fields but I only care about these)

      - A csv that contains collision data including lon and lat coordinates of the collision, type of injury, etc.

      - these sources don't contain any fields in common to join on besides lon and lat and even this doesn't work properly since the decimal places used for the coordinates slightly differ between the two sources. For this reason, it is probably best to have both sets of coordinates be rounded to 4 decimal places to give some leeway. 


      I'd like to create a new field which labels a row (or collision event) in the csv as either being "At Intersection" or "Non-Intersection", using the shapefile's intersection coordinates as the lookup table. The idea here is that once this is set up, I could slice and dice the collision data better along whether a collision occurred near the intersection or in the middle of the block.


      If there is some obvious way of doing this that I may have missed, let me know -- I'm new to using geodata and data blending and appreciate the help.




      N.B. The csv contains a field called ACCLOC which is supposed to do the above, but it's unclear how accurate it is since it appears to be entered by human observation and there are a lot of null values. It's impossible to know what null here means in context (e.g. did the officer choose to not fill it out, is the location of the collision truly not known b/c it's unclear what happened, etc.)