Opened 14 years ago

Closed 14 years ago

#2378 closed enhancement (fixed)

GDAL driver for FARSITE LCP format

Reported by: ctoney Owned by: Even Rouault
Priority: normal Milestone: 1.6.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: farsite lcp driver
Cc:

Description

FARSITE v. 4 landscape file (LCP) is a multi-band raster format used by wildland fire behavior and fire effect simulation models such as FARSITE, FLAMMAP, and FBAT (www.fire.org). More information on the LCP format is provided in the attached format description document. The driver source and a test LCP file are also attached. This driver can be contributed under the terms of an MIT License. Thanks for considering it as an addition to the GDAL drivers set.

Chris

Attachments (4)

LCP_format_description.html (18.3 KB ) - added by ctoney 14 years ago.
LCP format description
lcpdataset.cpp (23.7 KB ) - added by ctoney 14 years ago.
test_USGS_LFNM_Alb83.lcp (44.6 KB ) - added by ctoney 14 years ago.
LCP test file
test_FARSITE_UTM12.LCP (56.1 KB ) - added by ctoney 14 years ago.
LCP test file

Download all attachments as: .zip

Change History (16)

by ctoney, 14 years ago

Attachment: LCP_format_description.html added

LCP format description

by ctoney, 14 years ago

Attachment: lcpdataset.cpp added

by ctoney, 14 years ago

Attachment: test_USGS_LFNM_Alb83.lcp added

LCP test file

by ctoney, 14 years ago

Attachment: test_FARSITE_UTM12.LCP added

LCP test file

comment:1 by mloskot, 14 years ago

Owner: changed from warmerdam to Mateusz Łoskot
Status: newassigned

comment:2 by Even Rouault, 14 years ago

Mateusz,

a quick glance at the code shows that the main issue will be with endianness. I guess that Intel-order is assumed in the code.

comment:3 by mloskot, 14 years ago

Even,

Thanks for pointing that.

I've been in contact with Chris off-list guiding him how to submit the diver. I'm going to review it, but not today (actually, I've not got really back to work still).

If you like to work on it, feel free to take over the ticket (please, reassign). Anyway, ATM I'm not able to discuss internals of LCP driver before I jump to the code.

comment:4 by Even Rouault, 14 years ago

Component: defaultGDAL_Raster
Keywords: farsite lcp driver added
Milestone: 1.6.0
Owner: changed from Mateusz Łoskot to Even Rouault
Status: assignednew

I'm going to try to integrate that.

comment:5 by mloskot, 14 years ago

Even,

You don't have to :-) but if you like, thank you very much!

comment:6 by ctoney, 14 years ago

Even, Mateusz-

Yes, I thought that could be an issue. Intel order is assumed. I can work on it if you like, but feel free to take it on if you prefer. I would need to study some sample code to see how to handle the byte-swapping. Thanks!

comment:7 by Even Rouault, 14 years ago

Chris,

I've commited the driver in trunk in r14473. I've dealt with the endianness issue. Are the 2 attached files appropriate for including in the GDAL autotest suite (from the licence point of view) ?

comment:8 by ctoney, 14 years ago

Even,

Thanks very much! The two attached files are appropriate for including from the license point of view.

comment:9 by Even Rouault, 14 years ago

Autotest commited with the 2 examples files in r14480

comment:10 by Even Rouault, 14 years ago

Resolution: fixed
Status: newclosed

Closing : autotest runs fine on all the buildbot slaves

comment:11 by ctoney, 14 years ago

Resolution: fixed
Status: closedreopened

Even, There seems to be a problem with CPL_LSBINT32PTR in cpl_port.h. The LCP driver reports invalid values for certain min or max values by band. For example, ELEVATION_MIN=67109928 is incorrect for the test file "test_FARSITE_UTM12.LCP". The correct value is ELEVATION_MIN=1064. Similarly affected metadata fields are: ELEVATION_MAX, ASPECT_MAX, CANOPY_HT_MAX. I cannot tell what the problem is in the CPL_LSBINT32PTR macro.

comment:12 by Even Rouault, 14 years ago

Resolution: fixed
Status: reopenedclosed

Well, you're right. There was a typo in the CPL_LSBINT32PTR macro. Fixed in trunk in r15157, as well as the test in r15158

Note: See TracTickets for help on using tickets.