Overview

TimeSeries reader for BIL grid files. The identifier for this reader is "BIL". For each BIL file to be imported two other files should also be present:

  1. test.bil <- bil file with data
  2. test.hdr <- header file with geo-referencing and data description
  3. test.tim <- timestep file

Note: An alternative parser with the ID 'BILBIPBSQ' has become available (in FEWS release 2017.01 and newer), which better adheres to the official (ESRI) specifications for BIL/BIP/BSQ format files. For importing files from external sources it is recommended to use the 'BILBIPBSQ' import type, which is documented here: BIL BIP BSQ Parser

File format

In the above example the test.bil files contains the actual data, the test.hdr describes the bil file and the test.tim file contains the date/time information for the bil file.

Contents of the hdr file:

;
; ArcView Image Information
;
NCOLS       534
NROWS       734
NBANDS      2
NBLOCKS     4
NBITS       16
LAYOUT      BIL
BYTEORDER   I
SKIPBYTES   0
MAPUNITS    CELSIUS;METERS
ULXMAP      300000
ULYMAP      300000
XDIM        100
YDIM        100

The BIL import assign a numerical id (starting at 0) to each parameter in the BIL file. This information is needed to set up the idmapping table (see below). The NRBLOCK parameter denotes the number of timesteps. As such, it is possible to have multiple timesteps in a single bil file. The NRBANDS parameter denotes the number of parameter in the file. The MAPUNITS keywords are not used in the FEWS reader.

Contents of the tim file:

200001011200 60
200001011300 60
200001011400 60
200001011500 60

The first column in the time files contains: YYYYMMDDHHMM, the second column the number of minutes in the timesteps. The second column is presently ignored and may be omitted.

BIL reader supports keyword PIXELTYPE to  read data using float 32 or float 64 

Configuration

An example import configuration to import a bil file is shown below:

<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesImportRun xmlns="http://www.wldelft.nl/fews"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wldelft.nl/fews
http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd">
	<import>
		<general>
			<importType>BIL</importType>
			<folder>d:/import/bil</folder>
			<idMapId>bilMapId</idMapId>
		</general>
		<timeSeriesSet>
			<moduleInstanceId>GridImportBIL</moduleInstanceId>
			<valueType>grid</valueType>
			<parameterId>T.fx</parameterId>
			<locationId>BIL</locationId>
			<timeSeriesType>external forecasting</timeSeriesType>
			<timeStep unit="hour" multiplier="1"/>
			<relativeViewPeriod unit="day" start="0" end="1"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
		<timeSeriesSet>
			<moduleInstanceId>GridImportBIL</moduleInstanceId>
			<valueType>grid</valueType>
			<parameterId>P.fx</parameterId>
			<locationId>BIL</locationId>
			<timeSeriesType>external forecasting</timeSeriesType>
			<timeStep unit="hour" multiplier="1"/>
			<relativeViewPeriod unit="day" start="0" end="1"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</import>
</timeSeriesImportRun>

The idmap used in this example:

<?xml version="1.0" encoding="UTF-8"?>
<idMap xmlns="http://www.wldelft.nl/fews"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.wldelft.nl/fews
http://fews.wldelft.nl/schemas/version1.0/idMap.xsd" version="1.1">
	<!---->
	<parameter internal="T.fx" external="1"/>
	<parameter internal="P.fx" external="0"/>
	<!---->
	<location internal="BIL" external="BIL"/>
</idMap>

External parameter should be 0, or in case multiple parameters 0, 1, 2 etc.
The bil file doesn't contain any location informations, so location id mapping can be omitted.
If you still use location id mapping, use for external and internal location id the same string.

  • No labels