Ticket #3237 (closed enhancement: fixed)

Opened 4 years ago

Last modified 3 years ago

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

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

Change History

Changed 4 years ago by warmerdam

code contribution

Changed 4 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.

Changed 4 years ago by chaitanya

  • status changed from new to closed
  • type changed from defect to enhancement
  • resolution set to fixed

Driver added to trunk in r18065.

Changed 4 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?

Changed 4 years ago by rmatsu

I will provide some small samples of both file formats.

Changed 4 years ago by warmerdam

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 4 years ago by warmerdam

Small sample files

Changed 4 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?

Changed 4 years ago by 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 3 years ago by rmatsu

Changed 3 years ago by rmatsu

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

Changed 3 years ago by 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.

Changed 3 years ago by chaitanya

  • status changed from reopened to closed
  • resolution set to fixed

Added tests in trunk in r18411.

Note: See TracTickets for help on using tickets.