Follow GeoGeek – GIS on Feedspot

Continue with Google
Continue with Facebook


Google Earth Engine Applications, published as Open Access by MPDI’s Remote Sensing journal, is available for free download.

The Google Earth Engine (GEE) is a cloud computing platform designed to store and process huge data sets (at petabyte-scale) for analysis and ultimate decision making .

Following the free availability of Landsat series in 2008, Google archived all the data sets and linked them to the cloud computing engine for open source use. The current archive of data includes those from other satellites, as well as Geographic Information Systems (GIS) based vector data sets, social, demographic, weather, digital elevation models, and climate data layers.

The purpose of this special issue was to solicit papers that take advantage of the Google Engine cloud computing geospatial tools to process large data sets for global applications. Special priority was given to papers from developing nations on how the availability of GEE data and processing has enabled new research that was difficult or impossible before.

This book is a printed edition of the Special Issue Google Earth Engine Applications that was published in Remote Sensing.

The authors are Lalit Kumar and Onisimo Mutanga (Eds.), 420 pages long, published in April 2019.

Download PDF: Google Earth Engine Applications

Open Access
ISBN 978-3-03897-884-8 (Pbk); ISBN 978-3-03897-885-5 (PDF)
© 2019 by the authors; CC BY-NC-ND licence

The post PDF Book: Google Earth Engine Applications appeared first on GeoGeek.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

If you want to know how to teach GIS to a child we recommend the book “Lindsey the GIS Specialist” published by the engineering company Bolton & Menk.

This work has been written by Tyler Danielson, a passionate about GIS within the company.

In general it is a small book that introduces the world of GIS, although it is written for children. It can also be read by people who wish to enter the wonderful GIS world, because through mapping it incorporates concepts about the use of vector and raster data.

Tyler wrote the book based on his sister, who also works in the field of GIS.

The book is part of a series that Bolton & Menk generates to help explain the different professions to children.

Download GIS Book for Children: Lindsey the GIS Specialist

The post GIS Children’s Book: “Lindsey the GIS Specialist” appeared first on GeoGeek.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

The new version of gvSIG Mobile allows you to convert your mobile phone into a GPS device to collect field data through a form. Personally, what I liked the most is the possibility of exporting the data as GPX.

Actually when I want to collect coordinates with the cell phone, what interests me most is to be able to store the information either in a table or a vector file. It would be great to be able to export as *.shp, but because of its ideological current it does it in other formats such as GPX, KMZ, PDF.

In general I find it a good product of gvSIG, among the main features are:

  • Online profiles available: when a web server is configured to serve Cloud Profiles, gvSIG Mobile can automatically download projects, base layers, Spatialite layers, forms for notes and other files.
  • Collect coordinates.
  • Store tracks with the screen turned off.
  • Export reports in a PDF.

To install gvSIG Mobile you can get it from the Play Store on this link, at the moment it only works on Android.

gvSIG Mobile, open source GIS for field data gathering - YouTube

I hope that in the future new functions such as exporting coordinates (geographical or flat) in a simple text table will be integrated.

It would also be important to integrate your own viewer of the satellites in use, and the possibility of connecting to GLONASS.

The post Turn your smartphone into a GPS to collect field data appeared first on GeoGeek.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

A daily task is the import of tables, QGIS allows to create a layer of points from delimited text files (if the data come from Excel it is necessary to export them type *.txt or *.csv).

How to import XY Table in QGIS 3?

The procedure is extremely simple, for which it is necessary to go to the following address:

Layer > Add layer > Add Delimited Text Layer

Within the File name dialog box browse and add the table type text, in File Format select CSV, Regular or Custom delimiters, depending on the type of delimiter mark comma, tabulator, space, colon, semicolon or others.

In Geometry Definition > Point coordinates select the fields corresponding to the coordinates X and Y, in the preview of the table it is necessary to make sure that the structure is correct, then accept.

Subsequently in Geometry CRS specify the CRS or reference system, for the present exercise WGS 84 / UTM zone 17S (EPSG:32717).

To save the new layer of points right click on it and select Export > Save Features As , the new window allows to store in various formats, such as: shp, kml, gpx, cad, tab, dng, among others.

The post Import XY data tables to QGIS 3 appeared first on GeoGeek.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Endorheic basins (internally drained) have no surface outlet (to a river) and lose water through evaporation and sometimes underground. In the traditional method of watershed delimitation, these internal drainage areas are filled to the point where they are able to be poured into neighboring cells.

But in the case of truly endorheic basins, this is clearly not the case. The method we use to resolve this (to prevent areas from filling up, and to produce a hydrologically correct DEM that can determine the direction of flow) is to create a hole in the DEM using the outlet point of the endorheic basin.

This tutorial provides a step-by-step guide to delineating endorheic basins in ArcGIS. In this exercise we have a DEM and a lake layer where the watershed drains (download example data).

Preparing the DEM

The central idea is to make a hole in the DEM using the polygon (of the lake where the water drains) of the basin. To do this after having drawn the polygon of the lake, in the attributes table we create a new field and assign a value preferably lower than the minimum value of the DEM, in this case we use -1000.

The next step is to convert the polygon to raster using the field containing the value of -1000, for this we will use the tool Polygon to Raster located in:

ArcToolbox > Conversions Tools > To Raster

A dialog box appears in Input Features where the lake layer is used, in Value field the data field containing the value -1000, and in Cellsize place the cell size of the DEM (right click on DEM > Properties > Source).

Now you need to join both raster layers, in this case we are going to use the Mosaic to New Raster tool located in:

ArcToolbox > Data Management Tools > Raster > Raster Dataset

For the Input Rasters field add first the DEM, then the lagoon raster. In Output Location, select a directory. In Raster Dataset Name with Extension the name of the output raster with extension (tif, img, bil, etc). In Pixel Type select 16_BIT_SIGNED (very important). In Number of Bands select 1.

Continuing with the DEM preparation, we are going to replace the value -1000 by NoData, for it we use the Raster Calculator tool located in:

ArcToolbox > Spatial Analyst Tools > Map Algebra

Within the expression SetNull(“DEM_hole.tif” == -1000,”DEM_hole.tif”) the DEM_hole.tif is used and the value -1000 represents the data that will be converted to NoData, in case of having used another value to make the change.

In this way, the DEM is ready to start with the delimitation of the endorheic basin.

Automatic delineation of a watershed

From here on, the process is the same as that normally used to demarcate a watershed. The first step is to clean the DEM with the Fill tool located at:

ArcToolbox > Spatial Analyst Tools > Hydrology

As input raster the DEM with NoData values for the lake or drainage area is used.

The direction raster is then constructed with the Flow Direction tool located at:

ArcToolbox > Spatial Analyst Tools > Hydrology

For input information the previously corrected raster (with Fill) is used, now the accumulation raster is generated with the Flow Accumulation tool located at:

ArcToolbox > Spatial Analyst Tools > Hydrology

As input information is used the direction raster, then from the drainage polygon (lake) is established the area (or point) of origin to delineate the basin using the Snap Pour Point tool located at:

ArcToolbox > Spatial Analyst Tools > Hydrology

If you configure this window, Input raster selects the polygon (of the lake), and Input accumulation raster selects the accumulation raster. Now to delineate the watershed use the Watershed tool located at:

ArcToolbox > Spatial Analyst Tools > Hydrology

Select in Input flow direcction raster the direction raster, and in Input raster or feature pour point data the raster of the drainage point. In this way the endorheic basin can be delimited.

The Raster To Polygon tool (ArcToolbox > Conversions Tools > From Raster) can be used to transform the raster of the delineated basin into a vector.

In order to generate the water network, we are going to start by defining a conditional with the Con tool located in:

ArcToolbox > Spatial Analyst Tools > Conditional

For Input conditional raster, select the accumulation raster. In Expression use the expression value > 2500 (if the value is increased the water network will be less dense or vice versa), and in Input true raster or constant value assign 1.

Now to establish links in the water network use the Stream Link tool located at:

ArcToolbox > Spatial Analyst Tools > Hydrology

In the Input stream raster field place the previously generated raster with the conditional function, in Input flow direction raster selects the direction raster.

The order of the water network is then created with the Strem Order tool located at:

ArcToolbox > Spatial Analyst Tools > Hydrology

In the Input stream raster field select the link raster, in Input flow direction raster select the address raster. Under Method of stream ordering optionally select the method of your preference. Finally to convert the water network from raster to vector use the Stream to Feature tool located at:

ArcToolbox > Spatial Analyst Tools > Hydrology

Now in the Input stream raster field select the command raster, in Input flow direction raster select the direcction raster.

This would be the full process of delimiting an endorheic watershed.

Source: Lakebasin

The post Demarcation of endorheic basins in ArcGIS appeared first on GeoGeek.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

In this case we developed a case study using tools available in QGIS 3.

It will show how to alter a Digital Elevation Model (DEM) using the Raster calculator, specifically how to incorporate a dam.

It is not intended to replace more suitable hydrological programs, but to develop an approach using QGIS 3.

Area of study:

It corresponds to a livestock production unit (farm) where cattle and poultry are raised.

The farm is located in a piedmont zone in the south towards high hills to the north, i.e. a tendency from flat zones in the south to steep zones in the north.

Case study:

Productive activities require a continuous supply of water; the location of a small dam is evaluated taking advantage of the steep relief.

Layers and variables:

The layers and the procedure will be used to generate the digital terrain model explained in the article “How to generate a QGIS 3 Digital Elevation Model“.

The site where the dam will be located is provided.


1.- Generate the DEM with a pixel size of 2.5 wide and 2.5 high, load the Ubi_dique points layer.

In the image the cyan diamond represents the location of the dike.

2.- Generate profiles to decide the direction and length of the dike using the Profile Tool complement (See the article Create a river profile in QGIS).

The aim is to achieve the largest dam with a dike of less length and height.

In the selected position the maximum length will be 120 meters on the crest, the maximum elevation will be 280 m.s.n.m.*.

Next, I created a polygon Shapefile and drew the shape of the polygon, define it as the name DIQUE.

3.- Then it will convert the dike to Raster format, for it Raster menu > Conversion > Rasterizar (vectorial to raster)

In the Input layer tab, enter the dike polygon layer (DIQUE), in A fixed value to Burn place 1, in horizontal and vertical resolution place 2.5 (the resolution of the MDE).

Under Output Extension: select the Raster layer of the MDE.

From the name and location of the output file, then click run….

This generates a binary Raster of Rasterized name with value 1 corresponding to the dike and 0 the rest.

Incorporating the dike into the MDE:

4. Activate the Raster calculator and write some conditional assignment equations (see the article reclassifying a QGIS 3 raster).

( “Rasterized@1” > 0 ) * 280 + ( “Rasterized@1” = 0 ) * “MDE@1”.

This creates a new Raster that we name MDE-Dique1

  • ( “Rasterized@1” > 0 ) * 280 selects the pixels of the dike (with value 1) then assigns them the value 280 which is the maximum height of the dike.
  • + ( “Rasterized@1” = 0 ) * “MDE@1” the sign + concatenates another conditional. Then it selects the pixels with a value equal to 0 and assigns them the elevation value of the MDE.

5.- Subsequently, generate the profiles and verify the incorporation of the dam in the MOU.

6.- In the plant and 3D view you can see the shape of the dike.

Fine-tuning the result

The applied equation presents the disadvantage that assigns the elevation value 280 to the entire path of the dike, both in areas with elevations lower than 280 and higher than 280.

7.- The procedure can be fine-tuned by increasing the conditional and with the output name MDE-dike2:

(( “Rasterized@1” > 0 ) AND ( “MDE@1” <= 280 )) * 280 + (( “Rasterized@1” > 0 ) AND ( “MDE@1” > 280 ))* “MDE@1” + ( “Rasterized@1” = 0 ) * “MDE@1”.

  • (( “Rasterized@1” > 0 ) AND ( “MDE@1” <= 280 )) * 280 selects the pixels of the dike and assigns the elevation of 280 only those in which the DEM elevation is less than 280.
  • (( “Rasterized@1” > 0 ) AND ( “MDE@1” > 280 ))* “MDE@1” the pixels of the dike in which the MDE has elevations greater than 280, assigns it the elevation of the MDE.
  • ( “Rasterized@1” = 0 ) * “MDE@1” the different pixels to the dike assigns the elevation of the MDE.

Finally, in the image the result:

In the next article we will determine and represent the dammed water mirror, as well as the dammed volume.

The post Integrating a dike into a DEM in QGIS 3 appeared first on GeoGeek.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

On this occasion we will see how to generate a Digital Elevation Model (DEM) that reflects the shapes of the terrain using various vector entities.

In QGIS 3 it is possible to generate surfaces of a variable by interpolation, generally using coordinate points with elevation information.

However, when you want to model a portion of the earth’s surface the problem is different, the relief has known shapes and details that must be reproduced.

This article is part of a sequence, after the creation of the DEM (download practice exercises), will incorporate a dike, will estimate the water mirror and the calculation of the volume dammed.

Evaluation of a digital terrain model:

Like other interpolated surfaces, digital terrain models are evaluated for their horizontal and vertical accuracy.

Also, it is of interest the adequate representation of the forms of the terrain, that allows, the hydrological, geomorphological, climatic modeling, among others.

Digital terrain model in QGIS 3

In order to generate a digital terrain model according to QGIS 3 terrain shapes, it uses the TIN interpolation method (networks of irregular triangles).

The TIN method accepts different input vector entities, each influencing the triangulation differently:

  • Elevation points.
  • Structure lines: continuous lines that add information to the surface.
  • Rupture lines: produce marked changes on the surface, for example to represent rivers, roads, coastlines.
Case study:

Generation of a DEM of a small surface of steep relief within an agricultural farm.


Load the vector files into the map view.

You may notice that we have entities of points, lines (hydrography, contour lines, peaks and slopes) and polygons (study area).

To access the interpolation tools go to Process Menu > Process Toolbox, in the Panel select the Interpolation tab, then TIN Interpolation.

Digital model with elevation points

To compare the effect of introducing break lines, interpolation is first generated using elevation points extracted from the contour lines.

In the Vector Layer tab select the point layers, in Point Attribute select the Elevation field. Then click on the button with the green plus sign to add the variable.

QGIS 3 offers two methods of generating TIN, Linear and Clough-Toucher, the second produces a smoother surface.

On the Extension tab click on the corner button > Use Canvas Layer Extension.

In the Select Extent dialog box select the Area layer.

You can set the pixel size in the options Number of Rows and Number of Columns, a smaller pixel size generates a better defined surface.

For more details on how to adjust pixel dimensions refer to the Spatial Interpolation article in QGIS 3.

Finally you can define the output files.

In Interpolated the name and location of the surface

Then in Triangulation the vector with the network of triangles.

Digital model with breaking points and lines

Again, deploy the TIN interpolation tool and configure the layers.

Enter the Points layer in the same way as above.

Then select in the Vector Layer tab > contour lines and in Attribute the Elevation field, add it to the list, in Type > Break Lines.

Then, for the Shelves layer select the option “Use z coordinates for interpolation“, in Type > Structure Line.

For the Hydro layer select the option “Use z coordinates for interpolation”, in Type > Break Line.

Configure the other options in the same way as above.

Finally, compare both surfaces.

The post Building a QGIS 3 Digital Elevation Model appeared first on GeoGeek.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Reassignment or reclassification operations consist of the total or partial modification of the values of a raster. Reclassification allows you to group together the current values of a raster.

These operations can be useful in the analysis of the different types of raster, Digital Elevation Models, discrete raster, satellite images.

Examples in raster of continuous variables:

We call continuous raster those that represent a continuous variable in space such as elevation, precipitation, noise, among others, also includes satellite images or product generated.

1. Digital Elevation Model (DEM):

We can use reclassification in a DEM to generate a hypsometry map or in a slope raster to group by ranges.

Reclassify using the GRASS Plugin. Hypsometry:

To know the basic statistics of a Raster you must access to Layer Properties > Histogram or Layer Properties > Information, in the example the height values of the DEM range from 58 to 1635 masl.

QGIS 3 does not have a specific tool to reclassify for it we can use GRASS tools.

In the menu Processes activate the Toolbox, then locate GRASS > r.reclass, in the dialog box the MDE is selected, in the text box Reclass Rules we place the expression that defines the intervals:

  • 0 thru 100 = 1
  • 100 thru 200 = 2
  • 200 thru 300 = 3
  • 300 thru 400 = 4
  • 400 thru 600 = 5
  • 600 thru 1000 = 6
  • 1000 thru 1600 = 7
  • 1600 thru 2000 = 8

The tool runs and generates the output raster, which by default has the name Reclassified. This procedure will facilitate the quantification of the surface of each class and the cartographic representation.

Finally you can alter the text in the Labels and save the style.

Reclassify using the Raster Calculator. Slope:

The slope raster in percentage generated from the previous MOU presents values from 0 to 238, a reclassification is applied in ranges that allow a better interpretation of the relief:

  • 0 – 25% Flat to inclined terrain
  • 25 – 50% Corrugated land
  • 50 – 75% Steep terrain
  • 75 – 100% Very steep terrain

To do this, enter the expression in the Raster Calculator:

(“Slope@1″<= 25) * 25 + (“Slope@1” > 25) AND (“Slope@1” <= 50)) * 50 + (“Pending@1”> 50) AND (“Pending@1” <= 75)) * 75 + (“Pending@1” > 75) * 100

Explanation: the * operator assigns a value to the pixels that meet the condition.
As the generated raster has only 4 categories, it is possible to apply one style per Unique Value.

Generating statistics: to quantify the area occupied by each range of slope select:

Process Toolbox > Raster Analysis > Raster Layer Single Value Report

2.- Example in satellite images. Reclassifying raster floating point:

The reclassification of an NDVI can help the process of interpretation of a satellite image, it can also be useful to evaluate the result of a classification.

NDVI values are related to the presence or absence of vegetation, low values generally coincide with bare soils or water bodies.

By comparing the NDVI values with the satellite image, the following ranges are defined

  • < 0 water
  • 0 to 0.3 bare soils urban areas
  • 0.3 to 0.65 arable crops
  • 0.65 to 1 dense forest crops

The NDVI values are Float type with 14 decimals, the Raster Calculator has the limitation that it does not make transformations to integers.

Before performing the reclassification, the NDVI is multiplied by a constant, in this case 1000 was used:

Expression: ndvi@1*1000 we call the output Raster ndvi1000

Then select Raster menu > Conversion > Translate (Convert Format), to convert the generated raster to integer.

In the dialog box in Input Layer select ndvi1000, configure the SRC, in Advanced Parameters > Output Data Type select Int32, execute.

A raster called Converted is generated with values ranging from 0 to 874.

We perform the reclassification by entering the following expression in the Raster Calculator:

(“Converted@1″<= 0) * 1 + ((“Converted@1” > 0) AND (“Converted@1” <= 300)) * 2 + ((“Converted@1”> 300) AND (“Converted@1” <= 650)) * 3 + (“Converted@1” > 650) * 4

Finally we configure the style and calculate the statistics

The post Reclassification of a raster in QGIS 3 appeared first on GeoGeek.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

It is possible to perform operations in the attribute tables of QGIS 3, e.g. queries, calculation of geometric properties, concatenation and extraction of texts, mathematical and date operations.

Operations in attribute tables are executed in: the Field Calculation Bar, located immediately below the toolbar of the attribute table or with the Field Calculator.

Field Calculator:

The field calculator consists of three panels, the middle shows the expressions that are the functions that can be used (in this article was introduced the use of expressions to create symbology), in the right panel writes the operation and the left panel shows a brief explanation with examples of what the selected expression does. In the upper part the output options are configured, either in a new field, virtual field or updating an existing field.

Operations on Text Fields

Text fields are called Strings, referring to strings of characters, the Fields Calculator has expressions to do operations with text, concatenate, extract characters or phrases, convert to upper or lower case, convert numbers to texts or vice versa, among others.

1.- Rewrite attributes: if we want to assign a text or numeric value to several records, first select the records and then write the value between apostrophes.

2.- Concatenate fields: we can attribute text, if one of the fields is numeric it is automatically converted into text. In the following example we have the data of a supply network, a field with the diameter in inches (decimal) and another one with the material (text), a new field will be created that one denominated “Type”, for it the function “concat” is used:

concat(“Material”, ‘ of ‘ , “Diameter”, ‘ ” ‘)

Calculations in numeric fields:

In the following example we have a layer of US states with a field with surface (AREA), population for 1990 (Pop1990) and population for 1997 (Pop1997).

1.- Population density: To calculate the population density for 1990 the following expression is used “Pop1990” / “Area”, a new field called “Density90” is configured, decimal type with 12 characters and 2 decimals:

2. Population increase: In order to know the population increase between 1990 and 1997, we simply subtract the fields “Pop1997” – “Pop1990”.

Determining geometric properties

Knowing the geometric properties of a layer is a fundamental requirement when working with cartography, for example: the coordinates of a well, the length of a road or the area of a plot.

In a GIS, generally three types of vector entities are handled, with geometric properties defined by their dimensions:

  • Points: X,Y coordinate
  • Lines: length
  • Polygon: area, perimeter

1.- Calculate the coordinates of points: Open the field calculator, in the dialog box that displays leaves the default option, “Create a New Field”, in the tab “Name” enter “This”.

In the central part of the dialog box look for the functions, select Geometry and then double click on $X, the function is written in the left panel and at the bottom of the table we can see the preview of the result. Click on the Ok button and create the field. Repeat the procedure using the $Y function for the North coordinate.

Why is this function used?

The $ sign means that the function will be executed on the entities of the layer (on which we are working), so $X returns the X coordinate of each entity of the layer.

2.- Calculate the length of a line: In this case in the Field Calculator select the function $lenght and put an appropriate name to the field, for example: Length.

3.- Calculate the area and perimeter of a polygon: Following the same procedure described above, with the $Area and $Perimeter functions you can calculate the area and perimeter respectively.

Note: it is also possible to consult the geometric properties of an entity without having to perform an operation in the attribute table, simply by using the identify button a dialog box is displayed showing the attributes, then click on the “derived” tab.

The post Basic operations with tables in QGIS 3 appeared first on GeoGeek.

  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

In addition to the traditional raster and vector files QGIS 3 also allows the implementation of Spatial Databases such as PostGIS, as well as light alternatives such as Spatialite and the Geopackage format.

Spatial databases optimize management by allowing various spatial and non-spatial data types to be stored and manipulated in a single file. The following examples show how to integrate a set of Shapefile layers, with their styles, into a Saptialite and Geopackage file.

Database Administrator:

The database administrator is a module that allows to manage the different database formats supported by QGIS 3, among its functions are to connect a database, view its content, edit it, SQL queries, import and export files.

Create a Spatialite Database:

1.- First the Shapefile of the project are loaded, in this case the free access layers of a hydrogeological and gravimetric study of Utah, FORGE, were used, obtained from the web https://gis.utah.gov/

2.- Creating a Spatialite database: There are several ways to create a Spatialite layer:

  • Layer menu > New Spatialite layer.
  • Navigation Pane > Spatialite > right click Create Database.
  • Using the sheet-shaped button on the “Manage Layers” toolbar.

The first option displays a dialog box similar to the one used to create Shapefile, from top to bottom it allows to give a name and location to the Database file (in the example Utah_well.sqlite), followed by options to define the first layer that will contain the Database: name, geometry type, cartographic reference system, fields.

In the Navigation Panel and the Database Manager you can see the new layer created:

3.- To import vector layers, activate the Database Administrator, then click on the down arrow button (“Input“). In the dialog box that appears, in the upper tab select the layer to import. Then click on “Update Options“, the name of the layer appears in the tab “Table” we can edit this name, be sure not to leave spaces between characters. All other options are left by default.

The option “Create Spatial Index” must be activated. Then click Ok, a message will appear announcing that the import was successful.

4.- The process is repeated for the other Layers, it is recommended to press the “Update” button or the F5 key each time an import is made.

5.- After the vectorial layers have been added to our Database, we can visualize them in the Database Administrator, as well as their properties, attributes table and preview:

6.- To add the imported Layers to the Map, select the Layer in the Database Manager right click “Add to Canvas“, repeat with all the layers, you will have a duplicate of each layer, the Shapefiles and those contained in the Spatialite database, the latter will not have a defined style.

7.- Setting Styles: you can edit or copy the styles defined for the Shapefile layers, select a layer right click Style > Copy Style, repeat the process on the Database layer and choose the Paste Style option.

8.- Saving Styles in the Database: right click on the layer > Properties, in the symbology tab, in the lower part select Styles > Save > Save to Database (Spatialite), a dialog box appears in which you must assign a name to the style and optionally a description.

In the Database Administrator you can verify that a layer of styles (layer_styles) has been added, when consulting it in Table mode we can see the saved Styles:

Creating a Geopackage Layer:

This format is an option to the Spatialite format, to add layers a slightly different procedure must be performed.

1.- Go to menu Layer > Create Layer > New Geopackage Layer, in the dialog box you configure the location and name of the database, the properties of the first layer it will contain.

2.- For the Database Administrator to recognize the new layer, select the option Geopackage > right button “New Connection…”. If you want to create a Geopackage file, locate and select the newly created Geopackage file.

3.- The integration of layers to the database is done by selecting the layers Shapefile > right button “Save as…”, in the upper tab we make sure that the format is Geopackage, in File Name locate and select the layer Geopackage, in Layer Name write a name for the layer to be added, then click Ok. It is repeated for the other layers.

4.- In the Layers Panel and in the Database Administrator it is verified that the vectorial layers have been added to the Geopackage.

5.- To create and save the styles, repeat the procedure performed with SpatiaLite.

Add Raster files to our databases:

Although the Spatialite and Geopackage formats support raster files (images, Grids, digital models, among others) that can be displayed in QGIS 3, currently the Database Manager can only handle vector formats, in future versions it is expected to improve the support to other types of data.

The post Introduction to the use of SpatiaLite and Geopackage in QGIS 3 appeared first on GeoGeek.

Read for later

Articles marked as Favorite are saved for later viewing.
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Separate tags by commas
To access this feature, please upgrade your account.
Start your free month
Free Preview