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

Reply via email to