Hi Daniele; quick email (since I am using a lame web email client). At first I
thought it was a bit odd to set functionality changes as part of "Hints", am I
correct in thinking that a GridCoverage is still returned (just optimized for a
different execution path).

As long as you are thinking about hints for the readers:
- the Hints.CRS hint is already defined (used by GeometryFactory), can you
respect this hint as a override (allowing client code to correct or provide) a
projection for cases like MRSID where the metadata is often incomplete.
- You may also want to create a bounds parameter (for when that information is
wrong); this case may already be covered as I seem to recall you can stuff a
math transform into the reader...

When you define your Hint I believe you can:
- specify a default value
- have a default  value supplied by a -Pproperty (or conversely a client
application could use GeoTools.init( Hints ) to provide global hints.


I created a page for your unsupported/mrsid module here:
- http://docs.codehaus.org/display/GEOTOOLS/MRSID

In related news I been trying to collect information on some of the older image
plugins (by way of making a moasic of mrsid images).
- http://docs.codehaus.org/display/GEOTDOC/Image+Mosaic+Plugin
- http://docs.codehaus.org/display/GEOTDOC/Image+Pyramid+Plugin

So far the good docs are on the geoserver site, and none of them tell me the
format of the shp file.

Jody


Quoting Daniele Romagnoli <[EMAIL PROTECTED]>:

> Hi list.
> I'm developing additional GeoTools plugins (to handle ECW, MrSID and some
> other raster formats) and, with Simone, we have decided to customize data
> access.
> Basically, we would like to specify in some manner whether data should be
> accessed with a Jai-ImageRead operation (leveraging on Tiling,
> DeferredExecution,...) or data should be accessed with a simple/direct
> ImageReader.read(...params).
> 
> As a first step, I have added a new DefaultParameterDescriptor in the
> AbstractGridFormat in org.geotools.coverage.grid.io (gt2-coverage module),
> like this:
> public static final DefaultParameterDescriptor USE_JAI_IMAGEREAD = new
> DefaultParameterDescriptor("UseJaiImageRead", Boolean.class, null, null);
> 
> Moreover I would like supporting Hints.
> So, I have defined a new Hint in Hints class (in org.geotools.factory) like
> this:
>             public static final Key USE_JAI_IMAGEREAD = new Key(
> Boolean.class);
> By this way, when using the constructor of
> org.geotools.gce.myformat.MyFormatReader I can specify a Hint which should
> be used to customize data access.
> 
> Prior to perform data access, the MyFormatReader should check (following
> checks are ordered from higher priority to lower priority):
> 1) If the GeneralParameterValue[] parameters list as argument of the read
> operation contains a defined USE_JAI_IMAGEREAD ParameterDescriptor.
>   In case it exists, the read access will be performed compliantly with this
> parameter.
> 2) if a USE_JAI_IMAGEREAD Hint has been specified at construction time.
> (data access will be performed compliantly with the value of this Hint)
> 3) if a default Hint is available.
> 
> I would like to set a Default USE_JAI_IMAGEREAD Hint (TRUE).
> http://docs.codehaus.org/display/GEOTDOC/01+Factory+and+Hint+Tutorialprovides
> some instructions about how to set Default Hints.
> However, I'm a bit confused about where I need to set Default Hints. All
> MyFormatFactory classes implement GridFormatFactorySpi.
> I guess I need to do something like this (however, I'm not sure about this):
>     static {
>           Hints hints = new Hints(Hints.USE_JAI_IMAGEREAD, Boolean.TRUE);
>           Hints defHints = GeoTools.getDefaultHints();
>           defHints.add(hints);
>           GeoTools.init(defHints);
>        }
> 
> For the moment, (just for testing purposes) I placed this code in
> AbstractGridFormat but I'm really sure this is the wrong place.
> I'm not really experienced about Hints and a help (with some additional
> suggestion) would be really appreciated.
> 
> Thx a lot.
> 
> --
> Best Regards,
> Daniele Romagnoli
> 





-------------------------------------------------------------------------
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

Reply via email to