Opened 11 years ago

Closed 10 years ago

#3237 closed enhancement (fixed)

Northwood/VerticalMapper Driver Contribution

Reported by: warmerdam Owned by: chaitanya
Priority: normal Milestone: 1.7.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: Northwood
Cc: rmatsu

Description

Richard Matsunaga, on behalf of Waypoint / Troocorp has submitted code for reading Northwood (Vertical Mapper) grid files, a common elevation data format in the mapinfo community.

It is attached, and he has asked that it be incorporated as soon as practical.

Richard, I see the code has the following copyright message:

 * grcdataset.cpp  GDAL driver for Northwood Classified Format
 * Copyright 2007 Waypoint Information Technology

Could you please add a comment to this ticket indicating that you authorize relicensing this whole contribution under the GDAL license:

 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.

Chaitanya, please proceed with incorporating this in trunk.

Attachments (3)

grd_grc.zip (41.6 KB) - added by warmerdam 11 years ago.
code contribution
small_grid.zip (1.2 KB) - added by warmerdam 11 years ago.
Small sample files
small_grc.zip (2.0 KB) - added by rmatsu 11 years ago.

Download all attachments as: .zip

Change History (13)

Changed 11 years ago by warmerdam

Attachment: grd_grc.zip added

code contribution

comment:1 Changed 11 years ago by rmatsu

On behalf of troo Corporation (formerly Waypoint Information Technology),

  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the  "Software"),
  * to deal in the Software without restriction, including without  limitation
  * the rights to use, copy, modify, merge, publish, distribute,  sublicense,
  * and/or sell copies of the Software, and to permit persons to whom the
  * Software is furnished to do so, subject to the following conditions:
  *
  * The above copyright notice and this permission notice shall be included
  * in all copies or substantial portions of the Software.
  *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF  MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR  OTHER
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.

comment:2 Changed 11 years ago by chaitanya

Resolution: fixed
Status: newclosed
Type: defectenhancement

Driver added to trunk in r18065.

comment:3 Changed 11 years ago by warmerdam

Chaitanya,

Could you ensure test data is uploaded to http://download.osgeo.org/gdal/data/northwood and if a suitable small test file can be found to add it to the test suite?

comment:4 Changed 11 years ago by rmatsu

I will provide some small samples of both file formats.

comment:5 Changed 11 years ago by warmerdam

Resolution: fixed
Status: closedreopened

Changed 11 years ago by warmerdam

Attachment: small_grid.zip added

Small sample files

comment:6 Changed 11 years ago by warmerdam

Sample data attached, as provided by Richard. Richard also noted that gdalinfo fails on the attached file - presumably meaning gdalinfo from trunk. So the code might be broken. Has it been tested on any files at all?

comment:7 Changed 11 years ago by Even Rouault

The test file triggered a buffer overflow in the ColorMap? array of class NWT_GRDDataset: fixed in r18089. This caused pszProjection to be overwritten with junk and gdalinfo would crash while trying to translate it into WKT. I guess the issue was unveiled by my change in GetProjectionRef?() (before pszProjection was always rewritten at each call to GetProjectionRef?(), which caused a memory leak). No idea if the result is correct however

Changed 11 years ago by rmatsu

Attachment: small_grc.zip added

comment:8 Changed 11 years ago by rmatsu

I've added a GRC test file. Also, the latest trunk build works for both GRD and GRC files.

comment:9 Changed 11 years ago by Even Rouault

Chaitanyach,

could you please add a new test script in autotest/gdrivers that tests the driver with the data attached in small_grc.zip and small_grd.zip ? They seem to be small enough to be added directly in autotest/gdrivers/data.

comment:10 Changed 10 years ago by chaitanya

Resolution: fixed
Status: reopenedclosed

Added tests in trunk in r18411.

Note: See TracTickets for help on using tickets.