[FWTools] OGR2OGR MySQL to Shapefile Truncating Decimal Places

Michael Thompson mthompson at geostats.com
Mon Feb 23 14:00:57 EST 2009


Hi All,

 

I'm 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.  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.

 

Does anyone have any ideas as to what could be causing this behavior?
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, but this
seems messy.

 

 

Thanks,

 

Michael Thompson

Software Engineer

mthompson at geostats.com <mailto:mthompson at geostats.com> 

 

GeoStats LP

530 Means St., Ste. 310

Atlanta, Georgia 30318

(404) 588-1004

www.geostats.com
<outbind://24-00000000511E5A93E91F1E409B27A98F802DED430700125390C6B93649
4D8D0FA934F3944E440000006DF05E0000E5D9342930770E4AA47BA509694F375E000006
185B400000/www.geostats.com> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20090223/a617e85f/attachment.htm 


More information about the FWTools mailing list