Code Review

Frank Warmerdam warmerdam at pobox.com
Tue Mar 28 22:24:10 EST 2006


Folks,

I am continuing on my file by file code review of GDAL.  I must say
that I have found a few things I forgot about!  For instance, this little
gem.

/******************************************************************************
  * $Id: ICRRowsetImpl.h,v 1.2 2002/08/12 14:44:04 warmerda Exp $
  *
  * Project:  OpenGIS Simple Features Reference Implementation
  * Purpose:  RowsetInterface implementation specifically for columns rowset.
  * Author:   Frank Warmerdam <warmerdam at pobox.com>
  *
  * This code is closely derived from the code in ATLDB.H for IRowsetImpl.
  * It basically modifies the CRowsetImpl to call GetRCDBStatus() on the
  * derived class from the GetDBStatus() method, allowing a field to be marked
  * as DBSTATUS_S_ISNULL.  Also, there are some changes to handle null field
  * status properly.
  *****************************************************************************
  * Copyright (c) 2001, Frank Warmerdam
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  ...

Note that a computer run review of this file would likely not have flagged
any issues, but a human reading the extra comments can see there is an
issue.

Aparently at the time I felt it was reasonable to take code from the
Microsoft system ATLDB.H, modify it and place it under my own copyright
headers, but I did feel that it was important to credit the source.

Now, I am not at all sure how to handle this.  Is there any justification
for just adapting system include file class definitions this way?

In another source file in this same area, I adapted a class from an
article I found on the web.  I gave credit, but once again took a
questionable liberty in placing it under my own desired license.  I wrote:

/******************************************************************************
  * $Id: IColumnsRowsetImpl.h,v 1.1 2002/08/09 21:36:17 warmerda Exp $
  *
  * Project:  OpenGIS Simple Features Reference Implementation
  * Purpose:  IColumnsRowsetImpl template class.
  * Author:   Len Holgate, len.holgate at jetbyte.com
  *
  * This code was cribbed from web articles by Len.  More information can
  * be found at:  http://www.jetbyte.com/Source/COM/OLEDB/oledb.htm
  *****************************************************************************
  * Copyright (c) 2001, JetByte Limited (www.jetbyte.com)
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
   ...

I may have emailed the author at the time for permission but I didn't make
any notation to that effect.  AT least I have likely contact information
I could use.  The url doesn't work anymore, due to reorganizations at
JetBlue's web site.

Another little beauty:

/******************************************************************************
  * $Id: ICommandWithParametersImpl.h,v 1.3 2001/10/15 13:38:11 warmerda Exp $
  *
  * Project:  OpenGIS Simple Features Reference Implementation
  * Purpose:  ICommandWithParameters implementation template.
  *
  * This code was provided as a sample by Jillian Clark at ESRI, and is
  * free to use, but did not come with an explicit copyright message so the
  * following was inserted.  Some changes have been made to the version
  * provided by Jillian (reimplementing use of CArray for instance).
  *****************************************************************************
  * Copyright (c) 2001, ESRI (www.esri.com)
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),

I believe I got explicit permission to use this code from Jillian, but I
don' have any record of whether I did or not.

The sfcom_olddb tree is also rife with code generated by Visual Studio,
but I assume there must be a standard permissions granted by Microsoft
that makes wizard generated code the property of the person who clicked
on the wizard entry in the menu, right?

In my case, I am currently tempted to strip out all the OLEDB related
support in GDAL/OGR into a separate GDAL/OGR based package in order to
remove any possible issues with this area.   I have already purged a
bunch of "dead" code related to the COM Coverages spec which might have
been questionable.

In my DXF/DWG driver I have a bunch of classes adapted from the DWGdirect
library sample applications.  These came without any copyright message
in the original files.  Obviously the sample code was intended to be used,
but are we in the clear to do so without some more explicit permission?

In general I think most of the above is likely OK, but at the very least
I think it is the sort of thing that we need to dig up for further review
and discussion.  I would certainly appreciate guidance.

/me is wondering if the Microsoft legal gnomes who did an extensive review
of GDAL last fall when they purchased GeoTango have a file on him.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org





More information about the Incubator mailing list