NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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 ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×181
×76
×47

question asked: 12 Jan '18, 10:55

question was seen: 2,184 times

last updated: 12 Jan '18, 12:46

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum