Hello Michael and Andrea,

thanks for your reply. Meanwhile I had a closer look at the
VectorToRasterProcess code and I solved the problem by changing the
value of PixelOrientation to "UPPER_LEFT".

Concretely I did the following quick-and-dirty-hack:
For the determination of the grid position in line 621 in
VectorToRasterProcess.java I am now using the following code:

        MathTransform2D cRSToGrid2D =
gridGeom.getCRSToGrid2D(PixelOrientation.UPPER_LEFT);
        GridCoordinates2D gridPos= cRSToGrid2D.transform(worldPos, gc2D);

The created raster is not shifted anymore.
@Andrea: Thanks for your advice. I will have a look at jgrasstools!
But vectorizing a raster in GeoTools also works perfect ;-)

Cheers,
Mario

------------------------------------------------------------------------------
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