GISNew Features

GeoJson support in Ontologies on PostGIS

PostGIS is an extension to the PostgreSQL relational database that adds support for geographic objects, making it a spatial database.

One of the innovations that version 2.0.0 (fireball) of the Platform brings is the support of GeoJSON in Ontologies on PostGIS.

This feature allow us to create georeferenced Ontologies on PostgreSQL, which will allow us to represent this Ontology on a GIS viewer of the Platform.

Up until this version, Ontologies could only be represented on non-relational databases in the GIS Viewers of the Platform, so this new functionality adds many more possibilities for the user to represent their data.

To create this Ontology type, you only need to access the menu to create Virtual Ontologies:

Creation of virtual ontologies option

Assuming that you already have a table in the relational database that contains geographic data, you would only have to choose that table and select which field from it would be the geographic field:

Geographical field association

In other way, if what you want is to create a new Ontology with its table in a relational database and containing geographic data, you will have an option to add this type of field to the Ontology:

Creation of a field of geometry type

Once the Ontology has been created, you can consult it like any other through the tools provided by the Platform. For example, if you consult it through the Query Tool, you will obtain a result of this style:

[
    {
        "geometry": "{\"type\":\"Point\",\"coordinates\":[-3.6981,40.4204]}",
        "id": "1",
        "status": false
    },
    {
        "geometry": "{\"type\":\"Point\",\"coordinates\":[-3.6998,40.422]}",
        "id": "2",
        "status": false
    },
    {
        "geometry": "{\"type\":\"Point\",\"coordinates\":[-3.6975,40.4221]}",
        "id": "3",
        "status": true
    }
]

From here, you can represent these data on the Platform’s viewer.

It is important to note that PostGIS allows you to store geometric data of any type (points, lines and polygons) in the same table, but the Platform currently only allows one type of geometric field per Ontology. So when creating a layer associated with an Ontology, you will have to select the type of geometric that we are going to use:

Geometry field association in one layer.

This is a very simple example of how this new functionality works, so if you are interested in learning more about this tool, we recommend our help guide (translation on course).

More information


Translated by: fjlacevedo

✍🏻 Author(s)

Leave a Reply

Your email address will not be published. Required fields are marked *