[Qgis-user] shapefile/dbf number limitation?

David J. Bakeman dbakeman at comcast.net
Tue Apr 17 15:28:00 PDT 2012


William Kyngesburye wrote:
> On Apr 17, 2012, at 3:58 PM, John C. Tull wrote:
>
>    
>> On Apr 17, 2012, at 1:18 PM, William Kyngesburye wrote:
>>
>>      
>>> I'm adding some real number fields to a shapefile and QGIS only lets me set up to 5 decimal digits.  I would like more.  Is this intentional or is something broken?
>>>        
>> Hi William,
>>
>> Are you hitting the normal shapefile limitations, or is this unique to QGIS shapefile handling? See the table in the link below.
>>
>> http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Geoprocessing_considerations_for_shapefile_output
>>
>>      
> It's not a shapefile (DBF) limitation.  I can convert a postgis feature with a double real field to shapefile (ogr2ogr) and get a 24.12 formatted number in the DBF, and QGIS will even display the field info as such.
>    
It seems to be a limitation in the code (I only have access to 1.7.1 at 
the moment) for example in qgsnewvectorlayerdialog.cpp it limits the 
range of precision values to 0-5 and it appears (not from looking at the 
code but just using the interface) that this limitation is in the add a 
column part of the attribute table.   I'm not sure why this would be 
having a precision greater than 5 from an input shapefile is no problem 
to qgis that I've noticed anyway.
> I think the info in that ESRI attribute limitations table is specific to how Arc converts geodb fields to shapefile.  According to the shapefile specs, any field type supported in the DBF format is valid.
>
> -----
> William Kyngesburye<kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> The equator is so long, it could encircle the earth completely once.
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>    




More information about the Qgis-user mailing list