This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How can speed up loading and setting tiles - OSMDROID

0

Hi to every one, i'm creating an app android that load a grib data from file and set the color of tiles from grib data that i loaded. But this code is very slow. How can speed up this?

try {
                gribFileTileSource.setRecord(1);
                for (int j=0;j<tileSize;j++) {
                    lat=minLat+j*dLat;
                    for (int i=0;i<tileSize;i++) {
                        lon=minLon+i*dLon;
                        //Log.d(LOG_TAG,"lon:"+lon+" lat:"+lat);
                        u=gribFileTileSource.getValue(lat,lon);
                        color=gribFileTileSource.getColor(u);
                        bitmap.setPixel(i,tileSize-j-1,color);
                    }
                }
thanks in advance

asked 12 Jan '18, 10:55

Pasquale22's gravatar image

Pasquale22
11334
accept rate: 0%

At first glance perhaps https://gis.stackexchange.com/questions/ would be more likely to find someone who can answer a question like this?

(12 Jan '18, 12:46) SomeoneElse ♦

Source code available on GitHub .