Primary competition visual

AgriFieldNet India Challenge

Helping India
$10 000 USD
Challenge completed ~3 years ago
Classification
Earth Observation
759 joined
179 active
Starti
Sep 05, 22
Closei
Oct 31, 22
Reveali
Oct 31, 22
Turn the data to csv
Data · 22 Oct 2022, 03:12 · 4

Hi, does anyone know how to combine all the tif files and turn them into csv files?

Cause I have the assignment to analyze this problem by using jmp pro, but there are thousands of tif files.

Discussion 4 answers
User avatar
skaak
Ferra Solutions

That is going to make it very difficult to manage. The tif files are big as it is, and you could write them all out to csv, but it is going to be clumsy and large.

To answer your question, just read the tif files as e.g. in the starter. Then if you want you can convert the data to e.g. pandas dataframe and write out or write out using numpy write to text functionality. But note earlier comment.

I think you need to rather consider and plan a bit on what you want to do, then that will perhaps make it more clear how to proceed. I think you have the right pieces of the puzzle, but you are putting them together wrong or you are missing a few pieces. Perhaps you want to load the tif, do some processing and then write to csv for example.

22 Oct 2022, 06:41
Upvotes 2

Yo can generate a unique csv file where each row represents a pixel value from a tiff file. Then you can aggregate pixels per field_id by computing their mean or random sampling some of the pixel values of an specific field id as a regularization technique. Generating a one-time csv file to play with will allow you fast experimentantion.

22 Oct 2022, 13:13
Upvotes 0

Thank you very much!