Skip to content

3 Creating layers from CartoDruid

This section indicates how to create a vector layer from scratch with CartoDruid.

  1. First, open the TOC (Table of Contents).

  2. Click the "Add layer" button to open the dialog for selecting the layer type.

3.1 Creation of vector layer

When selecting "Vector Layer," we will have the following options:

a. We select "New layer" and the following form will appear:

1. At the top, basic layer identification and display fields are shown:

  • Identification and name: These are the values that will appear to identify the layer in the Table of Contents menu.
  • Type: We must select the type of geometry we will work with: point (e.g., points of interest, trees, stumps, etc.), line (e.g., tracks, boundaries, etc.), or polygons (for surface work).
  • Minimum and Maximum Scale: These indicate the zoom levels at which the layer will be visible (levels range from 0 to 21, with 21 being the closest to the ground).
  • Minimum and Maximum Scale for Labels: This means the same as the previous but for the geometry labels.

2. Immediately after, a selection of proposed "special" fields appears, which will be automatically added to the layer if the check is left marked.

  • Photo Gallery: This opens the possibility of attaching photos to the entities of a layer (points, lines, and polygons).
  • Plot Reference: Adds a field to the layer to update it with the reference of the plot located underneath the entity.
  • Inspected: Workmark to indicate that this entity has been inspected.
  • Creation/Update Dates: Two fields to indicate when the entity was created and when the last change was made to it.
  • Inspection Date: A date field.
  • Observations: A text field to fill in the field.

3. In the next section, within the same form, the user can add the fields they need. For each field, the name and type must be indicated. CartoDruid supports types:

  • Text: Text.
  • Integer: Whole number without decimals
  • Double: A number with decimals.
  • Date: Date.
  • Boolean: A boolean field (yes/no, 1/0).

4. Finally, the layer symbology must be selected. Symbology will determine how the layer entities will be drawn (border, background color, transparency, etc.).

  • By default, CartoDruid comes with a series of predefined symbologies for the user to choose from, but each project can define its own symbologies.
  • Symbology can be defined both at the entity (geometry) level and at the label level, if you want the identifying text that appears on the map to appear with a specific style.
  • It is also possible to configure conditional symbologies based on entity attributes or rules, as we will see later.

3.2 Creation of raster layer

For creating a "Raster Layer," we have the following options:

If we select MBTiles/Rasterlite file, a file explorer will open to select the corresponding file. After this, the following dialog will appear:

We indicate the name and description that will appear in the TOC and the minimum and maximum display scales.

3.2.1 WMS layer

When we want to add a WMS layer, it must be previously added to the WMS services catalog. For this, when we press on WMS Layer, the following dialog opens:

Here we have the list of different WMS service groups we have.

  • By default, we only have the "Default" group, which is where all services will be loaded when we add them.
  • If we want to create another group, we press "New Group".
  • If we want to add a new service, we press "New WMS Service".

When pressing "New WMS Service," the following dialog appears where we indicate the Service characteristics:

In this form, we need to specify the following parameters to configure the WMS service:

  • URL of the service.
  • Layer name within the service.
  • Name with which we will display the service in CartoDruid.
  • Description.
  • WMS Version: Choose between 1.3.0 and 1.1.x.
  • Service Reference System: By default, it is WGS84 (4326).
  • Image Format: You can choose between JPG or PNG.
  • Minimum and Maximum Visualization Scales.

Once the service is added to the catalog (by default in the "Default" group), we can:

  • Load it into the map.
  • Edit its properties.
  • Delete it from the catalog.
  • Move it to another group we have created.

3.2.2 TMS layer

Similarly to WMS services, when we want to add a TMS layer, it must first be loaded into the TMS services catalog. To do this, when we click on TMS Layer, the following dialog will open:

Here we have the list of different TMS service groups we have:

  • By default, we only have the "Default" group, which is where all services will be loaded when added.
  • If we want to create another group, click on "New Group".
  • If we want to add a new service, click on "New TMS Service".

When pressing "New TMS Service," the following dialog appears where we indicate the Service characteristics:

  • URL of the service.
  • Name under which we will display the service in CartoDruid.
  • Visualization scales minimum and maximum.

Once the service is added to the catalog (by default to the "Default" group), we can load it on the map, edit it, delete it, or move it to another group.

With the data entered in the form, the application will create a sqlite-spatialite database in the /cartodroid/data directory of the device and update the file cartodroid/config/crtdrdLayers.xml to include the definition of the new layer.