Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#25533 closed Bug (fixed)

GDALRaster GDT_Byte Datatype mapped wrongly to ctypes

Reported by: Daniel Wiesmann Owned by: nobody
Component: GIS Version: 1.9a1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The constant mapping of GDAL datatypes to ctypes datatypes in contrib.gis.gdal.raster.const.GDAL_TO_CTYPES wrongly maps GDT_Byte to c_byte, when it should be c_ubyte. GDT_Bytes are unsigned 8 bit integers.

Change History (3)

comment:1 by Daniel Wiesmann, 9 years ago

Here is the patch for it

https://github.com/django/django/pull/5417

Sorry for not noticing this earlier, numpy does automatic overflow mapping for bytes data, so I did not realize that this was a problem until today.

comment:2 by Claude Paroz <claude@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 5d898500:

Fixed #25533 -- Changed datatype mapping for GDALRasters

comment:3 by Claude Paroz <claude@…>, 9 years ago

In 4326ac68:

[1.9.x] Fixed #25533 -- Changed datatype mapping for GDALRasters

Backport of 5d8985005e from master.

Note: See TracTickets for help on using tickets.
Back to Top