1. 1. Introduction
    1. 1.1 OGC Standards
      1. Introduction to OGC
      1. 1.1.1 Web Mapping Service
        1. Introduction to WMS
        2. WMS Examples
      1. 1.1.2 Web Feature Service
        1. Introduction to WFS
        2. WFS Examples
      1. 1.1.3 Web Coverage Service
        1. Introduction to WCS
        2. WCS Examples
      1. 1.1.4 Web Processing Service
        1. Introduction to WPS
        2. WPS Examples
    1. 1.2 CAAML
      1. Introduction to CAAML
    1. 1.3 INSPIRE
      1. Introduction to INSPIRE
  1. 2. Standards in action
    1. 2.1 Prepare data and toolkit
      1. Data and geospatial tools
      2. Start the environment
      1. 2.1.1 Manage the data
        1. Load Data
        2. Clean Data
      1. 2.1.2 Design the CAAML schema
        1. CAAML model design
        2. Populate Region
    1. 2.2 Build CAAML with GeoAvalanche
      1. Configure the application schema for CAAML
      2. Push the configuration to GeoAvalanche
      3. Query our Region features
  1. 3. Main Chapter
    1. Lesson Six

Clean Data

Check the integrity of data

Before to move forward and use the data to populate the table that we want to design for the Region entity of the CAAML schema structure we have to check the consistency of the dataset.

There is a problem with duplicates, so let's see how to overcome it (We are not aware if AINEVA has resolved the issue yet).

If we run these queries:

SELECT * from public.mnz where mnz = 'IT25'
SELECT * from public.mnz where mnz = 'IT28'

We should expect single record from each resultset but we get duplicates. It would not be a problem from a visualization perspective while it actually is if we want to make the column mnz the unique identification for a CAAML feature of type Region.

Removal of duplicates

It's just a matter of few UPDATE SQL queries to get the uniqueness of mnz.

UPDATE public.mnz set mnz = 'IT25a' where id = 37
UPDATE public.mnz set mnz = 'IT25b' where id = 41
UPDATE public.mnz set mnz = 'IT25c' where id = 46
UPDATE public.mnz set mnz = 'IT28a' where id = 40
UPDATE public.mnz set mnz = 'IT28b' where id = 42

Obviously the pattern to add a letter it's not acceptable in general but it's the easiest way for this tutorial.