Re: [Geotools-gt2-users] JMapPane force repaint

2009-01-21 Thread Michael Bedward
Can you just get away with this ? static class MyGridLayer extends DefaultMapLayer { public MyGridLayer(GridCoverage2D cov, Style style) { super(cov, style); } public void dataChanged() { sourceListener.changed(null); } } The comp

Re: [Geotools-gt2-users] JMapPane force repaint

2009-01-21 Thread Greg Ederer
On Jan 21, 2009, at 6:27 PM, Greg Ederer wrote: > Hi Michael, > > This does not quite work because the the compiler is unable to locate > the newly defined method in the anonymous subclass. But, creating a > named subclass of DefaultMapLayer with your dataChanged method does > work. > > You have

Re: [Geotools-gt2-users] JMapPane force repaint

2009-01-21 Thread Greg Ederer
Hi Michael, This does not quite work because the the compiler is unable to locate the newly defined method in the anonymous subclass. But, creating a named subclass of DefaultMapLayer with your dataChanged method does work. You have to override all of the constructors in DefaultMapLayer, s

Re: [Geotools-gt2-users] Geotools Rule Description

2009-01-21 Thread Michael Bedward
Hi again Luong, I'm just learning about this stuff myself... The programmatic way of drawing a green line would look like this... SimpleFeatureType type = ... StyleFactory factory = CommonFactoryFinder.getStyleFactory(null); StyleBuilder sb = new StyleBuilder(factory);

Re: [Geotools-gt2-users] Geotools Rule Description

2009-01-21 Thread Michael Bedward
> I see, in the example code, which i know is out of date, but it gives me a > starting block for learning this, Hi Luong, I don't think you should study that example because things have changed, and are changing, so much that it will just make it all more confusing. For simple stuff (which is a

Re: [Geotools-gt2-users] JMapPane force repaint

2009-01-21 Thread Michael Bedward
Greg, Could you test this for me please ? // instead of myMapContext.addLayer( myGrid, myStyle ) do this... // MapLayer myGridLayer = new DefaultMapLayer(myGrid, myStyle) { public void dataChanged() { sourceListener.changed(null); }

Re: [Geotools-gt2-users] Geotools Rule Description

2009-01-21 Thread nvidia
I see, in the example code, which i know is out of date, but it gives me a starting block for learning this, roadsStyle.addFeatureTypeStyle(sb.createFeatureTypeStyle(null, sb.createRule(ls2))); http://docs.codehaus.org/display/GEOTOOLS/Putting+everything+together i don't seen a condition being

Re: [Geotools-gt2-users] Geotools Rule Description

2009-01-21 Thread Michael Bedward
Ah someone who understands SLD... it's dangerous admitting that Ajay - people will ask you questions :-) I've seen examples of filling polygons in a small number of different colours depending on the value of a data attribute. But do you know if there is a way of specifying a colour ramp or categ

Re: [Geotools-gt2-users] creating coordinates in JTS using gps data

2009-01-21 Thread Michael Bedward
> where x and y are of type double. however, since my gps gives me data in > the form of 144 12.345 where the 144 is degrees and the 12.345 is minutes, > how do i create coordinates if the constructor takes doubles? This is how I would do it... double toDecimalDeg(double deg, double min) {

Re: [Geotools-gt2-users] Reading binary Float32 rasters

2009-01-21 Thread Michael Bedward
> Do you have commit privileges to the geotools codebase? Yes I do -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword

Re: [Geotools-gt2-users] JMapPane force repaint

2009-01-21 Thread Michael Bedward
> I have a JMapPane displaying a MapContext containing a number of > layers. I modify one of these layers via > WritableRandomIter.setSample(x, y, b, value). When I pan or zoom, the > changes appear. Is there some way that I can force the changes to > appear programmatically? Ah, good question

Re: [Geotools-gt2-users] creating coordinates in JTS using gps data

2009-01-21 Thread ari fainchtein
M, thanks for the code. in it you say: vertices[k++] = new Coordinate(x, y); where x and y are of type double. however, since my gps gives me data in the form of 144 12.345 where the 144 is degrees and the 12.345 is minutes, how do i create coordinates if the constructor takes doubles? O

Re: [Geotools-gt2-users] Reading binary Float32 rasters

2009-01-21 Thread Simone Giannecchini
Sure thing. Do you have commit privileges to the geotools codebase? Simone. --- Ing. Simone Giannecchini GeoSolutions S.A.S. Owner - Software Engineer Via Carignoni 51 55041 Camaiore (LU) Italy phone: +39 0584983027 fax: +39 0584983027 m

Re: [Geotools-gt2-users] Reading binary Float32 rasters

2009-01-21 Thread Michael Bedward
Ciao Simone, Actually that would be very useful for me. Perhaps I could email you some code in the next week or two ? Michael -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your sto

Re: [Geotools-gt2-users] Reading binary Float32 rasters

2009-01-21 Thread Simone Giannecchini
Ciao Michael, well, if you ever want to quickly hack a plugin for binary floating point rasters, I'll be glad to help out. Simone. --- Ing. Simone Giannecchini GeoSolutions S.A.S. Owner - Software Engineer Via Carignoni 51 55041 Camaiore (LU) It

Re: [Geotools-gt2-users] Geotools Rule Description

2009-01-21 Thread AJ R
Hi The general idea is that using a Rule you can control how to render the feature. A Rule has a condition.If the condition is satisfied the Symbolizer defined under the rule hold good, so the feature will be drawn based on those symbolizers. The condition can either be a Filter or Scale value.

[Geotools-gt2-users] Geotools Rule Description

2009-01-21 Thread nvidia
Hi i was reading the page http://docs.codehaus.org/display/GEOTDOC/05+Style about styles. Would somebody kindly explain the purpose of having a rule and what relationship it has with the sysmbolizers, because i don't really understand what it is saying concerning the rules. Thanks -- View this m

Re: [Geotools-gt2-users] Is MapContext thread-safe?

2009-01-21 Thread Simone Giannecchini
As far as I remember MapContext should not be thread safe, however if the access it read only, yo should be good to go. Simone. --- Ing. Simone Giannecchini GeoSolutions S.A.S. Owner - Software Engineer Via Carignoni 51 55041 Camaiore (LU) Italy

Re: [Geotools-gt2-users] Parsing/Filtering a user WMS getMap request

2009-01-21 Thread Andrea Aime
Milan Antonovic ha scritto: > Hi all, > I am trying to intercept a user WMS getMap request in a servlet filter, > and I would like to parse it into a GetMapRequest > (org.geotools.data.wms.request.GetMapRequest) object so that I can after > that use its functions. > > Are there some parser that

[Geotools-gt2-users] JMapPane force repaint

2009-01-21 Thread Greg Ederer
Hi, I have a JMapPane displaying a MapContext containing a number of layers. I modify one of these layers via WritableRandomIter.setSample(x, y, b, value). When I pan or zoom, the changes appear. Is there some way that I can force the changes to appear programmatically? Thanks! Greg

Re: [Geotools-gt2-users] Parsing/Filtering a user WMS getMap request

2009-01-21 Thread Adrian Custer
Hey, Generally, the getMap request is all in the URL so you merely need to parse that. It's the stuff after the '?' in key value pairs. Are you looking for code in GeoTools that does that for you? I don't know of any off the top of my head. The request could also be sent in the body of a message

[Geotools-gt2-users] Parsing/Filtering a user WMS getMap request

2009-01-21 Thread Milan Antonovic
Hi all, I am trying to intercept a user WMS getMap request in a servlet filter, and I would like to parse it into a GetMapRequest (org.geotools.data.wms.request.GetMapRequest) object so that I can after that use its functions. Are there some parser that can do the job passing the HttpServletReques

Re: [Geotools-gt2-users] Vector to Raster conversion

2009-01-21 Thread jorgearevalo
Hello I think I'm the one who made the question :-). Many thanks for the help. I'm sure it will be really, really useful. I'll inform Regards Jorge Steve.Ansari wrote: > > Hello all, > > I received a question about the rasterization code (Features to Grid > Coverage) and upgraded the code to

Re: [Geotools-gt2-users] Reading binary Float32 rasters

2009-01-21 Thread Michael Bedward
> just out of curiosity, what's your goal with binary grids? I have been > thinking for a while about to create a plugin for that, but I never > got the time for the task. Hi Simone, I'm working with data, both real and artificial, on habitat resources for animals and these are often in the form

Re: [Geotools-gt2-users] Reading binary Float32 rasters

2009-01-21 Thread Simone Giannecchini
Ciao Michael, just out of curiosity, what's your goal with binary grids? I have been thinking for a while about to create a plugin for that, but I never got the time for the task. Simone. --- Ing. Simone Giannecchini GeoSolutions S.A.S. Owner - S