[Gdal-dev] Question about gdal_rasterize
Frank Warmerdam
warmerdam at pobox.com
Wed Apr 12 12:07:49 EDT 2006
Guillaume HUBY wrote:
> Frank,
>
> I had a look on apps\gdal_rasterize.cpp and GDALRasterizeGeometries(...) in
> alg\gdalrasterize.cpp and it seems quite tricky and taking too much time
> investment to get down lower levels and get what I want.
>
> The alternative you proposed should be OK for my purposes, but it is not an
> exact solution : think of a thin part of polygon getting inside and outside
> a pixel through the same side (yes, that's a tricky case) ...
>
> An exact method should compute if a polygon edge cut a pixel edge and if
> pixel is inside polygon.
Guillaume,
You are correct. My proposed approach would still have a few error
conditions. I can't think of an exact implementation of what you want
that would not be expensive.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGF, http://osgeo.org
More information about the Gdal-dev
mailing list