Opened 7 years ago

Closed 6 years ago

#5763 closed enhancement (fixed)

[PATCH] VICAR file format addition

Reported by: swalter75 Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords: vicar hrsc

Description (last modified by swalter75)

VICAR is a file format similar to the PDS format. It is used by the VICAR software for many space missions.

Vicar is not openly available, although there were efforts to make it Open Source by JPL in the last years.

The driver is tested for HRSC images, sample image here:

It should work also for other missions, but probably meta-data handling has to be adapted. If you want a mission-specific file to be added, feel free to contact me,…

I wasn't able to commit via svn, so this is the diff to existing files:

Index: frmts/gdalallregister.cpp
--- frmts/gdalallregister.cpp	(revision 28072)
+++ frmts/gdalallregister.cpp	(working copy)
@@ -231,6 +231,7 @@
+    GDALRegister_VICAR();
 #ifdef FRMT_til
Index: frmts/pds/GNUmakefile
--- frmts/pds/GNUmakefile	(revision 28072)
+++ frmts/pds/GNUmakefile	(working copy)
@@ -1,13 +1,13 @@
 include ../../GDALmake.opt
-OBJ	=	pdsdataset.o isis2dataset.o isis3dataset.o nasakeywordhandler.o
+OBJ	=	pdsdataset.o isis2dataset.o isis3dataset.o vicardataset.o nasakeywordhandler.o vicarkeywordhandler.o
-CPPFLAGS	:=	-I../raw  $(CPPFLAGS)
 default:	$(OBJ:.o=.$(OBJ_EXT))
-$(O_OBJ):       nasakeywordhandler.h ../raw/rawdataset.h
+$(O_OBJ):       nasakeywordhandler.h vicarkeywordhandler.h ../raw/rawdataset.h
 	rm -f *.o $(O_OBJ)
Index: gcore/gdal_frmts.h
--- gcore/gdal_frmts.h	(revision 28072)
+++ gcore/gdal_frmts.h	(working copy)
@@ -120,6 +120,7 @@
 void CPL_DLL GDALRegister_ISIS3(void);
 void CPL_DLL GDALRegister_ISIS2(void);
 void CPL_DLL GDALRegister_PDS(void);
+void CPL_DLL GDALRegister_VICAR(void);
 void CPL_DLL GDALRegister_IDRISI(void);
 void CPL_DLL GDALRegister_Terragen(void);
 void CPL_DLL GDALRegister_WCS(void);

Attachments (3)

vicarkeywordhandler.h (2.3 KB ) - added by swalter75 7 years ago.
vicardataset.cpp (31.4 KB ) - added by swalter75 7 years ago.
vicarkeywordhandler.cpp (11.4 KB ) - added by swalter75 7 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 by swalter75, 7 years ago

Description: modified (diff)

by swalter75, 7 years ago

Attachment: vicarkeywordhandler.h added

by swalter75, 7 years ago

Attachment: vicardataset.cpp added

by swalter75, 7 years ago

Attachment: vicarkeywordhandler.cpp added

comment:2 by Even Rouault, 7 years ago

Milestone: 2.0
Summary: VICAR file format addition[PATCH] VICAR file format addition

comment:3 by Even Rouault, 7 years ago

trunk r28786 "Add GDAL VICAR format, patch by Sebastian Walter + a few extra fixes (#5763)"

My changes consist in mentionning VICAR in format_list.html, removing some tab characters, making the Identify() test harder, fixing a Valgrind warning in VICARKeywordHandler::Ingest()

comment:4 by Even Rouault, 7 years ago

r28787 "Commit forgotten file"

comment:5 by Even Rouault, 7 years ago

r28789 "VICAR: fix Windows build (#5763)"

comment:6 by Even Rouault, 7 years ago


I get random failures on the Travis continuous integration system on the simple test I've added. Those failures arise systematically apparently on Mac, but randomly on Ubuntu 12.04. I've never managed to reproduce them on my machine.

The error is the inversion of the sign of geotransform[3] (upper left northing)

For example

Running tests from gdrivers/

TEST: vicar_1 ...

old = (-53960.0, 25.0, 0.0, -200830.0, 0.0, -25.0) new = (-53960.0, 25.0, 0.0, 200830.0, 0.0, -25.0) fail

It would be good if you could investigate what's happening. Nothing shows up under Valgrind...

r28792 " avoid test failure on Travis until we've found what's wrong... (#5763)"

comment:7 by Even Rouault, 7 years ago

Milestone: 2.0

Removing obsolete milestone

comment:8 by Even Rouault, 6 years ago

Resolution: fixed
Status: newclosed

Finally found the reason for the random failure: trunk r32030, branches/2.0 r32031 " properly reset PDS_LineProjOffset_Mult so that running afterwards doesn't faild (#5763)"

Note: See TracTickets for help on using tickets.