How to import a .GPX file without using GPXread?

9 visualizaciones (últimos 30 días)
Sarah
Sarah el 7 de Oct. de 2022
Comentada: Star Strider el 9 de Oct. de 2022
For context, i have 1 large gpx file that needs to imported so i can create graphs from the co-ords.
However, gpx read is not allowed in my case.
I am thinking about using low level i/o functions to get started?
I know my file is quite large and is going to need while loops to read all the data.
Below is the code i've got so far, which is far from where i need to be.
Any help is appreciated!
filename = input('Open file: ', 's');
[fileID, errmsg]= fopen(filename);
if (fileID==-1)
disp(errmsg)
end
Thanks!
  3 comentarios
Sarah
Sarah el 9 de Oct. de 2022
So this is for an in-class task, where the teacher uploads their own gpx file and looks at how we coded our way around gpxread. I've uploaded an example .txt file to look at. My only problem at the moment is uploading a gpx file without gpxread.
Star Strider
Star Strider el 9 de Oct. de 2022
O.K., since it’s a homework problem, the only suggestions I have is that it appears to be an .xml file or something similar. The regexp function could be an option, however in my experience that can be a bit of a challenge to get to work correctly, although it can perform miracles. It might be necessary to have several calls to it in order to extract the information you want (that I assume are the geospacial coordinates and time). See the See Also section for additional links.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by