Hey, I will give it a try and keep you informed :-)
Can you point me with the most relevant tutorial to start with ? I'm discovering geotools as my developments progress and didn't try them all yet. I'm not very familiar yet with the renderer... In my case, the user of my application is going to draw grids on the map "by hand" (i.e. with a mouse drag-and-drop). In order to optimize the coverage of an area with the minimal number of grid cells, the user might want to rotate a long island going from north-east to south- west (for instance). If you rotate your map of 45 degrees, you can draw a grid with fewer cells to cover the whole island (which would be left-right oriented and not diagonal anymore). Of course, one could simply rotate the grid instead, but it is maybe not as easy to manipulate for the user... and the specifications I follow did'nt mention that option, so I guess I will have to try with the map rotation :-) Le 7 déc. 08 à 22:26, Adrian Custer a écrit : > Hey Andrea, > > you are right that it's worth a try to see if the renderer can > simply be > wrapped with a transform---it would not take long to try. However, if > memory serves, a couple of folk have tried over the past few years and > left me with the impression that things didn't work right. Hopefully > we > can hear more if Benoit gives it a shot. > > There are lots of reasons to rotate maps. The most common these days > is > on all the car gps units which want up on the screen to be forwards > from > the driver's point of view. Layout for printing is another, when one > works on odd shaped areas and doesn't want to waste lots of paper. The > list goes on. > > cheers, > --adrian > > > > On Sun, 2008-12-07 at 22:19 +0100, Andrea Aime wrote: >> Adrian Custer ha scritto: >>> Hey, >>> >>> It's my impression that you are out of luck for simple solutions >>> since >>> the renderer that JMapPane uses was not built to simply >>> concatenate a >>> string of transforms. That would have allowed you to simply add on >>> one >>> more affine transform and still be able to remap both data to your >>> pane >>> and mouse-clicks back to features. As things now stand, it will be >>> hard >>> to rotate your rendering and have things work out correctly--- >>> apparently >>> people have tried before and things were weird. >> >> Off the top of my head it seems one just need to chain a rotation >> transform to the transformation that is provided to >> StreamingRenderer.process(...), without touching the transform >> that gets passed to processStylers (since it's apparently used >> for querying the database as well). >> >> However, haven't tried, things could be hairier than this. >> >> Out of curiosity... why do people want to rotate maps? Maybe >> I'm just used to projections that leave the northwards direction >> "up"... I know for sure that I would have some troubles locating >> my house in my town map if someone rotated the map so that >> north points "down"... >> >> Cheers >> Andrea >> ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
