Thank you Frank!<br><br>I've read the OGR API documentation before, I'm using Python and OGR to get the dbf fieldNames, but I got an error when the shp and dbf have no records.<br><br>Maybe I didn't expalin my question about the image file. What I need is to create a raster image from a shapefile, the raster could be any type. <br>
<br>Do you have any idea how can I do that?<br><br><div class="gmail_quote">2011/4/26 Frank Warmerdam <span dir="ltr"><<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On 11-04-26 12:21 PM, Susana Iraiis Delgado Rodriguez wrote:<br>
> Hello list!<br>
><br>
> I'm trying to get information from shapefiles and dbf files. What I need is get<br>
> the dbf fieldnames, type, etc. But I'm not sure what libraruy to use. Besides<br>
> that, I need to get an image out of a shapefile.<br>
> Does FWTools have a library to work with them?<br>
<br>
</div></div>Susana,<br>
<br>
You can do both functions with the GDAL/OGR library which is included in<br>
FWTools. For data access to shapefiles and their associated DBF files use<br>
the OGR API:<br>
<br>
<a href="http://www.gdal.org/ogr/ogr_apitut.html" target="_blank">http://www.gdal.org/ogr/ogr_apitut.html</a><br>
<br>
You mention getting an image out of a shapefile but in the subject you mention<br>
PNG format. Assuming you want to read an image from a PNG file you can use the<br>
GDAL library to do that.<br>
<br>
<a href="http://www.gdal.org/gdal_tutorial.html" target="_blank">http://www.gdal.org/gdal_tutorial.html</a><br>
<br>
The GDAL/OGR library is available as part of FWTools. To use it include<br>
the FWTools<version>\include directory in your include path, and link against<br>
FWTools<version>\lib\gdal_i.lib. You will need to have the<br>
FWTools<version>\bin directory in your path for your application.<br>
<br>
However, FWTools isn't primarily intended as a software development kit, so<br>
you might also just want to build GDAL from source instead of using the<br>
FWTools version.<br>
<br>
Best regards,<br>
--<br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/%7Ewarmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush | Geospatial Programmer for Rent<br>
<br>
_______________________________________________<br>
FWTools mailing list<br>
<a href="mailto:FWTools@lists.maptools.org">FWTools@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/fwtools" target="_blank">http://lists.maptools.org/mailman/listinfo/fwtools</a><br>
<a href="http://fwtools.maptools.org/" target="_blank">http://fwtools.maptools.org/</a><br>
</blockquote></div><br>