[postgis-users] Rain sensor --- Interpolation -- RASTER -- IDW

Regina Obe lr at pcorp.us
Sat May 2 13:18:43 PDT 2020


Unfortunately most of the Mapalgebra (maybe all) callback functions packaged with PostGIS are written in plpgsql which is dog for call back functions.

I did an experiment a while ago (I need to revisit it) rewriting a call back function in SQL and another for PLV8.

What I concluded (at least for my sample function st_range4ma)

1) plpgsql is slower than even SQL  and plv8 turned out to be the fastest.

I'm suspecting as far as PLs where you can stuff the code right in the function PLV8 might be the best language for writing call back functions. 
I suspect C would be faster and we really should rewrite all those call back functions in PostGIS in C.

The simple test I did --  

PLV8 was 8 times faster than PL/PGSQL  and 2 times faster than a callback written in SQL.

I'm planning to repeat these tests and maybe I can test with InvDistWeight4MA this time to see if those metrics still hold true.

Thanks,
Regina

> -----Original Message-----
> From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On
> Behalf Of caymo04
> Sent: Saturday, May 2, 2020 2:00 PM
> To: postgis-users at lists.osgeo.org
> Subject: [postgis-users] Rain sensor --- Interpolation -- RASTER -- IDW
> 
> Good afternoon everyone,
> 
> I am trinig to interpolate on RASTER the no data values.
> 
> We have 10 data from rain sensor and this sensor are geopositioned on the
> RASTER.
> 
> How can I do the interpolation by weight in all RASTER?
> 
> I tried to do with InvDistWeight4ma function but is very very very slowly.
> 
> Any response will be very appreciated.
> 
> Best regards and thanks you in advance.
> 
> Acaymo.
> 
> 
> 
> --
> Sent from: http://postgis.17.x6.nabble.com/PostGIS-User-f3516033.html
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users



More information about the postgis-users mailing list