Notifications
Clear all

Merging CSV Files

12 Posts
8 Users
0 Reactions
4 Views
(@spledeus)
Posts: 2772
Registered
Topic starter
 

Is there an app that will merge two CSV files with points overwriting the duplicates?

 
Posted : September 23, 2013 5:26 pm
(@bl-hindman)
Posts: 103
Registered
 

I use my old Ranger 200t with survey pro to do this all the time....

It will ask if you want to overwrite or renumber.

It's an ascii file in the data collector, just change the extension to .csv when you copy to your computer.

LATER

 
Posted : September 23, 2013 5:35 pm
(@spledeus)
Posts: 2772
Registered
Topic starter
 

I am taking the Carlson SurvNet output "CSV ASCII NEZ with std. errors" and attempting to merge it with another. I found no option to export every point from a project and the output only exports the modified points. SurvNet only allows for one CSV to be input, alternatively one could convert this to RW5 format but the standard errors would be more convoluted to input than merging two files.

These CSVs are in the form of:
P,N,E,Z,D,N',E',Z',D',D
Point, Northing, Easting, Elevation, Error N, Error E, Error Z, Error Direction, Description.

 
Posted : September 23, 2013 6:17 pm
(@jimcox)
Posts: 1951
 

Are you any good at programming?

There is a very handy scripting tool called AWK which is designed for manipulating text files. The good people at GNU produce a free version called GAWK (google it)

It would take about six lines of AWK code to do what you need.

 
Posted : September 23, 2013 6:27 pm
(@willaus)
Posts: 47
Registered
 

SOLVING WITH EXCEL
_______________________________________________

Copy and Paste the CSV's into ONE excel sheet.
MAKE SURE THE DATA YOU WANT TO KEEP IS IN THE TOP CELLS

*Make sure the Point number are in the same columns for both sets of Data.

Select the column with the Point Numbers.

Go to the Data tab.

Go "Remove Duplicates"

A new menu will appear choose "expand selection" and Remove Duplicates

Another menu will appear ( make sure that "my data has headers" is unticked )
This will change your options into columns ( A B C )

UNTICK ever column except the column that contains the Point Numbers

Click OK

This will output a menu saying how many duplicates have been removed.It will remove all data with in the duplicates row ( perfect for multiple columned data E.g. std's get deleted

 
Posted : September 23, 2013 11:05 pm
(@jimcox)
Posts: 1951
 

This will work with Excel 2010

But it is not in the 2003 version (which I prefer, old fart that I am)

The older versions do have a "unique records only" option on the "advanced filter" tab - but it will treat any difference in XYZ or Spledeus's error values as separate records

 
Posted : September 23, 2013 11:38 pm
(@christ-lambrecht)
Posts: 1394
Registered
 

thanks for this handy tip!
:good:

 
Posted : September 24, 2013 12:31 am
(@ladd-nelson)
Posts: 734
Registered
 

If multiple CSV files were imported into a Carlson CRD file, would the Carlson Points -- Point Utilities -- Duplicate Points (with the "Delete Duplicates" option enabled) get you what you need?

 
Posted : September 24, 2013 5:11 am
(@kris-morgan)
Posts: 3876
 

> Is there an app that will merge two CSV files with points overwriting the duplicates?

I don't know about an app, but I use Excel to do this regularly. Once you copy and paste one into the other, then you can sort and see if there are any duplicates. Pretty easy at that point to fix.

The other way that I have used, with great success, is to, using Carlson, import the first set of points into a job, then import the second set, with an offset in the point numbers. I'll add 200 or whatever it needs to the second set. Voila! No issues.

It is, as the Offspring lamented, important to "Keep 'Em Separated".

 
Posted : September 24, 2013 5:13 am
(@spledeus)
Posts: 2772
Registered
Topic starter
 

Thank you!

 
Posted : September 24, 2013 1:05 pm
(@spledeus)
Posts: 2772
Registered
Topic starter
 

Merging Points

I am not following the advice of the Offspring and I am attempting to merge 30 years of survey data into one solution.

 
Posted : September 24, 2013 4:27 pm
(@j_lewis_4)
Posts: 32
Registered
 

Merging Points

I am good at handling big sets and of data like that. If you will get me all of the data I can put it into one seamless file for you. Email me at jlewis4@glsurvey.com
Josh Lewis 4

 
Posted : September 24, 2013 5:09 pm