[FWTools] Bindings for DBF and PNG

Frank Warmerdam warmerdam at pobox.com
Tue Apr 26 12:54:15 EST 2011


On 11-04-26 12:21 PM, Susana Iraiis Delgado Rodriguez wrote:
> Hello list!
>
> I'm trying to get information from shapefiles and dbf files. What I need is get
> the dbf fieldnames, type, etc. But I'm not sure what libraruy to use. Besides
> that, I need to get an image out of a shapefile.
> Does FWTools have a library to work with them?

Susana,

You can do both functions with the GDAL/OGR library which is included in
FWTools.  For data access to shapefiles and their associated DBF files use
the OGR API:

   http://www.gdal.org/ogr/ogr_apitut.html

You mention getting an image out of a shapefile but in the subject you mention
PNG format.  Assuming you want to read an image from a PNG file you can use the
GDAL library to do that.

   http://www.gdal.org/gdal_tutorial.html

The GDAL/OGR library is available as part of FWTools.  To use it include
the FWTools<version>\include directory in your include path, and link against
FWTools<version>\lib\gdal_i.lib.  You will need to have the
FWTools<version>\bin directory in your path for your application.

However, FWTools isn't primarily intended as a software development kit, so
you might also just want to build GDAL from source instead of using the
FWTools version.

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 FWTools mailing list