One thing I think it is worth pointing out about Grids (as it is fairly fundamental) is that the underlying coordinate system is based on BigDecimal. The calculations for where a grid value is located are based on BigDecimal arithmetic. This is because otherwise there can be problems when dealing with rasters with very large numbers of rows and columns. Although Grids will handle multiple rasters with very large numbers of rows and columns, there are non memory/disk resource restrictions on how many rows and columns any grid can have and this will vary depending on how the definition of the chunks (data model used to store these).
I have not parallelised anything much in grids, but many grid operations can be parallelised and I have thought about this in respect of memory handling. Some of the memory handling catches OutOfMemoryErrors to deal with problems if they do come up. It is much better though to test available memory to judge if the grids processing component is running low. In the Generic library upon which Grids depends there are useful functions for this. ________________________________ From: Andy Turner <a.g.d.tur...@leeds.ac.uk> Sent: 29 November 2015 19:27 To: Jody Garnett; teeschke Cc: GeoTools Users Subject: Re: [Geotools-gt2-users] embedding GeoTools is always a pain Hi Jody, Hi everyone, Many moons ago I started developing a raster data calculator based on the Raster class of GeoTools. I developed this so that it tiles/chunks 2D square celled rasters into chunks of the same size, but configurable rows and columns. I called the library Grids. Every Grid in Grids currently either holds ints or doubles, but I had envisaged developing ones for boolean and BigDecimal too. Every Grid shares a Grids_Environment object for memory handling, so if when processing the system runs low on memory, various data/tiles/chunks can be swapped to file space. There can be quite a lot involved in being clever about swapping data to and from different memory stores. Anyway, the library can handle multiple large grids on modest resources for many operations. Perhaps this can be evolved to be the JAI replacement. In Grids there are various ways of storing chunks. They can be stored as HashMaps or Arrays or in other ways depending on their size. At present these can be stored as JAI images too, so currently there is a dependency on JAI for these, but it is not necessary at all. Here is a link to the latest Grids on GitHub: https://github.com/agdturner/grids There is a bit more history of grids here: http://www.geog.leeds.ac.uk/people/a.turner/src/andyt/java/grids/ Any questions I'll be happy to try to answer them and provide examples etc. Cheers, Andy ________________________________ From: Jody Garnett <jody.garn...@gmail.com> Sent: 29 November 2015 18:40 To: teeschke Cc: GeoTools Users Subject: Re: [Geotools-gt2-users] embedding GeoTools is always a pain We are starting to look at replacing JAI<https://github.com/geotools/geotools/wiki/Replace-JAI>, and will be doing design and fundraising over the course of 2016. JAI is not open source so we are unable to place it on maven central. The second part is service provider interface is a pain in some environments, and the "service registry" we use looks to be unsupported in Java 9. [https://avatars2.githubusercontent.com/u/1187031?v=3&s=400]<https://github.com/geotools/geotools/wiki/Replace-JAI> Replace JAI · geotools/geotools Wiki · GitHub geotools - Official GeoTools repository ... You can clone with HTTPS Read more...<https://github.com/geotools/geotools/wiki/Replace-JAI> If you have any suggestions on parties interested in the above tasks we would love to know. -- Jody Garnett On 24 November 2015 at 14:35, teeschke <daniel.te...@web.de<mailto:daniel.te...@web.de>> wrote: Dear GeoTools users and developers, after embedding GeoTools in my n-th project I am very annoyed about the complexity and pitfalls of this process. Two Scenarios to describe the problem: First: I wanted to parse a KML file and try to follow the Geometry Guide on http://docs.geotools.org/stable/userguide/library/xml/geometry.html#kml-parser 1. add boundless repository and include gt-api, gt-main and gt-epsg-hsql because I learned my lessons from projects before 2. trying to resolve the KMLConfiguration a) adding gt-xml and gt-geometry modules as dependencies which is not documented but seems to be meaningful because the how-to is about this b) adding the xsd/gt-xsd-kml module as dependencies because I stumbled into the xsd folder and it sounds meaningful as well --> lucky me: it was the right one Sidenote: I needed to scroll through the boundless repository manually to scan for this modules Second Scenario: whenever I want to do something with grid files - the JAI library is required but not hosted in the maven central or boundless repo. So I must use another repository (osgeo/webda) which seems to be the last one which is hosting the JAI library :) At the end of the day all this searching and trying needs a lot of time, is not a pleasure and from my point of view not state-of-the-art because all other libraries are available at maven central and are able to manage their own dependencies. But in case of GeoTools I always need to look into reference projects to find out how I was getting it the last time. What are your experience with scenarios like this? Are you adding all modules into the pom to not run into problems I always got or is there a how-to I missed? :) Thanks and kind regards, Tee -- View this message in context: http://osgeo-org.1560.x6.nabble.com/embedding-GeoTools-is-always-a-pain-tp5238366.html Sent from the geotools-gt2-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140 _______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net<mailto:GeoTools-GT2-Users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
------------------------------------------------------------------------------
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users