Jukka, - raster readers: I agree that tidying up a bit would be good, but honestly I'd need to check them all before recommending anything; - the .aux.xml file should be created in the same folder where the tiff file reside, right beside it. The source code is something like:
File auxXmlFile = new File(imageFile.getParent(), imageFile.getName() + ".aux.xml"); if(auxXmlFile.exists()) { // Read... return; } // Create... - The aux.xml file structures for the files created by gdal and the ones created by OJ should be the same, even if with different sets of information. At the bottom of this email you find the content of the files generated by GDAL and OJ on the same TIFF. - With regards to the timing to contribute the changes to OJ, unless big bugs are found or substantial new features are required, they shouldn't take long. Since we've worked on the source code from OJ 1.7.1-r4004, we'd need to check if everything is ok with the most recent source code, but I don't see it as a lengthy operation. Till soon Alberto GDAL: <PAMDataset> <PAMRasterBand band="1"> <Metadata> <MDI key="COLOR_TABLE_RULE_RGB_0">-4.320724e+003 -2.904333e+003 0 191 191 0 255 0</MDI> <MDI key="COLOR_TABLE_RULE_RGB_1">-2.904333e+003 -1.487941e+003 0 255 0 255 255 0</MDI> <MDI key="COLOR_TABLE_RULE_RGB_2">-1.487941e+003 -7.155029e+001 255 255 0 255 127 0</MDI> <MDI key="COLOR_TABLE_RULE_RGB_3">-7.155029e+001 1.344841e+003 255 127 0 191 127 63</MDI> <MDI key="COLOR_TABLE_RULE_RGB_4">1.344841e+003 2.761232e+003 191 127 63 20 20 20</MDI> <MDI key="COLOR_TABLE_RULES_COUNT">5</MDI> <MDI key="STATISTICS_MAXIMUM">2775.2758789063</MDI> <MDI key="STATISTICS_MEAN">540.42157279456</MDI> <MDI key="STATISTICS_MINIMUM">-4.3070001602173</MDI> <MDI key="STATISTICS_STDDEV">580.26974362042</MDI> </Metadata> </PAMRasterBand> </PAMDataset> OpenJUMP: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <PAMDataset> <PAMRasterBand band="1"> <Metadata> <MDI key="STATISTICS_MINIMUM">-4.307000160217285</MDI> <MDI key="STATISTICS_MAXIMUM">2775.27587890625</MDI> <MDI key="STATISTICS_MEAN">540.421572794561</MDI> <MDI key="STATISTICS_STDDEV">580.2697436204171</MDI> </Metadata> </PAMRasterBand> </PAMDataset> On 08/01/2015 19:45 PM, Rahkonen Jukka (MML) wrote: > Hi, > > I made a quick test and my feeling was pretty good. I have some questions for > Alberto: > > - We have an amazing number of raster readers. Can you recommend which driver > behaves best, and do you think that we could drop out some others for making > life easier for OpenJUMP users? > - I noticed the lag before first opening of the image but I did not see the > aux.xml file anywhere after this process. Where in the file system it is > written? > - Does the aux.xml file have the same structure as the one created with > gdalinfo -stats? > > Once the image is opened all pan/zoom operations are for sure fast enough for > all digitizing work. I made a few tests also by combining more images (400 > MB each) into the same Image layer and they worked very well together. I > think that this is gonna be good. > > > -Jukka Rahkonen- > > ________________________________________ > edgar.soldin wrote: > > Jukka, > > can you please have a look at this and give your opinion? if you generally > agree that it goes into the right direction, i'd like to give Alberto svn > access. > > Alberto: what are your plans/timeline on contributing the changes to OJ? > > ..ede > > On 08.01.2015 09:16, Alberto De Luca - GeA wrote: >> Hi everyone. >> >> We've tried to add some more raster-handling features to OpenJUMP, in detail: >> >> - Overview handling (read only) for TIFF files. External (.ovr file) and >> internal overviews are now handled to speed up reading/displaying time. The >> .ovr file can be created using GDAL or ArcMap. In addition, when neither >> external nor internal overviews are found, decimation (subsampling) is used. >> When only a portion of the image is needed for display, only that part is >> loaded. Note that when only a portion of an image is loaded, there are two >> sets of image metadata (columns, rows, envelope...), one for the image >> actually loaded, the other for the whole image. You therefore will find two >> sets of getters in RasterImageLayer, one for the actual image, one for the >> whole image. >> - Raster statistics for TIFF files: they are calculated just once, and then >> written in an .aux.xml file. For display purposes the min and max cell >> values need to be known, and clearly it's better to look for them just once. >> For big rasters (> 500 MB) calculating statistics takes a few seconds, but I >> still haven't added a Pane with a message: "Please wait while calculating >> statistics", so be patient). >> >> Now memory consumption when loading large TIFF files is always reasonable, >> and when the .aux.xml and .ovr files are present, reading even a big (1 GB) >> raster is almost immediate. >> >> Again, we had to modify several classes, and we didn't feel like pushing >> them in SVN without your previous consent. Therefore, just to test you can >> download this OJ temporary build >> <https://www.dropbox.com/s/lqmlkfprnoopfi1/OpenJUMP-1.7.1-r4004-CORE.7z?dl=0> >> (built against OJ 1.7) and you can download the modified sources here >> <https://www.dropbox.com/s/sxqo96rh8jtan0k/Modified.7z?dl=0>. >> >> Let us know >> Alberto >> >> >> On 26/11/2014 9:52 AM, Rahkonen Jukka (Tike) wrote: >>> Hi, >>> >>> http://docs.geoserver.org/stable/en/user/production/data.html >>> >>> I believe that most Geoserver users are creating overviews with gdaladdo >>> but the document mentions that there is also "the OverviewsEmbedded command >>> included in Geotools". >>> >>> I use external overviews myself with Mapserver but there are pros and cons >>> + External overviews can be created for all formats >>> + When image goes to archive external overviews can be deleted for saving >>> space. Removing internal overviews from tiff file does make the file any >>> smaller without complete rewrite. >>> + It is easier to experiment with different overview resampling methods >>> because not satisfying result can just be deleted. >>> >>> - Tiff + external overviews take a bit more disk space than tiff with >>> internal overviews. >>> - Some programs support internal but not external overviews. Image mosaic >>> in Geoserver is one such example. >>> >>> In server use overviews are a must. About 30 % more disk space is needed >>> but that's nothing compared to improved speed. Overviews can also be >>> compressed (LZW or deflate for topographic maps, --config COMPRESS_OVERVIEW >>> JPEG --config PHOTOMETRIC_OVERVIEW YCBCR for aerial images) which is >>> reducing the size very much. >>> >>> For OpenJUMP usage my wish list is >>> - Ability to utilize existing overviews, ideally both external and >>> internal, and also compressed >>> - Create overviews with java from OJ. Some programs ask user "Image does >>> not have overviews. Do you want to create them? >>> >>> As you can see from the gdaladdo page there are lots of options for >>> creating overviews. For OJ perhaps the most simple recipe would do: >>> external, uncompressed overviews with so many levels that at the lowest >>> resolution the image fits into about 200x200 pixels. >>> >>> It is also possible improve the speed in small scales at least with some >>> type of tiffs even without overviews. If the tiff file is written as >>> stripes it is possible to read for example only every 10th or 50th stripe, >>> depending on the required output resolution. Probably that is not possible >>> or at least not so efficient with tiled tiffs. >>> >>> -Jukka Rahkonen- >>> >>> >>> alberto deluca wrote: >>> >>> >>>> Hi everyone. >>>> >>>> overviews sound interesting to me. I don't know either if there exists a >>>> standard, >>>> but the GDAL way to go sure is the more widely accepted/supported. I've >>>> had a >>>> look at the GDALADDO tool: overviews can be internal to the GeoTIFF or >>>> external (.ovr file). The latter is the option used by esri's ArcMap. >>>> Personally I >>>> don't like either the idea of modifying the original tif file. >>>> >>>> There might be some GeoServer or GeoTools code that creates overviews, >>>> I'll try >>>> to find out something more. I hope reading/writing the overviews won't >>>> imply >>>> that we will need to dump the JAI image drivers for something totally >>>> new... >>>> >>>> Alberto >>>> >>>> ------------------------------------------------------------------------------ >>>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from >>>> Actuate! Instantly Supercharge Your Business Reports and Dashboards with >>>> Interactivity, Sharing, Native Excel Exports, App Integration & more Get >>>> technology previously reserved for billion-dollar corporations, FREE >>>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktr >>>> k >>>> _______________________________________________ >>>> Jump-pilot-devel mailing list >>>> Jump-pilot-devel@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >>> ------------------------------------------------------------------------------ >>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >>> with Interactivity, Sharing, Native Excel Exports, App Integration & more >>> Get technology previously reserved for billion-dollar corporations, FREE >>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Jump-pilot-devel mailing list >>> Jump-pilot-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >>> >> >> >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming! The Go Parallel Website, >> sponsored by Intel and developed in partnership with Slashdot Media, is your >> hub for all things parallel software development, from weekly thought >> leadership blogs to news, videos, case studies, tutorials and more. Take a >> look and join the conversation now. http://goparallel.sourceforge.net >> >> >> >> _______________________________________________ >> Jump-pilot-devel mailing list >> Jump-pilot-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel