Trimble Business Center — Produce final deliverables in one workspace. Start free trial.

AI Assistant
Notifications
Clear all

Merging CSV Files

12 Posts
8 Users
0 Reactions
1,198 Views
spledeus
(@spledeus)
Posts: 2757
Free
Topic starter
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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


 
Posted : September 23, 2013 7:26 pm
B.L. HINDMAN
(@bl-hindman)
Posts: 102
Free
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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 7:35 pm
spledeus
(@spledeus)
Posts: 2757
Free
Topic starter
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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 8:17 pm
jimcox
(@jimcox)
Posts: 2120
Member Founder
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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 8:27 pm
WillAus
(@willaus)
Posts: 47
Free
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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 24, 2013 1:05 am

jimcox
(@jimcox)
Posts: 2120
Member Founder
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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 24, 2013 1:38 am
christ-lambrecht
(@christ-lambrecht)
Posts: 1411
Member Founder
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

thanks for this handy tip!
:good:


 
Posted : September 24, 2013 2:31 am
ladd-nelson
(@ladd-nelson)
Posts: 738
Free
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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 7:11 am
Kris Morgan
(@kris-morgan)
Posts: 3855
Free
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

> 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 7:13 am
spledeus
(@spledeus)
Posts: 2757
Free
Topic starter
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Thank you!


 
Posted : September 24, 2013 3:05 pm

spledeus
(@spledeus)
Posts: 2757
Free
Topic starter
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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 6:27 pm
J_Lewis_4
(@j_lewis_4)
Posts: 32
Free
Translate ▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

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 [email protected]
Josh Lewis 4


 
Posted : September 24, 2013 7:09 pm