Basically what I am trying to build (as an assignment for my degree) is an application which takes data collected from Land Surveying and then overlays that onto Google Earth using PHP and Javascript.
The surveyor uses a piece of equipment to record the location of given points, that data is then stored in a text file with each row being one individual point and the corresponding columns for the X coordinate, Y coordinate and height (separated by tabs), all values are numerical. I need to extract the X and Y coordinates and then convert them to another coordinate system and then display this on Google Maps.
My lecturer has provided me with a typical text file of the data to test the application. I have no problems entering the data into Google Earth, and have been using this site:
www.nearby.org.uk to convert the coordinates manually. This site also offers the conversion code for download, so I can use it to batch convert the data.
Here is what I have managed to do so far by manually extracting the data from the text file:
http://www.philmorrow.co.uk/lboro/case1/
I have spent a great deal of time learning how to remove the tabs separating the columns and call each column individually but I suck at PHP and can only do this for the first row – figuring out how to automate this is beyond me. I have read loads about arrays of arrays for 2 dimensional things and about using databases but I don’t really understand it.
So where I am at the moment is that I effectively have 3 separate little scripts which I need to somehow combine so that I can (ideally) upload a text file and then see the data plotted on Google Earth in one swift process.
I am not asking for someone to do this for me but I could really do with an explanation of what I need to do. Do I need a MySQL database to handle this kind of thing? Can arrays handle files with up to 5 columns and potentially 10,000 rows?
Any help would be
GREATLY appreciated!
PS.
Sorry if this is too long-winded or missing crtical info, I've got myself into a bit of a mess trying to figure this out. I'm completely new to PHP and have been learning things as and when I needed them.