opensciencemap / vtm

a vector-tile map library written in java - running on android, desktop and within the browser
GNU Lesser General Public License v3.0
238 stars 176 forks source link

Small gaps and discontinuites between tiles #119

Closed gvellut closed 9 years ago

gvellut commented 10 years ago

I have cloned the vTM project today and set up the vtm-android-examples project on my device (Nexus 10, Android 4.4.2). I have launched the SampleMapActivity from the menu.

I see gaps (white lines) between the tiles. Most of the times it is only when I move (pan or rotate) the map but it also happens when the map is not moving, like on the screenshot below:

gap1

Maybe it is a related issue but I also see discontinuities for linear features (roads) at the border of the tiles. See screenshots below.

gap2

gap3

hjanetzek commented 10 years ago

hmmm, I've seen this a year ago also with powervr but on iphone. Just need to recall what the issue was... could you change line 174 in VectorTileRenderer to v.mvp.multiplyLhs(mClipProj); ?

hjanetzek commented 10 years ago

Oh this is a mali gpu.. I'm still wondering what might cause the tile z-offset. Have you checked logcat for gl errors? Maybe enable GLAdapter.debug to get more infos

apachemaven commented 10 years ago

I met this issue before, and I found it is caused by the precision(0.3f) used by TileStache to generate the vector tile according to my shapfile data, and the CRS of my data is WGS84, so there will be huge difference between different precision. And I change it to 0.8f with a padding of 10%, now everything works well.

TileStache issur:https://github.com/TileStache/TileStache/issues/187

That's was my case, I am not sure if it will feed yours.

gvellut commented 9 years ago

Thank you for your help. @hjanetzek I have changed line 174 in VectorTileRenderer but I don't see any difference. I have also enabled debug mode but I don't see any errors related to OpenGL in the logs.

@apachemaven That might be it. However, I am using the default tiles already configure in the example applications so I assume most users have no issue like what I have. What could cause the issue with my graphics card (Mali GPU as hjanetzek mentions) and not others?

apachemaven commented 9 years ago

Sorry but I am not familiar with the GPU or any other hardware.

dondos commented 9 years ago

I am having the exact same white lines issue with an Asus fonepad (PowerVR SGX544 GPU) after upgrading to android 4.4.2. This behavior must be somehow related to KitKat because when the same tablet was running android 4.3 this issue was non existent. The only errors showing up in the logs are:

E/IMGSRV(6482): :0: PVRDRMOpen: TP3, ret = 52
E/IMGSRV(6482): :0: PVRDRMOpen: TP3, ret = 54
D/OpenGLRenderer(6482): Enabling debug mode 0
E/RenderScript(6482): Skipping override driver 'libPVRRS.so' and loading default CPU driver 'libRSDriver.so'.
V/RenderScript(6482): 0x62f75f60 Launching thread(s), CPUs 4
D/RenderScript(6482): Load RS driver 'libRSDriver.so' successfully.

but I don't think they are related.

I also tested this with a different tablet (android 4.4.2, Mali 400 GPU) but I couldn't replicate the issue.

hjanetzek commented 9 years ago

the original issue should be fixed now