[gdal-dev] Core dump: old gdal, bug in gdal, bug in data?

Russell McOrmond russell at flora.ca
Fri Oct 23 12:27:06 EDT 2009


   I downloaded some ESRI shapefiles from
http://geogratis.cgdi.gc.ca/geogratis/en/option/select.do?id=1169
  These are shapefiles which represent the electoral districts of
Canada, for election years 2000, 2004, 2006 and 2008.

  What I'm wondering is if someone with better knowledge of shapefiles
(and maybe a copy of ArcGIS desktop) could download and take a quick
look and see if the problem is in the Shapefile or in GDAL.  I no longer
have access to ArcGIS desktop to check things out.

  My preference is to use the latest, but it seems that ogrinfo will
core dump on 2006 and 2008.  I was wanting to import this data into
PostGIS for use with Mapserver.

In 2000 it was not the same boundaries as they are now (they changed in
2003 -- and will again in 2013).

In 2004 it is the right boundaries, with only the electoral ID as data.
 This worked: ogr2ogr -f KML fed308.2004_a.kml fed308.2004/fed308_a.shp
FED_NUM: Integer (9.0)

In 2006 they added more information, and now ogr tools core dump with a
buffer overflow.
AREA: Real (20.5)
PERIMETER: Real (20.5)
FED308_A_: Real (11.0)
FED308_A_I: Real (11.0)
FED_NUM: Real (11.0)
ED_NAMEE: String (100.0)
ED_NAMEF: String (100.0)

In 2008 they added even more information:
AREA: Real (19.5)
PERIMETER: Real (19.5)
FED_NUM: Integer (9.0)
FED_TYPE: String (4.0)
ED_ID: Integer (7.0)
ED_NAMEE: String (100.0)
ED_NAMEF: String (100.0)
ELCT_CNT: Integer (6.0)
OBJECTID: Integer (10.0)
SHAPE_AREA: Real (19.11)
SHAPE_LEN: Real (19.11)
PARTY_WIN: String (1.0)

I filed the following report, if it is useful.
https://bugs.launchpad.net/ubuntu/+source/gdal/+bug/459178

-- 
 Russell McOrmond, Internet Consultant: <http://www.flora.ca/>
 Please help us tell the Canadian Parliament to protect our property
 rights as owners of Information Technology. Sign the petition!
 http://www.digital-copyright.ca/petition/ict/

 "The government, lobbied by legacy copyright holders and hardware
  manufacturers, can pry my camcorder, computer, home theatre, or
  portable media player from my cold dead hands!"


More information about the gdal-dev mailing list