[Freegis-list] Rasters, Vectors and spatial databases

Frank Warmerdam fwarmerdam at gmail.com
Mon Aug 1 16:33:58 CEST 2005


On 8/1/05, Jose Gomez-Dans <jgomezdans at gmail.com> wrote:
> Hi Frank,
> Thank you very much for your prompt reply. It is really very appreciated!
> > OGR, the vector side of GDAL/OGR can support Oracle Spatial,
> > so in if you build it carefully to include Oracle support you could use
> > OGR to extract the polygon(s) from Oracle.  Either at the commandline
> > with ogr2ogr, using the C++ API or perhaps from Python.
> 
> OK, this looks like a doable possibility. There's also a C interface
> to OGR, is there not?

Jose, 

Yes, there is a C interface to OGR as well. 
 
> > I'm not sure what you have been using to rasterize he polygons so
> > far, but I do know of folks doing this sort of thing with MapServer.
> > The whole process could also be automated in GRASS which includes
> > GDAL raster access and OGR vector access as well as good polygon
> > rasterization for masking, and sophisticated sorts of raster analysis.
> > You might need to be somewhat handy with shell scripting to automate
> > it in GRASS.
> 
> I think my colleagues working ont he GIS side have used some
> propietary software, but rasterisation is problematic for a number of
> reasons, and needs a fair bit of user input. Ideally, I would like to
> have the polygon edges, and select the pixel values which lie within
> said polygon. I have coded similar algorithms in the past, but have
> found that my implementation was *ahem* not optimal :), and I was
> thinking that there ought to be a better implementation. OSSIM has an
> implementation  (see
> <http://www.remotesensing.org/doxygen/ossim/classossimPolygon.html#a27>),
> so this could be re-implemented (given it is free software) for our
> purposes. I was actually wondering whether GDAL and OGR are connected
> somehow.

I didn't actually see any methods on the ossimPolygon for rasterization.

If you are prepared to do some work reimplemnting, it should be
possible to use the polygon rasterization code from OpenEV 
(gvrasterize.c and llrasterize.c) or go back to GD for polygon 
rasterization code.  

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    | Geospatial Programmer for Rent




More information about the Freegis-list mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)