> No worries Andrea. > > Thanks for the code link. I just had a quick look at > ScanLineRasterizer and filed it to possibly steal ideas in the future > :-)
Please, please steal and enhance as you always do. Then I get back and wrap it from JAItools :) Cheers, Andrea > > Michael > > > On 4 May 2012 18:01, andrea antonello <[email protected]> wrote: >> Sorry Michael, >> I apologize, in the rush I didn't read properly enough. >> >>> Thanks, but Mario is going the other way: vector to raster. That code >>> has been meant to be rewritten and ported to JAITools for a long time >>> as the raster to vector code was but (usual excuses and my fault) it >>> is yet to happen. >> >> In this I am not able to help much. We do have a ScanLineRasterizer in >> jgrasstools which works as it should and is based on geotools and JTS. >> If that helps: >> http://code.google.com/p/jgrasstools/source/browse/jgrassgears/src/test/java/org/jgrasstools/gears/modules/TestScanLineRasterizer.java >> >> Cheers, >> Andrea >> >> >>> >>> Michael >>> >>> >>> On 4 May 2012 17:06, andrea antonello <[email protected]> wrote: >>>> Hi guys, >>>> just as a sidenote, in jgrasstools we have a Vectorizer module that >>>> wraps the JAItools vectorizer and our result is perfect. The vector >>>> exactly follows the bounds of the pixels. >>>> >>>> So the problem has to lie in the geotools part. >>>> >>>> Cheers, >>>> Andrea >>>> >>>> >>>> >>>> >>>> On Fri, May 4, 2012 at 8:03 AM, Michael Bedward >>>> <[email protected]> wrote: >>>>> Hello Mario, >>>>> >>>>> There was the following Jira issue involving alignment of the input >>>>> vectors and output raster last year, but I thought I'd fixed it and >>>>> put some unit tests in place. >>>>> >>>>> http://jira.codehaus.org/browse/GEOT-3510 >>>>> >>>>> I've no suggestion as to what's happening with your case. Polygons are >>>>> rasterized by using AWT drawing routines, so perhaps it is something >>>>> nasty to do with anti-aliasing settings ? That is nothing more than a >>>>> guess. >>>>> >>>>> Can I ask you to have a look at the unit tests for vector to raster >>>>> conversion and see if your own case has any particular properties that >>>>> are not covered by the existing tests. Even better would be if you >>>>> could turn your example into a small test case and attach it to a Jira >>>>> issue. >>>>> >>>>> I'm afraid I can't promise when I will get to this - I'm unable to >>>>> spend time on GeoTools development at the moment. However, someone >>>>> else here might have a suggestion or have experienced the same >>>>> problem. >>>>> >>>>> Michael >>>>> >>>>> >>>>> >>>>> On 3 May 2012 19:37, Mario Haertwig <[email protected]> wrote: >>>>>> Dear GeoTools-users, >>>>>> I am trying to perform a vector to raster conversion in GeoTools 2.7.4 >>>>>> by using the following command: >>>>>> >>>>>> >>>>>> GridCoverage2D raster = VectorToRasterProcess.process(collection, >>>>>> "test", new Dimension(100,100), collection.getBounds(), >>>>>> "mask", null); >>>>>> >>>>>> // (output) >>>>>> GeoTiffWriter gt = new GeoTiffWriter(new File("d:/test.tif")); >>>>>> gt.write(raster, null); >>>>>> >>>>>> >>>>>> As you can see in the image at [1], the the created raster does not >>>>>> exactly overlap the input feature. It seem to be shifted to the left. >>>>>> What is the reason for this? >>>>>> Thanks a lot, >>>>>> Mario >>>>>> >>>>>> [1] http://tinypic.com/r/107m9na/6 >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Live Security Virtual Conference >>>>>> Exclusive live event will cover all the ways today's security and >>>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>>> will include endpoint security, mobile security and the latest in malware >>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>>> _______________________________________________ >>>>>> GeoTools-GT2-Users mailing list >>>>>> [email protected] >>>>>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Live Security Virtual Conference >>>>> Exclusive live event will cover all the ways today's security and >>>>> threat landscape has changed and how IT managers can respond. Discussions >>>>> will include endpoint security, mobile security and the latest in malware >>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>>>> _______________________________________________ >>>>> GeoTools-GT2-Users mailing list >>>>> [email protected] >>>>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ GeoTools-GT2-Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
