Uh, ok, I forgot to add () after the variable name:
CPLLocaleC oLocaleCForcer();
For future readers, I also specify that this declaration must be placed
*after* the "OGRRegisterAll();" line to take effect.
For completeness, does anyone know how to do the same hack in Python code?
Thank you all,
If I include "gdal/cpl_conv.h", code completition works, but I get a
compilation error:
undefined reference to `CPLLocaleC::CPLLocaleC()'
I searched in the source files of my GDAL library version (1.7.0) and the
CPLLocaleC class definition exists. I'm sorry for asking again you help!
My compilat
Ok, I executed many tests and I found something strange.
I tried:
- QT Creator,
- CodeLite,
- Python
I wrote the following programs;
// C++ CodeLite version.
#include "gdal/ogrsf_frmts.h"
int main(int argc, char *argv[])
{
OGRRegisterAll();
OGRSFDriver *driver =
OGRSFDriverRegistrar::Ge
In addiction to what I previously wrote, I noticed that the problem does not
affect the x and y coordinates of the point.
I'm using the last version of the Linux Mint OS.
--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/OFTReal-values-truncated-to-integer-tp4933952p4935441.htm
When I open the dbf file with LibreOffice Calc, the value of the Elev field
is 1.
*If I open the same file with GHex, the value, represented in ASCII, is
"1,3"*, so I think that you're right and GDAL uses my local settings and
writes reals using the comma to separate the decimal digits from the int
I have a problem on storing double values on shapefiles fields.
If I execute this code:
//...
OGRFieldDefn zField("Elev", OFTReal);
layer->CreateField(&zField);
//...
OGRFeature *pointFeature = OGRFeature::CreateFeature(layer->GetLayerDefn());
OGRPoint thePoint;
thePoint.setX(1);
thePoint.setY(1);