Forum

Author Topic: KML shape import  (Read 3877 times)

Landy

  • Newbie
  • *
  • Posts: 36
    • View Profile
KML shape import
« on: May 01, 2019, 07:51:38 AM »
I am having difficulty importing a kml file with a shape attached.  The shape file was originally created with sketchup and saved as a kmz file.  I have tried importing that file and also an equivalent kml file and associated .dae file, but no matter how I try I get a "KML syntax error" message from metashape when I try to import.  Note I am importing into an existing metashape file which is a drone image of a rock platform.  Both the kmz and kml file work fine in google earth, but won't import into metashape.  The structure of the kml file is below.  Any suggestions?  Cheers, Bill.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Folder>
   <name>12</name>
   <description><![CDATA[Created with <a href="http://sketchup.com">SketchUp</a>]]></description>
   <LookAt>
      <longitude>151.6645390153</longitude>
      <latitude>-33.08723644289</latitude>
      <altitude>17.1707204708</altitude>
      <heading>336.4778816626</heading>
      <tilt>60.67482927013</tilt>
      <range>32.50971519456</range>
   </LookAt>
   <Folder>
      <name>Tour</name>
      <Placemark>
         <name>Scene 1</name>
         <LookAt>
            <longitude>151.6645390153</longitude>
            <latitude>-33.08723644289</latitude>
            <altitude>17.1707204708</altitude>
            <heading>336.4778816626</heading>
            <tilt>60.67482927013</tilt>
            <range>32.50971519456</range>
         </LookAt>
      </Placemark>
   </Folder>
   <Placemark>
      <name>Model</name>
      <Style id="default">
      </Style>
      <Model id="model_1">
         <altitudeMode>relativeToGround</altitudeMode>
         <Location>
            <longitude>151.6645145</longitude>
            <latitude>-33.087248</latitude>
            <altitude>0</altitude>
         </Location>
         <Orientation>
            <heading>0.7286067201608</heading>
            <tilt>0</tilt>
            <roll>0</roll>
         </Orientation>
         <Scale>
            <x>1</x>
            <y>1</y>
            <z>1</z>
         </Scale>
         <Link>
            <href>models/untitled.dae</href>
         </Link>
         <ResourceMap>
         </ResourceMap>
      </Model>
   </Placemark>
</Folder>
</kml>


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14839
    • View Profile
Re: KML shape import
« Reply #1 on: May 01, 2019, 10:57:35 AM »
Hello Landy,

Can you send the KMZ file to support@agisoft.com?

Problem could be related to missing <Document> section.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Landy

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: KML shape import
« Reply #2 on: May 02, 2019, 02:51:35 AM »
Thanks for your response Alexey - KMZ file sent.
cheers
Bill

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14839
    • View Profile
Re: KML shape import
« Reply #3 on: May 02, 2019, 01:44:23 PM »
Hello Bill,

Under "shapes" in Metashape we mean point, polygonal and polyline instances, so Import Shapes option assumes that only elements of these kinds are being loaded (including the KMZ format). But in your file there's a polygonal model - a mesh, which is not supported for KMZ import. You can only import COLLADA file (*.dae) via Import Model command.
Best regards,
Alexey Pasumansky,
Agisoft LLC