Mmm... sounds tasty. Are you saying that
Kriging is inferior to thin
plate splines generally, or is it likely
to be data dependent ?
As an aside: I have vector to raster
utilities on my todo list for
jaitools - the aim being to generalize
the existing GeoTools code into
a jaitools module and then bring that
back to GeoTools in a geospatial
wrapper as aaime did for the raster
to vector code. If Jan's
interpolation code was available, and
subject to permissions, licences
etc., it would be fantastic to have
this as part of the jaitools
module. Perhaps then jgrasstools could
depend on that too ?
(Sorry for hijacking your thread Diego)
Michael
Hi Michael,
Another good link which I should have mentioned before is the
JGrassTools project which is run by one of the GeoTools developers. It
includes a kriging algorithm written to use GeoTools classes:
http://code.google.com/p/jgrasstools/source/browse/hortonmachine/src/main/java/org/jgrasstools/hortonmachine/modules/statistics/kriging/Kriging.java
I'm cc-ing this message to the author who is a font of wisdom on all
things to do with landscape modelling.
lol, that was a good one. Where should I make the downpayment? :)
A post about the approach you end up using would be much appreciated - thanks.
I would not use the Kriging for lanscape interpolation.
Some time ago I started to port the Interpolation methods created by
Jan Jezek (Thin Plate Spline and IWD) to jgrasstools by adding in it
quadtree support. They are working quite well, but I stopped in the
middle of the testing phase and never touched them again.
In fact I promised Jan I would get back to him like 3 months ago
(sorry Jan, work drawned me), since I wanted to should him how great
his work would look like in OMS :)
I would use those, if I had to choose. In that case right now you
would need to extract the points from the lines and give them an
elevation attribute. You would also pass a gridgeometry and it would
interpolate in the grid points.
Tada!
Well, you noticed: would, would, would.
I am currently promising a lot of stuff around, so I will go on. I
could bring those tools in official experimental jgrasstools land if
Jan agrees and nobody blames me. :)
Cheers,
Andrea
Michael
Thanks for your reply.
Sorry,
you're right I should have provided more information.
The
contour lines are MultiLineStrings. For the output raster I would need
proper interpolation. I guess I'll have to implement it myself then, or
use one of the solutions in the link you gave me.
I'll post here my solution.
Ah grasshopper ! A couple of
hours is merely the blink of an eye on
the cosmic timescale of the
average open source programming task...
You need to provide more
information so that people here can help you.
On the input side: are
your contour lines either LineString objects
are something that can
be turned into LineStrings ? On the output
side: were you wanting
proper interpolation of values between contours
for the output raster
or would simple filling the regions between
contours with a uniform
value be ok ? For true interpolation you
would usually use an
algorithm such as Kriging which GeoTools does not
provide.
Also,
take a look at this message in the list archives...
http://osgeo-org.1803224.n2.nabble.com/How-can-I-convert-mid-mif-map-to-matrix-of-big-cells-with-average-territory-information-tp1943037p1943037.htmlWhile
it is not exactly the same use case that you have it might give
you
some ideas or help you get started.
Michael