[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[udig-devel] Layer on Map and Catalog
|
Hi Again; breaking up response by topic in case any of the discussions go anywhere....
On 08/05/2010, at 7:41 AM, Rueben Schulz wrote:
> Layer on map and Catalog
> -------------------------
>
> Adding an image layer to a map (in my case the map is in a View) "helpfully"
> adds the image to the uDig Catalog (done by LayerFactory.createLayer()).
That is not optional; the catalog is more of a debugging view showing the "current" connections. For end user applications I traditionally only include the "search" view. Indeed although the catalog view class is implement in net.refractions.catalog.ui - the xml that includes it in the application is only contributed by net.refractions.udig - and does not need to be included in your own application if you don't want it.
> This is not desirable, since I have lots of overlapping, oblique images to
> deal with. As a temporary solution I am removing the layer from the catalog
> after I am done with it.
Interesting!
Suggestions:
- CatalogImpl is a class; you can make your own "LocalCatalog" for your view ... have not tried it myself but it should be fun; the important part is cleaning up after resources when it is done.
- Have you considered Image Moasic? It amounts to a shapefile that acts an index to a directory of images; and if pointed at a directory of images it will create the shapefile...
> Is there an easy way to add an image to a map without it showing up in the Catalog?
No; the answer is to not show the catalog; or to cheat ... you could use the ServiceFactory to make your IService and manage it yourself; but still chances are the map rendering code will look for things in the local catalog (since that is tracking all "connections").
A puzzle :-(
We do have the concept of a "scratch" layer used for temporary resources; could we make a service that would hold your temporary images?
There is a directory datastore for GeoTools; that will manage a bunch of DataStores (one for each file); we do not have an equivalent for GridCoverageReaders; but that is the kind of direction I am thinking. A single Service which you can use to hold onto your coverage; use it; and then throw it away when you are done ...
> Alternatively, is there a way to group images into a "Folder" within the
> Catalog (like MapGraphics under Decoration)? This way I wouldn't have 10s or
> 100s of images cluttering up the Catalog.
Just so - the folders are called IService. And yes you could create one to track your images.
jody