Importing gps data?


#1

Hello,

Has anyone tried to import gps data (gpx) to Softimage?

I would guess it shouldn’t be too difficult to use the coordinate and elevation data from the gpx (=xml) file to generate a curve? But does such an importer exists and how easy it is to code one if it doesn’t? Is there for example a ready interface provided for writing importers?


#2

I don’t think there’s what you would call a “ready interface”, but I think I remember some example importers in the SDK docs.
But as you say, it shouldn’t be too tough if this is an XML file. It shouldn’t be much more difficult than parsing the file for the relevant data and passing that into a generate curve Op or directly into the geometry description of an existing primitive.


#3

Thanks for the reply!

Yeah, there’s an example in the docs, I need to take a closer look at that.

Just out of curiosity, are these (importers/exporters) usually written in c++ as in the example? I kind of thought it would be python code. No matter though, I more familiar with c++ than python :slight_smile:


#4

If you want to use Python, elementree module makes manipulating xml data trivial.

http://effbot.org/zone/element-index.htm


#5

As of Python 2.5 the excellent celemnttree is part of the default distribution.
There’s also the free lxml which is pretty nice if you want a better/bigger xpath and parsing.


#6

Thanks guys!

I could try to go with Python, but are there any Importer/Exporter examples around done with it? The example in XSI docs is in C++ as mentioned before and therefore seemed like a good starting point, but if xml manipulation is easier with Python then I might want to try that instead.

Personally I have no experience with neither for xml manipulation, but I have done that with Java (SAX, DOM parsers).


#7

I browsed around the XSI sdk docs, and I got mildly interested in trying to write this with C# instead. Any pros or cons for the choice of language?

Personally I figured that going with C# might be a good idea because it’s closer to Java, which is my main language.

But is it a good choice for writing this kind of importer code for XSI? Would it still be easier with C++ or Python considering XSI?


#8

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.