Publication of new sources#

Data preparation#

Before adding a new source to MapX, it is necessary to prepare the spatial dataset to be compatible with the application. A geographic information system (GIS) software such as QGIS (cross-platform, free & open-source) or ArcGIS Desktop can be used to check the compatibility of your spatial dataset, to edit it and to convert it into another format if necessary.

Users should pay attention that:

  • the geometries of the spatial dataset are valid

  • the attribute table is encoded in UTF-8

  • the columns of the attribute table are associated to the right data type (e.g., text attributes don’t offer the same styling possibilities as numerical ones)

  • the dataset is stored in a format supported by MapX

Warning

Dates must be stored in one of two formats YYYY-MM-DD or YYYY/MM/DD. If not, dates will be imported as text into the MapX database.

Note

If your data has a time component and you want to activate the time-slider in MapX, you will need to preformat your dataset before importing it. To be integrated in a time-slider, dates must be stored in a column named mx_t0 and time intervals must be stored in columns mx_t0 (start date) and mx_t1 (end date). The format of these columns must be Unix epoch (in seconds). Relevant information for converting from and to Unix epoch can be found at this address: https://www.epochconverter.com/ . Alternatively, it is possible to perform date <-> epoch conversions using the Field Calculator in QGIS .

../../_images/source-publication-qgis.png

Supported formats#

Here is a list of formats supported by MapX for importing and exporting data:

Format

Import: module

Import: drag and drop

Export

GeoPackage (vector only)

yes

no

yes

GeoJSON

yes

yes

yes

ESRI Shapefile

yes 1

yes 1,Z

yes 1

SQLite

yes

no

yes

KML

yes 1

yes 1

yes 1

GML

yes 1

no

yes 1

GPX

yes 1

yes 1

no 2

CSV (tabular only)

yes 1

no

yes 1

DXF

yes 1,3

no

no 2

PostgreSQL SQL Dump

no

no

yes

1 partial support, data could be altered, missing attribute, missing geometry

2 driver error

3 need SRS assignation

Z ESRI Shapefiles being composed of multiple files, it’s necessary to zip them in an archive to be uploaded with the drag and drop method. The files (at least: .shp, .shx, .dbf, .cpg & .prj) should be located at the first level of the archive.

Types of geometry#

The types of geometry supported by MapX are :

  • Geometry primitives: Point, LineString & Polygon

  • Multipart geometries: MultiPoint, MultiLineString & MultiPolygon

Note

MapX only partially supports GeometryCollection. For this reason, the MapX team recommends that you do not use this type of geometry to upload your data into the platform.

Data publication#

Note

Sources are linked to the project in which they were uploaded and will only be accessible from there. Be careful to be in the right project when uploading sources.

There are two different ways to upload datasets to a project in MapX:

  1. the Add a source layer tool (also called Upload tool)

  2. the drag and drop method

Upload tool#

  1. Click on the Add a source layer button in the Toolbox to load the Upload tool in the MapX UI.

    ../../_images/source-publication-upload.png
  2. Add the dataset(s) you want to import into MapX. For this, two methods are available (they can be combined):

    1. drag and drop your file(s) from your computer

    2. click on Add files… to open your device file browser and select your chosen file(s)

  3. By default, the name of the dataset is assigned to the source that will be created in MapX. If required, you can edit it before the import.

    ../../_images/source-publication-upload-titles.png
  4. The import of each dataset can be configured by expanding its Settings section:

    ../../_images/source-publication-upload-view.png
    • Automatically create a view: creates a preconfigured view during the upload process using the data source. The view will automatically be added at the top of the data catalog.

    • Enable WMS services: In a public project, if public views are created using this source, enabling WMS service will automatically create a layer and a style (SLD) in the MapX GeoServer .

    • Allow this source to be downloaded: If the data license allows for redistribution, enabling this option will activate the Download tool for this data source for all users.

    • Assign the SRS: The upload tool will automatically retrieve the Spatial Reference System (SRS) of the dataset and will reproject it to WGS 84 (EPSG:4326), the SRS used to store all data in the MapX database. If you want to bypass this behavior, you can enable this option and manually select the SRS corresponding to your dataset.

  5. If needed, you can remove a dataset from the Upload tool by clicking on the X button located in its upper left corner. Moreover, it is possible to empty the entire Upload tool by clicking on the Reset button.

    ../../_images/source-publication-upload-remove.png
  6. Once configured, datasets can be imported into MapX one by one by clicking on the Send button located in their upper right corner or in bulk mode by clicking on the Upload button.

    ../../_images/source-publication-upload-send.png

    The import status can be consulted from the MapX notification panel:

    ../../_images/source-publication-upload-notification.png
  7. Once the upload process is completed, you will be notified by email. In the event of failure, the error is returned in the body of the email.

Drag and drop#

Note

The drag and drop method only allows to upload spatial datasets with a SRS equal to WGS 84 (EPSG:4326).

  1. Drag and drop your file from your computer to the map in MapX.

    ../../_images/source-publication-drag-drop.png
  2. A progress bar indicates the status of loading.

    ../../_images/source-publication-drag-drop-progress.png
  3. Once your file is loaded, it will appear in the data catalog on top of the list of views. An orange circle on the left side of the view indicates that its type is Local GeoJSON. This means that the data linked to the view has been temporarily stored in the local storage of your web browser and not in the MapX database.

    ../../_images/source-publication-temp-view.png
  4. To add your dataset as a source to MapX (your dataset will be stored in the MapX database):

    1. click on the view corresponding to your dataset

    2. click on Upload.

    ../../_images/source-publication-upload-button.png
  5. The Upload tool automatically opens in the MapX interface with your dataset (Local GeoJSON) included. See the Upload tool section above for the rest of the operations.

    ../../_images/source-publication-upload-panel.png
  6. Once your dataset has been added to the MapX database and to avoid duplicates, you can delete the Local GeoJSON (orange circle) by clicking on Delete.

    ../../_images/source-publication-temp-view-delete.png