[Marble-devel] Review Request 116059: Patch for BUG: 331467

Dennis Nienhüser earthwings at gentoo.org
Wed Feb 26 19:52:41 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116059/#review50978
-----------------------------------------------------------


There's a syntax error in the .kml file. The " characters are still escaped, i.e. there's \" where " is needed (copy-paste from C++), so it's not valid XML. Just remove those characters.
xmllint --noout some/file/to/test.xml
is a good way to find such errors.

With that done the test will still not succeed directly. If you use kml2kml and diff the output (after feeding through xmllint --format) you'll get this:

@@ -1,14 +1,14 @@
 <?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">
+<kml xmlns="http://earth.google.com/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2">
   <Folder>
     <PhotoOverlay>
-      <rotation>12.455</rotation>
+      <rotation>12.4549999237061</rotation>
       <ViewVolume>
+        <near>1000</near>
         <leftFov>-60</leftFov>
         <rightFov>60</rightFov>
         <bottomFov>-45</bottomFov>
         <topFov>45</topFov>
-        <near>1000</near>
       </ViewVolume>
       <ImagePyramid>
         <tileSize>219</tileSize>
@@ -17,7 +17,7 @@
         <gridOrigin>lowerLeft</gridOrigin>
       </ImagePyramid>
       <Point>
-        <coordinates>45.78665,0.6565</coordinates>
+        <coordinates>45.7866500000,0.6565000000</coordinates>
       </Point>
       <shape>sphere</shape>
     </PhotoOverlay>

These are shortcomings of our string based comparison. To work around them until we have operator== everywhere available, do this:
- move the <near> tag on top of <leftFov>
- Choose some other value of <rotation> that is not affected by string/qreal conversion accuracy problems
- Use coordinate values with 10 digit precision


- Dennis Nienhüser


On Feb. 26, 2014, 10:32 a.m., Cruceru Calin-Cristian wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116059/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2014, 10:32 a.m.)
> 
> 
> Review request for Marble.
> 
> 
> Bugs: 331467
>     http://bugs.kde.org/show_bug.cgi?id=331467
> 
> 
> Repository: marble
> 
> 
> Description
> -------
> 
> Extend KmlPhotoOverlayWriter.cpp to also write the following elements (and their children): - rotation - ViewVolume - ImagePyramid - shape 
> 
> I fail the test with tests/TestGeoDataWriter so I'm waiting for review with what I'm doing wrong.
> 
> 
> Diffs
> -----
> 
>   src/lib/marble/geodata/writers/kml/KmlPhotoOverlayWriter.cpp 5903654 
>   tests/TestGeoDataWriter.cpp b1acbc9 
> 
> Diff: https://git.reviewboard.kde.org/r/116059/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> The testing file
>   https://git.reviewboard.kde.org/media/uploaded/files/2014/02/25/091ac6a9-8b67-434a-a678-d15a7d87f4c5__0002-Update.patch
> 
> 
> Thanks,
> 
> Cruceru Calin-Cristian
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20140226/9a3a8bd3/attachment.html>


More information about the Marble-devel mailing list