From: Jonathan O. <jo...@cr...> - 2006-03-14 20:14:45
|
Can I create an Expression that draws data from an external source, like the value in a Map object under a key that matches the Feature's zip code attribute, like this: <external java.util.Map object>.get(<zipcode feature attribute>) -----Original Message----- From: Jesse Eichar [mailto:je...@re...] Sent: Monday, March 13, 2006 6:00 PM To: Jonathan Oexner Cc: geo...@li... Subject: Re: [Geotools-gt2-users] Dynamically updated map If you use the FeatureStore API the map will be automatically updated for many of the Datastore, Shapefile for certain. To get a FeatureStore use the following code: FeatureSource source = ds.getFeatureSource("roads") if ( source instanceof FeatureStore ){ // data is read/write FeatureStore store=(FeatureStore)source; .... } else { // data is read only } Styling is a bit more difficult because the data isn't in the shapefile. Symbolizers take Expressions that determine their properties such as their color, line width etc... If you don't mind not being to write the Style to file then you can define custom expressions that are used to determine the colors line widths etc... StyleFactory provides factory methods fro creating styles that use Expressions to determine the properties of the styles. Its a good place to look. Hope this email makes sense... :) Jesse On 13-Mar-06, at 2:45 PM, Jonathan Oexner wrote: > Hi, I'm pretty new to Geotools (and GIS in general) so apologies if > the > solution's obvious. > > How can I have a map that is continuously updated as new data comes > in? I > have a shapefile with all the zipcodes in a particular state, and > I'd like > to turn some of them different colors based as their properties (like > population) change over the course of a simulation. The shapefile > has the > features and the zipcodes that I can use to correlate the incoming > data, but > doesn't have slots for the parameters that I need to filter on. Any > suggestions/hints/starting points? > > Thanks, > -Jon > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the > live webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Geotools-gt2-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |