model_list = [models...]
for m in model_list:
for element in m.get('geographic_location'):
lat = element.latitude
lon = element.longitude
if element.altitude_mode == "absolute":
z_ab = element.altitude_mode
elif element.altitude_mode == "relativeToGround":
z_re = element.altitude_mode
--
You received this message because you are subscribed to the Google Groups "pycollada" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pycollada+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pycollada/f922bbe8-9426-4209-a0fe-7e261910abe1o%40googlegroups.com.
If you just want to grab the XML content, you might consider using lxml (https://lxml.de/) or etree (https://docs.python.org/3/library/xml.etree.elementtree.html) directly.
On Wed, Jun 10, 2020 at 2:24 PM Auslander <eric.cha...@gmail.com> wrote:
I am building out a geoindexer that vacuums up a number of file types and exports holdings to geojson, feature class, etc. I have numerous collada files with geolocation embedded according to 1.5 spec but standard GIS libraries don't handle collada.--I hate to sound so needy, but can someone provide me a simple recipe on how I can obtain that content?I've installed pycollada without issue, but I think mine is something of an edge case as I'm not using it for construction/editing/saving. All I'd like to do is to iterate over a file list, look for the <geographic_location> tag and then parse out the child elements. Hopefully this is easy?in pseudo code what i'm trying to do is like this:
model_list = [models...]
for m in model_list:
for element in m.get('geographic_location'):
lat = element.latitude
lon = element.longitude
if element.altitude_mode == "absolute":
z_ab = element.altitude_mode
elif element.altitude_mode == "relativeToGround":
z_re = element.altitude_modeThanks for any assistance
You received this message because you are subscribed to the Google Groups "pycollada" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyco...@googlegroups.com.