[gdal-dev] missing point in MultiGeometry KML file

Greg Minshall minshall at acm.org
Thu Aug 4 08:24:26 PDT 2016


hi.  i'm a newbie, trying to do some scripting which involves reading in
a KML file and then, after some processing, writing it out again.  i had
noticed that when running ogrinfo(1) on my input file, i wasn't seeing
all the point of the polygon in the MultiGeometry of my KML file, but
thought maybe that was just some form of abbreviation.  but, that
behavior seems to explain a problem i'm running into.  so, i tried
"ogr2ogr -f kml", and get the same behavior, my polygons are reduced to
a single point (the initial/terminal point).

i'm curious if it's obvious what i'm doing wrong, or if this is a known
bug, or...

my set up is a Mac running Fink:
----
bash greg-minshalls-mbp-2: {1773} ogr2ogr --version
GDAL 2.1.1, released 2016/07/07

bash greg-minshalls-mbp-2: {1774} uname -a
Darwin greg-minshalls-mbp-2.local 15.6.0 Darwin Kernel Version 15.6.0: Thu Jun 23 18:25:34 PDT 2016; root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64

bash greg-minshalls-mbp-2: {1775} fink --version
Package manager version: 0.39.3
Distribution version: selfupdate-rsync Sat Jul 30 10:25:32 2016, 10.11, x86_64
Trees: local/main stable/main local/injected

Copyright (c) 2001 Christoph Pfisterer
Copyright (c) 2001-2016 The Fink Package Manager Team
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
----

a fairly reduced test case is running "ogr2ogr -f kml clone.kml bug.kml"
where "bug.kml" is:
----
<?xml version="1.0" encoding="UTF-8" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document id="root_doc">
    <Folder><name>Soberanes</name>
    <Placemark>
      <name></name>
      <description></description>
      <Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style>
      <MultiGeometry><Polygon><outerBoundaryIs><LinearRing><coordinates>-121.859539607243,36.4458603356853,0,-121.859010098152,36.4456932276546,0,-121.858129504875,36.4453991811578,0,-121.857325735135,36.4448820131963,0,-121.85675971936,36.4445384607921,0,-121.856809120566,36.443876500306,0,-121.856430592837,36.4429020177187,0,-121.856167728728,36.4423261178737,0,-121.855775934253,36.4418654654089,0,-121.855094715237,36.4418565756417,0,-121.854381527851,36.4413356919538,0,-121.853600655401,36.4411842000059,0,-121.852822068116,36.4410692737567,0,-121.852532048225,36.4410353302927,0,-121.851959423457,36.4403344818693,0,-121.85201799593,36.4398188037771,0,-121.85285513667,36.4394180573464,0,-121.85328948567,36.4391070481673,0,-121.853289093379,36.4383737899567,0,,-121.827771447749,36.3590241926845,0,-121.827662452176,36.3587040307677,0,-121.827882572315,36.3582984116496,0,-121.828496319454,36.358129295858,0,-121.82929464932,36.3580608917042,0,-121.829555373568,36.3579419054821,0</coordi
 nates></LinearRing></outerBoundaryIs></Polygon></MultiGeometry>
    </Placemark>
    </Folder>
</Document></kml>
----

thanks in advance for any clues.

Greg Minshall


More information about the gdal-dev mailing list