I am new to use Java and Geoserver.

I have a point sampling location (N,P,K Nutirients value for few fields spanning acroos few acres) on which I want to execute IDW or Natural Neighbourhood Interpolation (Vector To Raster Interpolation) in GEOSERVER and show result on WebMap.

I have done the same thing in ArcGIS using ArcGIS spatial Analysis Tool. Now I have to do the same thing in Geoserver

The Geoserver provide Barnes Surface Interpolation but it does not seems to be suitable for my case since smpling locations are too close.

After searching on Google I understand that Interpolation can be done using GDAL library (GDAL_Grid) by Creating WPS service in geoserver.

I am unable to find proper examples/documentation on How to use GDAL libraries from within GeoServer (I am using Java Platform)

It will be great help for me if anyone can provide pre-requisites of using GDAL libraries with GeoServer and examples of the same.

Also let me know if there is any other way of achieving IDW/ Natural Neighbourhood Interpolation in GeoServer.


My first recommendation would be to not do it this way, interpolation is heavily affected by edge conditions and resolution, by using a WPS on each map request you risk getting anomalies in your interpolation result every time the user moves the map or zooms in or out. Secondly, good interpolation is processor hungry so you will be placing a significant extra load on the web map server with every map request. So, I would produce the interpolated surface using the desktop GIS or program of your choice and load the resulting raster into GeoServer for viewing on the web.

If you must proceed with developing a WPS process then you could use GDAL and the Java swig bindings, or you could go with a pure Java process using the JAITools library which provide a number of kernel routines to help implement interpolation routines. I have some old code for rasterization using Epanechnikov kernels at github that may help you get started.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.