Request a demo

Water Management

RasterCaster – Detailed elevation maps in design situations

Good urban planning designs prevent flooding – be it a wholly new development or a redesign of an existing area. As climate change exacerbates flood risk in many places, it becomes even more relevant to climate-proof urban flooding designs before implementation. 3Di is the perfect instrument to assess flood risks at the highest detail, including for pluvial floods – that may cause lower water depths but occur more frequently. There is a catch, though. A detailed analysis requires detailed data, especially elevation maps. While more and more countries publish high resolution LIDAR-based elevation maps, no data is available for future situations. You will have to make it yourself.

A 3D impression of an urban plan, suitable for hydrological analysis

That is a challenge. Urban planners generally draw in CAD, and these drawings are generally not easily converted to a digital elevation model (DEM) that hydraulic models like 3Di use. The urban planning process is a creative process, and technical constraints to the drawing’s linework are often experienced as a hindrance to that process. The resulting designs are well suited for human interpretation, but not easily processed automatically by a computer. For example lines forming a polygon that are not closed or intersect one another are no problem for the human eye, but a major challenge for any processing algorithm. Also relief information is usually not included in the dense and standardized way that a processing algorithm requires. In short, there is a gap between urban design practice and hydraulic modelling requirements.

Other possible uses of the RasterCaster for 3Di modelling include burning channels into the DEM using the cross section definition from the model, adding a slope to large roofs to avoid ponding on the roof, or generating a initial water level raster from a flood extent polygon and DEM.

How the RasterCaster works

To close this gap, Nelen & Schuurmans, in collaboration with Deltares, has developed the RasterCaster. The RasterCaster allows the user to define elevation using vector data (points, lines and polygons) and export the resulting elevation map to a GeoTIFF raster that is guaranteed to fulfill the 3Di requirements for raster inputs. Vector data are more similar to CAD drawings and is much easier to manipulate than raster data. The user first makes a whole of polygons that cover the area of interest and do not overlap. The polygons may be derived from CAD drawings or drawn directly into GIS.

The polygons can be seen as ‘molds’, that are used to ‘cast’ the elevation map into. Each polygon contains a definition of the altitude variations within it. For simple elevation profiles (e.g. the flat floor level within a building) can be cast using a simple definition, while at the same time the RasterCaster offers the user all flexibility to add more complex profiles (e.g. a sloping road with a convex cross section). Currently, molds can be defined in four different ways:

  • ‘constant’: the user inputs a number in the polygon’s attribute table, and the elevation within the whole polygon will be constant at that number
  • ‘tin’: the user adds one or more points along the edges of the polygon (Figure 1). The elevation along the edge is interpolated from these points and subsequently the elevation for the entire polygon is calculated using Triangulated Irregular Network (TIN) interpolation from the edges. This method is very broadly applicable and can be employed for the large majority of desired elevation shapes. An example of this method is given in de following images:

2D map of the mold

3D map of the same mold

  • ‘custom’: the user inputs a formula describing the elevation, for example a parabolic interpolation between two sides of a polygon to model a concave road or convex waterway cross section. The applied formula can make use of all functions available in PostGIS (PostGIS is the most advanced open source spatial database available). The RasterCaster helps the user by automatically generating the sides and centerlines of polygons to be used as auxiliary lines, and by adding several spatial functions to PostGIS specifically useful for this purpose.

2D map of the mold

3D map of the same mold

  • ‘filler’: the elevation in polygons with a ‘filler’ definition type is interpolated from the surrounding raster values, also using TIN interpolation.

The RasterCaster can also be used to edit existing rasters. The new raster is overlayed over the existing ‘base raster’. The base raster retains its original values where it is not covered by the new raster.


The RasterCaster is Open Source software and can be downloaded from GitHub: Install and use instructions can also be found in the same GitHub repository.

Back to summary

Leendert van Wolfswinkel

    Don't miss

    Request a demo

    Are you interested in how 3Di works and how you can use it? Please use this form to request a demonstration. We will contact you to give an online demonstration and will answer all your questions.

    How to work with 3Di

    Flexibility for modellers


    I want to perform my own calculations and register the 3Di license under the organisation I work for. Ideal if you have a background in GIS and hydrology. We provide online documentation and support as well as the opportunity to participate in a three day training program. Are you ready to take this step?

    • Full flexibility
    • Bring in your own expertise
    • Online documentation and support

    Request a demo

    Find a Local Partner

    I would like to work with 3Di and outsource the model building. Ideal if you seek expert advice whilst being in control of the process. You don’t need to know all the ins and outs about 3Di but benefit of all 3Di’s advanced capabilities. Looking for a helping hand?

    • Benefit from 3Di without worrying about technical details
    • Get help from an expert
    • Keep in control

    Request a demo

    Become a 3Di Partner

    We are a full-service engineering firm that would like to make 3Di accessible to our clients base. We have model experts and would like to use 3Di’s advanced capabilities in our projects. Ready to discover the benefits of a partnership?

    • Generate your own business with 3Di
    • Use the most powerful hydrodynamic simulation software
    • Direct support from the 3Di product team

    Become a partner