# INTERLIS

OGR has support for INTERLIS reading and writing.
INTERLIS is a standard which has been especially composed in order to fulfil the requirements of modelling and the integration of geodata into contemporary and future geographic information systems. With the usage of unified, documented geodata and the flexible exchange possibilities the following advantage may occur:

- the standardized documentation
- the compatible data exchange
- the comprehensive integration of geodata e.g. from different data owners.
- the quality proofing
- the long term data storage
- the contract-proof security and the availability of the software

OGR supports INTERLIS 1 and INTERLIS 2 (2.2 and 2.3).

## Model

Data is read and written into transfer files which have different formats in INTERLIS 1 (.itf) and INTERLIS 2 (.xml). For using the INTERLIS model (.ili) a Java interpreter is needed at runtime and ili2c.jar (included in the Compiler for INTERLIS 2) must be in the Java path. The model file can be added to the transfer file seperated by a comma.

Some possible transformations using ogr2ogr.

- Interlis 1 -> Shape:

      ogr2ogr -f "ESRI Shapefile" shpdir ili-bsp.itf,ili-bsp.ili

- Interlis 2 -> Shape:

      ogr2ogr -f "ESRI Shapefile" shpdir RoadsExdm2ien.xml,RoadsExdm2ben.ili,RoadsExdm2ien.ili

  or without model:

      ogr2ogr -f "ESRI Shapefile" shpdir RoadsExdm2ien.xml

- Shape -> Interlis 1:

      ogr2ogr -f "Interlis 1" ili-bsp.itf Bodenbedeckung__BoFlaechen_Form.shp

- Shape -> Interlis 2:

      ogr2ogr -f "Interlis 2" LandCover.xml,RoadsExdm2ben.ili RoadsExdm2ben_10.Roads.LandCover.shp

- Incremental import from Interlis 1 into PostGIS:

      ogr2ogr -f PostgreSQL PG:dbname=warmerda av_fixpunkte_ohne_LFPNachfuehrung.itf,av.ili -lco OVERWRITE=yes
      ogr2ogr -f PostgreSQL PG:dbname=warmerda av_fixpunkte_mit_LFPNachfuehrung.itf,av.ili -append

### Arc interpolation

INTERLIS arc geometries are converted to polygons.
The interpolation angle can be changed with the environment variable ARC_DEGREES (Default: 1 degree).

## Other Notes

- More Information: http://giswiki.hsr.ch/OGR (german)
- Development of the OGR INTERLIS driver was supported by Swiss Federal Administration, Canton Solothurn and Canton Thurgovia.