symm/gisconverter — pull request #4 by amenadiel (2014-07-22 23:47:03+00:00)
Title: fixes old markup KML GeometryCollection objects

I was looking for interesting KMLs to examine and I came [across this page](http://cseweb.ucsd.edu/~atsiatas/misc.html) in which there's a [California State Highway Traffic Count](http://cseweb.ucsd.edu/~atsiatas/california2.kml). I downloaded it and found out it contained several GeometryCollection elements.

```

880 - 194000 to 198000

-122.267080,37.795520,0.000000 -122.278930,37.800180,0.000000

#8

880 - 134000 to 146000

-122.278930,37.800180,0.000000 -122.282040,37.801390,0.000000 -122.283660,37.802080,0.000000 -122.284780,37.802490,0.000000 -122.286390,37.802880,0.000000 -122.287560,37.803040,0.000000 -122.288650,37.803100,0.000000 -122.289700,37.803070,0.000000 -122.290340,37.803010,0.000000 -122.294690,37.802280,0.000000 -122.296150,37.802130,0.000000 -122.296860,37.802130,0.000000 -122.297810,37.802220,0.000000 -122.298480,37.802340,0.000000 -122.299220,37.802530,0.000000 -122.300250,37.802900,0.000000 -122.301360,37.803470,0.000000 -122.301990,37.803890,0.000000 -122.302480,37.804290,0.000000 -122.302980,37.804780,0.000000 -122.303590,37.805560,0.000000 -122.304000,37.806270,0.000000 -122.304370,37.807230,0.000000 -122.304500,37.807910,0.000000

#7

880 - 127000

-122.304500,37.807910,0.000000 -122.304530,37.809080,0.000000 -122.304370,37.809990,0.000000 -122.304020,37.810910,0.000000 -122.303590,37.811660,0.000000 -122.303020,37.812390,0.000000 -122.302310,37.813080,0.000000 -122.301620,37.813600,0.000000 -122.300150,37.814600,0.000000 -122.300150,37.814600,0.000000 -122.299800,37.814760,0.000000 -122.298160,37.815760,0.000000 -122.297340,37.816340,0.000000 -122.296670,37.816890,0.000000

#6

```

GeometryCollection entities [were deprecated as early as 2006](http://static.googleusercontent.com/media/earth.google.com/es-419//kml/kml_tags_21.pdf), but I guess there might still be datasets with that feature, so I added the ```GeometryCollection``` $kml_type, mocked the parser method using ```parseMultiGeometry``` method, and treated it as a Multigeometry from then on.

I added a test too. The expectable behavior is for gisconverter to read a GeometryCollection, but export it as a MultiGeometry.