Commits

James Rutherford committed 828e459 Draft

added an OGR mapping for PositiveIntegerField

  • Participants
  • Parent commits 24f577d

Comments (0)

Files changed (1)

File shapes/views/export.py

         # Map Django field types to OGR types.
         ogr_mapping = {AutoField:ogr.OFTInteger,
                        IntegerField:ogr.OFTInteger,
+                       PositiveIntegerField:ogr.OFTInteger,
                        DateField:ogr.OFTDate,
                        DateTimeField:ogr.OFTDateTime,
                        FloatField:ogr.OFTReal,
         if ogr_type == ogr.OFTReal: field_defn.SetPrecision(precision)
         if ogr_type == ogr.OFTString: field_defn.SetWidth(width)
         
-        return field_defn
+        return field_defn