How to track changes in a geodatabase under ArcGis

From the moment you are not any longer alone to manage data, it is important to be able to track data changes: who did what and when?

If you work with geodatabases enterprise you know that you have at your disposal the versioning as well as archiving options to perform this task , provided you count with a Standard or Advanced license .

We will address the available tool with ArcGis 10.2 and above in Basic version to perform this task in personal geodatabases and file: tracking publisher. Continue reading “How to track changes in a geodatabase under ArcGis”

Spatial analysis with SQL: 5- aggregation function (ArcGis Union)

In Article previous we have discussed some SQL functions for spatial processing . In this article we will see a function a little more complicated to put at work: the aggregation function for two layers of polygons. This operation is the one called Union in ArcGis. The purpose of the operation is to obtain a layer with all the intersections of the entities of the two original layers, and, also, all non-intersecting entities.

Let’s use the following example. We have a first layer “rectangles”

 

A second layer “circles”

 

That overlaps spatially:

 

What we want to obtain is a layer containing all the polygons of both layers but creating polygons to overlay areas:

 

We will proceed by following the same method used in the previous article, i.e. by developing an SQL query including several sub queries.

In the first place, we will develop a query that will build the polygons of the overlapping areas (the intersections) of both layers. These polygons appear in yellow in the next picture.

 

We will resume the request used in the previous article:

select circle.id as id1, rectangles.id as id2, st_intersection (circle.geom, rectangles.geom ) as the_geom
from circle, rectangles
where st_intersects ( circle.geom, rectangles.geom )
group by circle.id, rectangles.id

You will notice that the select is built not just to retrieve intersected geometries, but also the identifiers of the original entities (circle.id and rectangles.id). Of course, you can recover other attributes, or all by changing this part of the request.

To these polygons, we will add the rest of the areas occupied by the rectangle layer (in yellow in the following picture)

 

 

select 0 as id1, rectangles.id as id2, st_difference ( rectangles.geom,

(select multi ST_ (ST_Union (the_geom)) as the_geom from (
select st_intersection (circle.geom, rectangles.geom ) as the_geom
from circle, rectangles
where st_intersects ( circle.geom, rectangles.geom ))
as the_geom)) as the_geom
from rectangles

What we get to do with this request is to extract all the intersection areas (as in the previous query) and convert them in a single multi-polygon. The request removes the difference of this multi- polygon with the layer of rectangles.

Finally, these polygons, we are going to add the rest of the areas occupied by the layer circles to these polygons (yellow in the following image)

 

We will proceed likewise the rectangles, by using a multi- polygon of intersection areas and calculating the difference with the layer circles:

 

select circle.id as id1, 0 as id2 , st_difference ( circle.geom , (
select st_multi ( st_union ( the_geom )) as the_geom from (
select st_intersection ( circle.geom, rectangles.geom ) as the_geom
from circle, rectangles
where st_intersects ( circle.geom, rectangles.geom ))
as the_geom )) as the_geom
from circle

The union of these three requests produces the outcome layer we expected :

 

select *
from
(select circle.id as id1, rectangles.id as id2, st_intersection ( circle.geom, rectangles.geom ) as the_geom
from circle, rectangles
where st_intersects ( circle.geom, rectangles.geom )
group by circle.id, rectangles.id
union all
select 0 as id1, rectangles.id as id2, st_difference ( rectangles.geom , (
select st_multi ( st_union ( the_geom )) as the_geom from (
select st_intersection ( circle.geom, rectangles.geom ) as the_geom
from circle, rectangles
where st_intersects ( circle.geom, rectangles.geom ))
as the_geom )) as the_geom
from rectangles
union all
select circle.id as id1, 0 as id2, st_difference ( circle.geom , (
select st_multi ( st_union ( the_geom )) as the_geom from (
select st_intersection ( circle.geom, rectangles.geom ) as the_geom
from circle, rectangles
where st_intersects ( circle.geom, rectangles.geom ))
as the_geom )) as the_geom
from circle
) as T1  

 

1-n joins in QGis: virtual layers

One of the most common techniques in GIS in order to treat non-spatial data is that of the join. We use a geographical layer having geometries, as support for another layer having no location data. To this end, we will use a common field to both tables, that allows “the joining” the records from the geographic table to those of the non- geographic table. Therefore we created a new virtual table where the attributes of the non- geographic table can be used to be mapped with the geometry of the first table. For this join to work it is necessary that for every registration of geographical table corresponds a record in the non- geographic table, and only one. Because if more than one is found, the join cannot work. In that case we have a “relationship” between the tables, never a “juncture”.

For a long time, GIS software has, only, allowed to work with joins. The relationships do not stand most spatial operators applicable to joins. Continue reading “1-n joins in QGis: virtual layers”

KML: Getting Started

KML(Keyhole Markup Language) is an XML data format used to display information in a geographical context. Just as Web browsers read and display HTML files,  land-based browsers such as Google Earth read and display KML files. KML is a language readable byeveryone , composed of text and punctuation . It can be created and edited through a basic text editor, saved, and then previewed in a land-based browser . You do not need to be a wizard to master the basics of KML, and you’ll notice than this knowledge will make it possible to create powerful presentations that depict your geographical data and images on the numerous land-based free browsers such as : Google Earth, Microsoft Virtual Earth, NASA WorldWind, ArcGisExplorer, .. Continue reading “KML: Getting Started”

Integrated Coastal Management: location (spaces) and localization (space)

Unlike in a previous article (Spatial Data Analysis and Spatial Analysis of Data) where nothing was specific to coastal management, in this article I will examine specifically Coastal Management. We will start by discussing how geomatics applied to the littoral zone displays very specific features.


Continue reading “Integrated Coastal Management: location (spaces) and localization (space)”

Start with PostgreSQL / Postgis -Introduction to pgAdmin 4

Following up a previous article (Débuter avec Postgres/Postgis ), we will address an introduction to Postgres/postgis database management. We will load a shapefile, connect and load the Postgis layer from QGis.

The most  suitable method to manage PostgreSQL databases is by using the pgAdmin4 GUI.

This tool is setup automatically during PostgreSQL installation. You can launch it from the programme bar:

Continue reading “Start with PostgreSQL / Postgis -Introduction to pgAdmin 4”

Use of Landsat images (free) in your GIS

When we think of accessible data to integrate into our GIS, we hardly think of satellite data. And yet, it is possible, and just a few clicks away.

Let’s see an example. The following images represent the state of the vegetation for the islands of the Gulf of Morbihan, on the left for July 2014, on the right for March 2015. If we wish, we can obtain images every 15 days, the most just one week old.

ndvi juillet morbihan

ndvi mars morbihan

Findin, recovering and processing them in just 5 minutes. So, why deprive yourself?  Continue reading “Use of Landsat images (free) in your GIS”