Hi Jody, thanks for the new constructor in MemoryDataStore. i checked it and it works with one exception: Creating a Layer with an empty collection using the constructor you defined the getBounds(Query query) function will return null.
If a DataStore can return null for getBounds() the calling functions should handle that (see AbstractDataStore Implemetation too expensive comment). BUT the org.geotools.map.DefaultMapLayer class does not handle it correctly. After the posted message (24th January) I patched the function (the the appended DefaultMapLayer.patch). What do you think? Frank > -----Ursprüngliche Nachricht----- > Von: "Jody Garnett" <[email protected]> > Gesendet: 27.01.09 08:48:38 > An: Frank Gasdorf <[email protected]> > CC: [email protected] > Betreff: Re: [Geotools-devel] Several problems using > MemoryFeatureCollection/MemoryDataStore > Frank Gasdorf wrote: > > Hi Jody, > > > > I used the CollectionDataStore and redesigned it a bit. I append three > > classes (MemoryService, CollectionsFeatureStore and a event class) and I > > would like to get some feedback, whether it fits into the architecture of > > geotools. > > > > Some use cases: > > - got some attribute filtered objects in client > > - display them on map and interact with them to perform some spatial > > analysis > > - select some objects in a client table and select them in map to > > (FidFilter) > > - select some objects in map and get the selection in client table > > synchronized > > > > Are there any limitations in geotools we didnᅵt reached yet if we would > > use the appended classes? Are ther other ways? Right now itᅵs not a > > requirement to get Features edited in map. The map should be a viewer for > > this kind of data. In addition the user should be able to edit other > > datasources in future (WFS-T or perhaps shapefiles). > > > > Regards > > Frank > > > I will need to look at these classes later in the week. > > With respect to your uses cases you have an option to load things into > memory (easier programming but you may need lots of memory), or staying > general and only using Filter. I have experimented with both approaches; > and both work. > > One word of advice; when you get to using massive FidFilters we may need > an optimization that can take advantage of any pattern in the stored > feature ids; ie if "foo.1", "foo.2", "foo.3" and "foo.5" are selected; > you may want to do something similar to run length encoding and store > "foo.1-3", "foo.5". > > One of the ESRI APIs I looked at had a seperate data structure for > "selections" than for "filters"; and you could switch from one to the > other. The way the Filter specification is written you can see this > split in action; Fid filter is not really supposed to be used with other > Filters in a valid WFS request. > > Jody > __________________________________________________________________ Deutschlands größte Online-Videothek schenkt Ihnen 12.000 Videos!* http://entertainment.web.de/de/entertainment/maxdome/index.html
DefaultMapLayer.patch
Description: Binary data
------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
