This tutorial presents how to extract presumed grazing locations using animal velocity between two consecutive points, then these extracted grazing points were used to calculate percent grazed pixels, and pixel residence time, revisit rate (visits on different days), and return interval (interval between visits when cows visited the same pixel for more than once) for each animal.
Pixels in this project are 30m x 30m.
Open MySQL workbench
Click new connection button
Name the new connection
Double click new connection, you will see a new window opened
Setup password for root user (optional) in the new opened SQL File window, type
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
Then click execute button to execute the script.
Convert your GPS data into csv format and use comma as delimiter. In total the csv file should only have 5 columns. They are: id,CowID,Date,northing,easting
Here is an example of GPS data.
Convert your pixel data into csv format and use comma as delimiter. In total the csv file should only have 3 columns. They are: pid, y, x
Here is an example of pixel data.
Open range_db.sql file from MySQL workbench.
Execute range_db.sql. A database will be created for your application.
Open grazing_pattern.sql file from MySQL workbench. Specify the path you want to export your result. Then execute the script.
Chuan Hu: chu@cs.nmsu.edu
Huiping Cao: hcao@cs.nmsu.edu
Mohammed Sawalhah : sawalhah@nmsu.edu
Andres Cibils : acibils@ad.nmsu.edu