MosaicIndexBuilder writes wrong filenames in the .shp file
----------------------------------------------------------
Key: GEOT-1448
URL: http://jira.codehaus.org/browse/GEOT-1448
Project: GeoTools
Issue Type: Bug
Components: gc coveragetools
Affects Versions: 2.3.4
Environment: ubuntu feisty, java 1.6
Reporter: Stefan Alfons Krüger
I was experiencing a strange behavior for some source paths.. in my case
MosaicIndexBuilder was called from PyramidBuilder for a source file:
"/home/stefan/EigeneDateien/Desktop/NoSync/bigGeoTiff/some.tiff"
the filenames in the .shp then looked like "iff/0/mosai" which later cashed the
creation process
i suppose the error only appears, when getCanonicalPath() returns something
shorter/longer than the "normal" path.
I figured the bug to be in MosaicIndexBuilder.run() around line 295, where a
validFilename is build up...
This is a proposal for a fix:
validFileName = validFileName.replace('\\', '/');
// =
/home/stefan/EigeneDateien/Desktop/NoSync/bigGeoTiff/pyramid/0/mosaic_0.tiff
// Just for paranoia...
if (validFileName.endsWith("/"))
validFileName =
validFileName.substring(0,validFileName.length()-1);
validFileName = validFileName.substring(
validFileName.lastIndexOf('/')+1);
// mosaic_0.tiff
Before if was:
validFileName = validFileName.replace('\\', '/');
validFileName =
validFileName.substring(locationPath.length() + 1,
fileBeingProcessed.getAbsolutePath().length());
Greetings,
steve
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel