Digital Mapping – Serving historical cadastrial data for serving with GeoServer

Project types: Application development

We have been working in the last years with a public administration in Austria in order to publish INSPIRE View Services through GeoServer interfaces as well as clip&ship functionalities for raster data at country scale for aerial imagery, DTM, DSM and historical cadastral data. In this post we discuss the work we did in order to prepare and configure historical cadastral data for serving via GeoServer, using GDAL and Python.

The original data consisted of many georeferenced JPEG files coming from digital scans of the original prints, together with shapefiles to roughly delineate the valid areas of the scans.

Showing overlapping sheets in the original dataset prior to preprocessing

 

Shapefile containgn vector masks for the original datasets to be used during preprocessing

The data was delivered in multiple coordinate reference systems, as usual, EPSG:31254 , EPSG:31255, EPSG:31256. The data has been recorded 200 years ago and covers most of Austria, nevertheless there are some “island borders” that do not perfectly match (so holes will occur). Data is organized in districts where each district is composed of several cadastral areas and each of them is composed of a set of georeferenced JPEG files.

Our goal was to produce a seamless mosaic to be served by GeoServer, hence we decided to optimize the data for serving, with the following main steps:

  • A first step converts each jpeg image of a cadastral group to a GeoTIFF with inner jpeg compression with binary mask. Masks were created by turning the corresponding vector mask from the shapefile into a raster mask using gdal_rasterize utility. The binary mask is then attached to the GeoTIFF. All the images are also reprojected to a common coordinate reference system (EPSG:31287).
  • Once the first step is done, all the GeoTIFFs of the same cadastral group get merged together into a single bigger GeoTIFF. The set of these images will be exposed as an high resolution ImageMosaic.
  • Finally, all of the above cadastral GeoTIFFs belonging to the same district get mosaicked together and an ImagePyramid is built on top of them.
  • At the very end, all of these entries get used to populate index of both the ImageMosaic as well as the ImagePyramid which is stored in PosgreSQL. Reprocessing of portions of the original dataset is made easier by using a DBMS to index the optimize data.

The preparation scripts are written in python and use several GDAL utilities to perform format conversion, reprojection, mask binarization, data composition. A docker image has been provided so that the whole processing machinery can be deployed on docker. Several configuration parameters are available so that users can specify for example how many images can be processed in parallel, as well as how many levels of the pyramid shall be produced, how many overviews, which interpolation to use and so on. Moreover, the processing supports 3 exclusion flags so that it is possible to partially skip any of the 3 main phases of the processing (cadastral GeoTIFFs creation, district imagePyramid creation, data ingestion in the database) so that it is possible to repeat one of the phases, if needed.

In GeoServer, we have configured a high resolution layer on top of the ImageMosaic as well as a lower resolution layer on top of the ImagePyramid. Finally a LayerGroup is setup on top of them, and a proper style allows to switch between the 2 layers when zooming in/out on a certain level. By this way, a zoomed-out overview of the data uses the ImagePyramid layer (made of a small set of a few files with low resolution imagery).

Result of processed data on subset of dataset (coarse resolution)

Result of processed data on subset of dataset (higher resolution)

When zooming in, the rendering does the switch and start using the high resolution ImageMosaic layer data made of 25 cm resolution GeoTIFFs (with internal overviews).

Result of processed data on subset of dataset (best resolution)

We are proud to work in such challenging projects where we actually see our work impacting important use cases and being able to make a difference.

If you are interested in learning about how we can help you achieving your goals with open source products like GeoServerMapStoreGeoNode and GeoNetwork through our Enterprise Support Services Subscription Services or Professional Training Services offer, feel free to contact us!

The GeoSolutions Team,

320x100_eng

 

Technologies

  • GeoServer