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

Even Rouault even.rouault at mines-paris.org
Fri Oct 23 13:52:24 EDT 2009


Selon Russell McOrmond <russell at flora.ca>:

I tried ogr2ogr -f KML with the 2008 data and it works for me.

I could not access your bug report in ubuntu launchpad. Blind guess : I'm
wondering if you're not affected by a bug that has affected a few linux distro,
including fedora & ubuntu, because of a compilation option (see
https://bugs.launchpad.net/ubuntu/+source/gdal/+bug/344751). The bug has been
fixed since then in GDAL, but I'm not sure if they patched their packages with
the fix (from a quick review, no they didn't).

Anyway, if you want to use those shapefiles in mapserver, you don't care about
OGR as mapserver directly reads shapefiles by itself. And you probably don't
want to make mapserver reads verbose KML when you have more compact and
efficient SHP.

>
>    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!"
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>




More information about the gdal-dev mailing list