Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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. Example:

  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.

...

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:

...

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:

No Format
<?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 exmapleexample:

No Format
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by Erik de Rooij (WL | Delft Hydraulics) -->
<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.