Hi again,
I'm setting up some JIRAs to handle some minor changes I would like to
propose in order to arrange some common utility methods. Here below, you
will find a summary with: Method, brief description, destination module,
related JIRA (with attached patch).
1) public static void ensureNonNull(final String name, final Object object)
- Makes sure that an argument is non-null. Throws a NullPointerException
leveraging on ErrorKeys.NULL_ARGUMENT_$1
- could be moved on gt-metadata ---> org.geotools.util.Utilities class
- JIRA: http://jira.codehaus.org/browse/GEOT-3039
2) public static boolean checkEmptySourceRegion(final ImageReadParam
readParameters, final Rectangle dimensions)
- Checks that the provided dimensions, when intersected with the source
region used by the provided ImageReadParam instance, does not result in an
empty rectangle. Finally, in case the region intersection is not empty, set
it as new source region for the ImageReadParam.
- could be moved on gt-coverage --->
org.geotools.resources.coverage.CoverageUtilities
- JIRA: http://jira.codehaus.org/browse/GEOT-3040
3) public static String checkDirectory(String directoryPath)
- Checks that the provided directory path refers to an existing/readable
directory.
- could be moved on gt-main ---> org.geotools.data.DataUtilities
- JIRA: http://jira.codehaus.org/browse/GEOT-3041
4) public static boolean checkFileReadable(final File file, final Logger
logger)
- Checks that a File is a real file, exists and is readable.
- could be moved on gt-main ---> org.geotools.data.DataUtilities
- JIRA: http://jira.codehaus.org/browse/GEOT-3041
5) public static IOFileFilter excludeFilters(final IOFileFilter inputFilter,
IOFileFilter... filters)
- Returns a IOFileFilter obtained by excluding from the first input filter
argument, the additional filter arguments.
- could be moved on gt-main ---> org.geotools.data.DataUtilities
- JIRA: http://jira.codehaus.org/browse/GEOT-3041
6) public static IOFileFilter includeFilters(final IOFileFilter inputFilter,
IOFileFilter... filters)
- Returns a IOFileFilter obtained by adding to the first input filter
argument, the additional filter arguments.
- could be moved on gt-main ---> org.geotools.data.DataUtilities
- JIRA: http://jira.codehaus.org/browse/GEOT-3041
7) public ReferencedEnvelope(final GeographicBoundingBox geoBBox)
- Creates a new envelope from a {...@link GeographicBoundingBox} (Using WGS84
as CRS).
- could be added as a new constructor in gt-api --->
org.geotools.geometry.jts.ReferencedEnvelope
I already have a patch for this but before to open a JIRA, I'm asking if
could be possible to add this new constructor to the api module or, being it
a critical core module, it isn't possible at all and I should opt for an
utilities method.
(Note GeographicBoundingBox comes from
org.opengis.metadata.extent.GeographicBoundingBox)
Note that 3,4,5,6 requires adding commons-io as a dependency. Do you see any
issue with this?
Please, let me know; feedbacks are welcome. Moreover, if you think I can go
on with some of them by myself, please let me know.
Regards,
Daniele
--
-------------------------------------------------------
Eng. Daniele Romagnoli
Software Engineer
GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy
phone: +39 0584983027
fax: +39 0584983027
mob: +39 328 0559267
http://www.geo-solutions.it
-------------------------------------------------------
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel