Ticket #2852 (closed defect: fixed)
OGR2OGR MySQL to Shapefile Truncating Decimal Places
|Reported by:||mthompson||Owned by:||chaitanya|
While attempting to create a ESRI shapefile from the results of a SQL query on a MySQL DB using OGR2OGR included with FWTools 2.2.8 (GDAL 1.6.0dev) the operation completes without reporting any errors and the shapefile is created as expected, but when I load the shapefile in ArcMap? all the floating point columns in the attribute table have no decimal places. If I run the query in MySQL Query Browser the results contain the decimal places that I expect. I’ve tried rounding the selected columns in the query to force the results to have a set number of decimal places but this does not seem to change the output. I was able to work around the problem by converting the double columns to chars in the query so that OGR2OGR treated them as strings.