[GRASS-dev] spline interpolation over time series

Hi all!

I need to analyse several MODIS in time, and calculate the temporal spline interpolation (for each pixel), then pick the values (date and value) on the spline function corresponding to percentiles 25, 50, 75, maximum, minimum and average.
I know that with r.series I can get max, min and average, but I can’t currently apply a spline interpolation. I’d like to know if in the temporal modules there’s something to do that or I should hack the r.series in order to add the spline interpolation. I found this http://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html#spline-interpolation that I can probably use for the scope.

Thanks for any hint

Best regards,

Margherita DI LEO
Postdoctoral Researcher

European Commission - DG JRC
Institute for Environment and Sustainability (IES)
Via Fermi, 2749
I-21027 Ispra (VA) - Italy - TP 261

Tel. +39 0332 78 3600
margherita.di-leo@jrc.ec.europa.eu

Disclaimer: The views expressed are purely those of the writer and may not in any circumstance be regarded as stating an official position of the European Commission.

Margherita Di Leo wrote:

Hi all!

I need to analyse several MODIS in time, and calculate the temporal spline
interpolation (for each pixel), then pick the values (date and value) on
the spline function corresponding to percentiles 25, 50, 75, maximum,
minimum and average.

I know that with r.series I can get max, min and average, but I can't
currently apply a spline interpolation. I'd like to know if in the temporal
modules there's something to do that or I should hack the r.series in order
to add the spline interpolation.

Maybe r.series.interp is a good/the proper candidate to receive such an
addition?

Nikos

I found this
http://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html#spline-i
nterpolation that
I can probably use for the scope.

Hi,
Nikos is absolutely right, the ideal candidate for spline interpolation in time for raster maps is r.series.interp. There is no other module that performs temporal interpolation.

Best regards
Soeren

···

2013/6/16 Nikos Alexandris <nik@nikosalexandris.net>

Margherita Di Leo wrote:

Hi all!

I need to analyse several MODIS in time, and calculate the temporal spline
interpolation (for each pixel), then pick the values (date and value) on
the spline function corresponding to percentiles 25, 50, 75, maximum,
minimum and average.

I know that with r.series I can get max, min and average, but I can’t
currently apply a spline interpolation. I’d like to know if in the temporal
modules there’s something to do that or I should hack the r.series in order
to add the spline interpolation.

Maybe r.series.interp is a good/the proper candidate to receive such an
addition?

Nikos

I found this
http://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html#spline-i
nterpolation that

I can probably use for the scope.


grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Sun, Jun 16, 2013 at 8:50 PM, Sören Gebbert
<soerengebbert@googlemail.com> wrote:

Hi,
Nikos is absolutely right, the ideal candidate for spline interpolation in
time for raster maps is r.series.interp. There is no other module that
performs temporal interpolation.

r.hants does temporal interpolation, to a degree. Assuming you have
e.g the raster maps tseries.1, tseries.3, tseries.5, tseries.7,
tseries.9, you could create dummy tseries maps tseries.2, tseries.4,
tseries.6, tseries.7 with
r.mapcalc "tseries.2 = null()"
etc, then

r.hants in=tseries.1,tseries.2,tseries.3,tseries.4,tseries.5,tseries.6,tseries.7,tseries.8,tseries.9

with the appropriate filtering options.

Markus M

Best regards
Soeren

2013/6/16 Nikos Alexandris <nik@nikosalexandris.net>

Margherita Di Leo wrote:
> Hi all!
>
> I need to analyse several MODIS in time, and calculate the temporal
> spline
> interpolation (for each pixel), then pick the values (date and value) on
> the spline function corresponding to percentiles 25, 50, 75, maximum,
> minimum and average.

> I know that with r.series I can get max, min and average, but I can't
> currently apply a spline interpolation. I'd like to know if in the
> temporal
> modules there's something to do that or I should hack the r.series in
> order
> to add the spline interpolation.

Maybe r.series.interp is a good/the proper candidate to receive such an
addition?

Nikos

> I found this
>
> http://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html#spline-i
> nterpolation that
> I can probably use for the scope.

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Hi,

···

On Sun, Jun 16, 2013 at 9:19 PM, Markus Metz <markus.metz.giswork@gmail.com> wrote:

On Sun, Jun 16, 2013 at 8:50 PM, Sören Gebbert
<soerengebbert@googlemail.com> wrote:

Hi,
Nikos is absolutely right, the ideal candidate for spline interpolation in
time for raster maps is r.series.interp. There is no other module that
performs temporal interpolation.

r.hants does temporal interpolation, to a degree. Assuming you have
e.g the raster maps tseries.1, tseries.3, tseries.5, tseries.7,
tseries.9, you could create dummy tseries maps tseries.2, tseries.4,
tseries.6, tseries.7 with
r.mapcalc “tseries.2 = null()”
etc, then

r.hants in=tseries.1,tseries.2,tseries.3,tseries.4,tseries.5,tseries.6,tseries.7,tseries.8,tseries.9

with the appropriate filtering options.

Thank you for all your inputs. Actually what I should do is not a proper interpolation but a regression, and analysis of quantiles. I’ll study the modules you suggested to see either if I can add such a feature or I would need to write something from scratch.

Thanks!

Best regards,

Margherita DI LEO
Postdoctoral Researcher

European Commission - DG JRC
Institute for Environment and Sustainability (IES)
Via Fermi, 2749
I-21027 Ispra (VA) - Italy - TP 261

Tel. +39 0332 78 3600
margherita.di-leo@jrc.ec.europa.eu

Disclaimer: The views expressed are purely those of the writer and may not in any circumstance be regarded as stating an official position of the European Commission.

On Sun, Jun 16, 2013 at 10:20 PM, Margherita Di Leo
<dileomargherita@gmail.com> wrote:

Hi,

On Sun, Jun 16, 2013 at 9:19 PM, Markus Metz <markus.metz.giswork@gmail.com>
wrote:

On Sun, Jun 16, 2013 at 8:50 PM, Sören Gebbert
<soerengebbert@googlemail.com> wrote:
> Hi,
> Nikos is absolutely right, the ideal candidate for spline interpolation
> in
> time for raster maps is r.series.interp. There is no other module that
> performs temporal interpolation.

r.hants does temporal interpolation, to a degree. Assuming you have
e.g the raster maps tseries.1, tseries.3, tseries.5, tseries.7,
tseries.9, you could create dummy tseries maps tseries.2, tseries.4,
tseries.6, tseries.7 with
r.mapcalc "tseries.2 = null()"
etc, then

r.hants
in=tseries.1,tseries.2,tseries.3,tseries.4,tseries.5,tseries.6,tseries.7,tseries.8,tseries.9

with the appropriate filtering options.

Thank you for all your inputs. Actually what I should do is not a proper
interpolation but a regression

That sounds like r.series (one time series) or r.regression.series
(regression of two time series).

Markus M

--
Best regards,

Margherita DI LEO
Postdoctoral Researcher

European Commission - DG JRC
Institute for Environment and Sustainability (IES)
Via Fermi, 2749
I-21027 Ispra (VA) - Italy - TP 261

Tel. +39 0332 78 3600
margherita.di-leo@jrc.ec.europa.eu

Disclaimer: The views expressed are purely those of the writer and may not
in any circumstance be regarded as stating an official position of the
European Commission.

On Sun, Jun 16, 2013 at 10:33 PM, Markus Metz <markus.metz.giswork@gmail.com

wrote:

On Sun, Jun 16, 2013 at 10:20 PM, Margherita Di Leo
<dileomargherita@gmail.com> wrote:
>
> Thank you for all your inputs. Actually what I should do is not a proper
> interpolation but a regression

That sounds like r.series (one time series) or r.regression.series
(regression of two time series).

Some results (average, min and max) I can get already using r.series. The
remaining expected results imply the application of a spline regression
over the time series generated by each pixel, and the individuation of the
quantiles calculated over such a regression. The expected results would be:
a raster map with the values (in each pixel) corresponding to the 25%
quantile, a map for the 50% quantile and a map for 75% quantile
(corresponding to spline regression).

--
Best regards,

Margherita DI LEO
Postdoctoral Researcher

European Commission - DG JRC
Institute for Environment and Sustainability (IES)
Via Fermi, 2749
I-21027 Ispra (VA) - Italy - TP 261

Tel. +39 0332 78 3600
margherita.di-leo@jrc.ec.europa.eu

Disclaimer: The views expressed are purely those of the writer and may not
in any circumstance be regarded as stating an official position of the
European Commission.