abhinav-adtechs / osmbonuspack

Automatically exported from code.google.com/p/osmbonuspack
0 stars 0 forks source link

Problem displaying polygons with inner and outer boundaries #59

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have a kml file containing a number of polygons that have both inner and 
outer boundaries and I am apparently only seeing some of the inner boundaries 
when displaying it using osmbonuspack, however when I view the file through 
Google Earth I see the correct inner and outer boundaries.

What is the expected output? What do you see instead?
I have attached a screenshot of both the Android OSM and Google Earth output.

What version of the product are you using?
4.2.7

Original issue reported on code.google.com by TravisSt...@gmail.com on 25 Mar 2014 at 12:59

Attachments:

GoogleCodeExporter commented 8 years ago

Your Polygons are inside a MultiGeometry. But MultiGeometry is supported only 
from v4.2.9 => update to the latest version (4.3). 

With v4.3, your file seems to be displayed properly. 

Testing it, I just noticed a bug in v4.3 => the KML bounding box was not 
computed properly. This is a real bug that I will fix shortly. 
In the meantime, once your file is loaded, zoom-out to see the whole content. 

I suggest that you put a fill color to your style => this will help to check if 
holes are properly handled. 

An other issue I noticed: clicking on a Polygon doesn't display the bubble with 
the Placemark name. Something else to be investigated... 

Original comment by mathieu....@gmail.com on 25 Mar 2014 at 10:23

GoogleCodeExporter commented 8 years ago
Thanks, I did not realize this was the case. Sorry for the spurious issue, but 
I am glad it has helped bring to light a few issues. I will upgrade my version 
of osmbonuspack and give it a try, and perhaps rework the kml file. It was 
automatically created in qgis from a shapefile so I did not have much control 
over the format.

Original comment by TravisSt...@gmail.com on 25 Mar 2014 at 10:28

GoogleCodeExporter commented 8 years ago
"clicking on a Polygon doesn't display the bubble with the Placemark name."

=> Was a tricky one. Explanations can be of interest for specialists: 

osmdroid Projection system implies big X and Y values - sometimes bigger than 
32768. 

But Android Region is limited to 32bits values. This limit is not mentioned in 
the doc, but Thanks God it's open source: it is implemented in C++, and it uses 
"int32_t" values everywhere. 

So, Polygon click detection was OK in Europe, but KO in Japan... 

And now, the fix: we offset the Path so that its (left,top) corner is set on 
(0,0). 
This way, values are smaller, and Region works fine. 

Note this fix will not work for really huge Polygons. 

The fix has been commited. 

Original comment by mathieu....@gmail.com on 26 Mar 2014 at 10:22