I have approx 73,000 locations. For each location, I need to know which of the other locations is within a 1km radius from it. I would like this result to be in a table (so perhaps using a PostGIS spatial database). This is so that I can create edges between these all locations that are within 1km of each other as part of a network analysis study.
If I understand you right this should be a job for a spatial database.
PostGIS for instance.
Then you can get a table with all combinations of locations that is 1km or less from each other.
The query could look something like:
SELECT a.id aid, a.geom ageom, b.id bid, b.geom bgeom, ST_Distance(a.geom, b.geom) dist FROM location_table a, location_table b WHERE a.id != b.id AND ST_DWithin(a.geom, b.geom,1000);
You can use a distance matrix. Most GIS programs have a tool to generate one.
To find the records that are within 1km of their nearest neighbor, you would set both the input and target point layers as the point layer you have referenced.
Set the measurement unit to km, set the algorithm to match to the nearest 2 points, save to a location, and run the tool. I say match to the nearest 2 point because, at least in QGIS, the tool will match a point to itself which would yield a false result. If the GIS you are using matches to a point to itself, the input and target IDs will be the same in the result. All of these can be removed. Of the remaining records, all the input IDs with a distance less than 1km are the records you are looking for.
To get this data into your original file you could use a table join.