Thanks Jody! I see more clearly now :-)
One can say that the catalogue is manager of data access. The page is very useful, I have a small comment/question. It states that the DataStore is designed to be singleton. I found factories for the DataStores in the API, are they helpful for detecting conflicts such as you described? Thank you for the quick answer Tiago -----Original Message----- From: Jody Garnett [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 31 de Maio de 2007 18:50 To: Tiago Simões Cc: [email protected] Subject: Re: [Geotools-gt2-users] How to access data - Catalog or DataStore Tiago Simões wrote: > > Hi all, > > I am exploring the potential of using Geotools in a GIS Project. From > reading the available documentation, specially the tutorials, I found > two different ways of accessing GIS data, directly by creating a > suitable DataStore or by the services provided by a catalogue. However > I am still confused by the whole catalogue idea. > The catalog idea is a work in progress - it comes from our two major applications (GeoServer and uDig) both of which need to store "database" of all the data they are working with. And then "connect" to the data only when needed. You may have thousands of entries in your catalog (all the gis data on your computer?) and only be using 10 of them for your current map. This is the "lazy access" for which catalog was created. The other thing it does it let you manage WebMapServer, DataStores and Rasters in a similar manner. When you do direct access you will need to use different classes to access each kind of content. > > Could someone describe to which scenarios each approach is best suited? > Stick with the direct access for now. If you are working with uDig or GeoServer make use of the facilities they provide. I would not advice being interested in the catalog until uDig and GeoServer sort out their needs ... and provide GeoTools with the soft gooey useful common denominator. There are several earlier attempts at this idea in the GeoTools codebase - only one is left: - Repository - like catalog but uses Strings for keys and does not support lazy access Because this is a common question I have created a page for you to review here - - http://docs.codehaus.org/display/GEOTDOC/Managing+DataStores+using+Repositor y+and+Catalog Please provide feedback :-) Jody ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
