Ideas and Approaches for visualizing data

Little-P's icon

Hey Everybody!

I'm searching for ideas for visualizing GPX file data.

I already wrote a little python script that extracts the latitude, longitude, and elevation points from a hike i did. Now i want to transform these into a visual representation.

E.g. the lat and long values could be used to draw the route. This would be my first approach, but i don't know where to start.

I thought about filling up a jit.matrix with these data points. How could i do this?

TFL's icon

I don't know the specifications of GPX files, but I assume what you extract from it is basically a path: an indexed set of XYZ points with possibly a delta time between each point. In Max you have [jit.path] to store and edit such data (although a [jit.matrix] would be fine too), [jit.anim.path] to animate an object through a path, and [jit.gl.path] to draw a path.

I would probably start with [jit.gl.path] since you just need XYZ data, quickly get a visual representation, and don't need to bother with time, which can be quite overwhelming at first.

You mentioned latitude and longitude, probably you'll need some kind of conversion from lat/long degrees to X/Y distances. And with elevation you get the 3D coordinates.

Since you already have a Python script running, I would perform the conversion there and output a simple text file that can be used to fill your path. You could use the [coll] format, each line could be <index>, <X> <Y> <Z>; to start with, and later on you could add time. Then it shouldn't be too hard to import your generated file into a [coll], and dump its content to fill your [jit.gl.path] with append messages.

If you can provide an excerpt of the extracted data I can give it a go.

EDIT: after a quick search for GPXin the forum, see this thread if you want to extract data from your GPX file directly in Max.

Little-P's icon

Thanks for your reply!
I checked a little the help files for the objects you mentioned, but would be really intereseted your approach! Here is a .txt file for the coll object. data is not normalised. in which range should the numbers be to work with the path objects?

gpx_collFormat.txt
txt 36.95 KB

Rob Ramirez's icon

the easiest way to start visualizing 3D data in my opinion is to shove it into a matrix, and then send that to a points-mesh. figuring out the interesting regions is then a matter of scale and position on the mesh, and jit.3m can tell you your data extents. jit.normalize might be useful as well.

Max Patch
Copy patch and select New From Clipboard in Max.