Welcome to Planet OSGeo

June 22, 2018

We are extremely pleased to announce the winning proposals for our 2018 QGIS.ORG grant programme. Funding for the programme was sourced by you, our project donors and sponsorsNote: For more context surrounding our grant programme, please see:

The QGIS.ORG Grant Programme aims to support work from our community that would typically not be funded by client/contractor agreements, and that contributes to the broadest possible swathe of our community by providing cross-cutting, foundational improvements to the QGIS Project.

Voting to select the successful projects was carried out by our QGIS Voting Members. Each voting member was allowed to select up to 6 of the 14 submitted proposals by means of a ranked selection form. The full list of votes are available here (on the first sheet). The second sheet contains the calculations used to determine the winner (for full transparency). The table below summarizes the voting tallies for the proposals:

voting_results_2018

A couple of extra notes about the voting process:

  • The PSC has an ongoing program to fund documentation so elected to fund the QGIS Training Manual update even if this increases the total funded amount beyond the initial budget.
  • Although the budget for the grant programme was €25,000, the total amount for the winning proposals is €35,500. This increase is possible thanks to the generous support by our donors and sponsors this year.
  • Voting was carried out based on the technical merits of the proposals and the competency of the applicants to execute on these proposals.
  • No restrictions were in place in terms of how many proposals could be submitted per person / organization, or how many proposals could be awarded to each proposing person / organization.
  • Voting was ‘blind’ (voters could not see the existing votes that had been placed).

Of the 45 voting members, 29 registered their votes 17 community representatives and 12 user group representatives.

On behalf of the QGIS.ORG project, I would like to thank everyone who submitted proposals for this call!

A number of interesting and useful proposal didn’t make it because of our limited budget; we encourage organizations to pick up one of their choice and sponsor it.

by underdark at June 22, 2018 07:03 PM

Pomysł na zorganizowanie tego spotkania kiełkował od lat, ale zawsze brakowało czasu na jego realizację. Główny problem polegał na określeniu docelowej grupy uczestników oraz formuły. Wiemy oczywiście, jak szerokie jest grono użytkowników programu QGIS, ale ta wiedza wcale nie ułatwiała zadania. Ostatecznie po przeprowadzeniu kilku ankiet na polskim forum QGIS postanowiliśmy zaserwować wszystkiego po trochu. Potrzebni byli tylko prelegenci, miejsce i termin. Zdecydowaliśmy się na 19 czerwca 2018…

by robert at June 22, 2018 06:07 PM

June 21, 2018

One of the joys of geospatial processing is the variety of tools in the tool box, and the ways that putting them together can yield surprising results. I have been in the guts of PostGIS for so long that I tend to think in terms of primitives: either there’s a function that does what you want or there isn’t. I’m too quick to ignore the power of combining the parts that we already have.

A community member on the users list asked (paraphrased): “is there a way to split a polygon into sub-polygons of more-or-less equal areas?”

I didn’t see the question, which is lucky, because I would have said: “No, you’re SOL, we don’t have a good way to solve that problem.” (An exact algorithm showed up in the Twitter thread about this solution, and maybe I should implement that.)

PostGIS developer Darafei Praliaskouski did answer, and provided a working solution that is absolutely brilliant in combining the parts of the PostGIS toolkit to solve a pretty tricky problem. He said:

The way I see it, for any kind of polygon:

  • Convert a polygon to a set of points proportional to the area by ST_GeneratePoints (the more points, the more beautiful it will be, guess 1000 is ok);
  • Decide how many parts you’d like to split into, (ST_Area(geom)/max_area), let it be K;
  • Take KMeans of the point cloud with K clusters;
  • For each cluster, take a ST_Centroid(ST_Collect(point));
  • Feed these centroids into ST_VoronoiPolygons, that will get you a mask for each part of polygon;
  • ST_Intersection of original polygon and each cell of Voronoi polygons will get you a good split of your polygon into K parts.

Let’s take it one step at a time to see how it works.

We’ll use Peru as the example polygon, it’s got a nice concavity to it which makes it a little trickier than an average shape.

CREATE TABLE peru AS 
  SELECT *
  FROM countries
  WHERE name = 'Peru'

Original Polygon (Petu)

Now create a point field that fills the polygon. On average, each randomly placed point ends up “occupying” an equal area within the polygon.

CREATE TABLE peru_pts AS
  SELECT (ST_Dump(ST_GeneratePoints(geom, 2000))).geom AS geom
  FROM peru
  WHERE name = 'Peru'

2000 Random Points

Now, cluster the point field, setting the number of clusters to the number of pieces you want the polygon divided into. Visually, you can now see the divisions in the polygon! But, we still need to get actual lines to represent those divisions.

CREATE TABLE peru_pts_clustered AS
  SELECT geom, ST_ClusterKMmeans(geom, 10) over () AS cluster
  FROM peru_pts;

10 Clusters

Using a point field and K-means clustering to get the split areas was inspired enough. The steps to get actual polygons are equally inspired.

First, calculate the centroid of each point cluster, which will be the center of mass for each cluster.

CREATE TABLE peru_centers AS
  SELECT cluster, ST_Centroid(ST_collect(geom)) AS geom
  FROM peru_pts_clustered
  GROUP BY cluster;

Centroids of Clusters

Now, use a voronoi diagram to get actual dividing edges between the cluster centroids, which end up closely matching the places where the clusters divide!

CREATE TABLE peru_voronoi AS
  SELECT (ST_Dump(ST_VoronoiPolygons(ST_collect(geom)))).geom AS geom
  FROM peru_centers;

Voronoi of Centrois

Finally, intersect the voronoi areas with the original polygon to get final output polygons that incorporate both the outer edges of the polgyon and the voronoi dividing lines.

CREATE TABLE peru_divided AS
  SELECT ST_Intersection(a.geom, b.geom) AS geom
  FROM peru a
  CROSS JOIN peru_voronoi b;

Intersection with Original Polygon

Done!

Clustering a point field to get mostly equal areas, and then using the voronoi to extract actual dividing lines are wonderful insights into spatial processing. The final picture of all the components of the calculation is also beautiful.

All the Components Together

I’m not 100% sure, but it might be possible to use Darafei’s technique for even more interesting subdivisions, like “map of the USA subdivided into areas of equal GDP”, or “map of New York subdivided into areas of equal population” by generating the initial point field using an economic or demographic weighting.

June 21, 2018 08:00 PM

Los próximos días 18 y 19 de octubre se celebrarán las 5as Jornadas gvSIG Uruguay y 3as Jornadas de Tecnologías Libres de Información Geográfica y Datos Abiertos en Montevideo (Uruguay), bajo el lema ‘Información Geográfica en un ámbito abierto’.

Desde ahora está abierto el periodo de recepción de resúmenes, los cuales pueden enviarse a la dirección de correo jornadas.uruguay@gvsig.org siguiendo la plantilla facilitada en el apartado Comunicaciones de la web del evento, donde pueden consultarse también las normas para el envío. Los tipos de comunicación admitidos son ponencia y póster.

Durante las jornadas se entregarán los premios del Concurso de Uso de Tecnologías Libres de Información Geográfica 2018, organizado por GeoForAll Iberoamérica y OSGeo. para el cual los usuarios de cualquier Tecnología Libre de Información Geográfica pueden enviar ya sus trabajos.

Las jornadas serán gratuitas, y el periodo de inscripción se abrirá el 24 de septiembre.

Así mismo, cualquier entidad interesada en colaborar con las jornadas, puede hacerlo de varias formas, que incluyen desde una aportación económica hasta el aporte de recursos que de forma equivalente cubran las necesidades de apoyo detectado por el comité organizador. Toda la información relacionada con ello está disponible en la web de las jornadas.

by Mario at June 21, 2018 05:21 PM

June 20, 2018

Save as a text file ending in .xml like qgis_scales.xml

These are the scales OpenStreetMap tiles are rendered in for 96 dpi, so the map will look sharp on most monitors.

The xml file can then be loaded into the project from:

Project> Project Properties…> General> Project scales

<qgsScales version="1.0">
    <scale value="1:554678932"/>
    <scale value="1:277339466"/>
    <scale value="1:138669733"/>
    <scale value="1:69334866"/>
    <scale value="1:34667433"/>
    <scale value="1:17333716"/>
    <scale value="1:8666858"/>
    <scale value="1:4333429"/>
    <scale value="1:2166714"/>
    <scale value="1:1083357"/>
    <scale value="1:541678"/>
    <scale value="1:270839"/>
    <scale value="1:135419"/>
    <scale value="1:67709"/>
    <scale value="1:33854"/>
    <scale value="1:16927"/>
    <scale value="1:8463"/>
    <scale value="1:4231"/>
    <scale value="1:2115"/>
</qgsScales>

Example:

1,000,000 (QGIS default):

1,083,357 (OSM wiki):

1,155,584 (From: 3liz):

Scales from:
OSM wiki

by Heikki Vesanto at June 20, 2018 09:00 AM

We are happy to announce the release of GeoServer 2.12.4. Downloads are available (zipwar, and exe) along with docs and extensions.

This is a maintenance release and a recommend update production systems. This release is made in conjunction with GeoTools 18.4.

Highlights of this release are featured below, for more information please see the release notes (2.12.42.12.3,2.12.2, 2.12.12.12.0 | 2.12-RC1 | 2.12-beta).

Improvements

  • Add forceLabels=on in the style editor map legend to help users,
  • Remove language warnings during Windows setup compilation and remove ‘work’ folder when uninstalling on Windows
  • Move MongoDB community module to supported status

Bug Fixes

  • Response time of WMS 1.3.0 significantly higher than vs WMS 1.x.x on systems whose axis in north/east order
  • Exception with NULL values with AggregateProcess
  • Style with Interpolate function causes NullPointerException on GetLegendGraphic
  • WFS with startIndex doesn’t return some results
  • Vector identifying feature info uses an undocumented system variable to set the default search area
  • Removing extensions with own configuration bits may cause GeoServer not to start up anymore
  • Windows Installation issue – upgrading GeoServer results in corrupt data_dir
  • Class java.util.Map$Entry is not whitelisted for XML parsing.
  • Add WMS GetMap and GetFeatureInfo tests for App-Schema MongoDB integration
  • CatalogRepository cannot find a store by name, if the store has just been added
  • WCS 1.0.0 generates wrong links in GetCapabilities
  • CatalogRepository should return a null on store not found, instead it throws a RuntimeException
  • Layer page will only show up to 25 bands, regardless of the actual set of bands available
  • Undocumented GDAL 2.3.0 CSV output geometry column name change breaks WPSOgrTest

Security Updates

Please update your production instances of GeoServer to receive the latest security updates and fixes.

If you encounter a security vulnerability in GeoServer, or any other open source software, please take care to report the issue in a responsible fashion.

About GeoServer 2.12 Series

Additional information on the 2.12 series:

by iant at June 20, 2018 08:44 AM

June 19, 2018

A new mailing list for gvSIG Developers has been created, that replaces the previous one. This list will continue being the main contact point for English speaking developers to ask about any doubt or problem on gvSIG development (Java, Scripting…).

The previous mailing list was hosted in Joinup, but their support has been ended. Therefore, we have decided to migrate the mailing list to OSGeo.

The new mailing list is available here:

https://lists.osgeo.org/mailman/listinfo/gvsig-desktop-devel You can configure the mailing list to receive list traffic bunched in digests, or if you don’t want to receive the e-mails from the list you can choose that option at settings. Then you will be able to send the doubts to the list, and you can consult replies from

http://osgeo-org.1560.x6.nabble.com/gvSIG-developers-f4175719.html

We also want to thank OSGeo for their offer to host the mailing list.

by Mario at June 19, 2018 11:05 AM

senzanome

Dear Reader,

We apologize in advance, but this post is for our italian readers (hence in Italian only) to announce that we have finalized a new version of the DCAT-AP_IT Metadata Profile leveraging on the CKAN Open Data product.

Siamo lieti di condividere con voi le ultime novità che caratterizzeranno la nuova versione dell’estensione CKAN per il supporto al profilo applicativo DCAT-AP_IT. Come forse molti di voi già sapranno il profilo per la documentazione dei dati delle pubbliche amministrazioni (DCAT-AP_IT), reso disponibile dall’Agenzia per l’Italia Digitale (AgID), è nato con l’obiettivo di armonizzare i metadati con cui vengono descritti i dataset pubblici, al fine di migliorarne la qualità e favorire il riuso delle informazioni.

La prima versione, rilasciata ufficialmente nel Febbraio del 2017 e disponibile gratuitamente con licenza AGPL v3.0, fu sostenuta in uno sforzo congiunto dalla Provincia di Bolzano/Sud Tirol e dalla Provincia di Trento e fornisce ancora oggi un insieme valido ed eterogeneo di funzionalità non solo per la creazione guidata di datasets, ma anche per l’integrazione di metadati provenienti da sorgenti esterne (CSW, RDF, JSON-LD) in conformità al Profilo Applicativo. Sviluppata con scrupolosa attenzione alla stabilità delle sue caratteristiche funzionali, l’estensione ckanext-dcatapit, disponibile su una repository dedicata sotto il nostro account GitHub, nasce garantendo la più alta compatibilità possibile con le altre estensioni che spesso sono presenti nelle piattaforme CKAN. Anche gli aspetti legati al multilinguismo e la localizzazione dell’interfaccia sono stati affrontati e resi disponibili per garantire la massima usabilità da parte di quelle realtà che li necessitano, come per esempio le Provincie di Bolzano/Sud Tirol e Trento: l’estensione fornisce i propri files di localizzazione che aiutano a snellire eventuali personalizzazioni in questi termini, mentre l’estensione ckanext-multilang fornisce supporto per il multilinguismo dei contenuti presenti nel catalogo (dataset, organizzazioni, gruppi, risorse e altro).

Ad oggi non pochi sono i portali open data italiani che utilizzano questa estensione e tra questi si annoverano sicuramente:

  • Il portale OpenData della Provincia di Bolzano/Sud Tirol
  • Il portale OpenData del Trentino
  • L’infrastruttura federata OpenDataNetwork per il capofila Città Metropolitana di Firenze, che raccoglie e distribuisce i dati di vari enti toscani tra cui: Città Metropolitana di Firenze, Provincia di Prato, Provincia di Pistoia ed Autorità di Bacino dell’Arno.

Ma anche molti altri tra cui:

Grazie all’interesse mostrato dall’Agenzia per l’Italia Digitale (AgID) riguardo alle potenzialità e alle caratteristiche proprie di questa estensione, hanno avuto inizio alla fine del 2017 gli sviluppi per la realizzazione di una nuova versione arricchita e migliorata.

Gli sforzi di AgID nel finanziare questo progetto hanno avuto l’obiettivo di creare un unico hub di raccolta nazionale per i dataset pubblici basato su CKAN e fornire quindi, in un unico punto di accesso, le principali informazioni sui dati aperti esposti dalle PA locali e centrali (si fa in particolar modo riferimento al progetto DAF e la sua componente Dataportal).

Un insieme eterogeneo di funzionalità e peculiari caratteristiche sono state introdotte nella nuova versione per garantire non solo una più completa adesione al Profilo Applicativo, ma anche per aiutare l’utente nella ricerca dei datasets con nuove funzioni di indicizzazione e raggruppamento dei dataset stessi per regione di provenienza. È stato aggiunto dunque il supporto alla cardinalità multipla per le proprietà che la richiedono (come per esempio gli identificativi del dataset,  temi e sottotemi, autori e altre) e le funzionalità di catalogo sono state arricchite per identificare il catalogo e l’organizzazione di origine dei dataset  harvestati. In aggiunta, nuove facets saranno disponibili per filtrare i datasets per catalogo di origine, regioni e sottotemi.

[caption id="attachment_4152" align="aligncenter" width="800"]Nuove facet di ricerca disponibili nella schermata di ricerca Nuove facet di ricerca disponibili nella schermata di ricerca[/caption] Le caratteristiche proprie della form di creazione e modifica del dataset sono state migliorate offrendo delle mini guide di inserimento più dettagliate per l’utente, mentre il supporto al multilinguismo, offerto dall’estensione ckanext-multilang, è stato esteso anche ad altre proprietà, come per esempio rightsHolder, publisher, creator e conformsTo sia in harvesting che in serializzazione del dataset. [caption id="attachment_4153" align="aligncenter" width="800"]Scheda di dettaglio del dataset Scheda di dettaglio del dataset[/caption] La web form di creazione del dataset è stata inoltre ristrutturata attraverso un flusso di editing basato su macro ambiti di inserimento, per meglio indirizzare l’utente nella valorizzazione delle proprietà richieste dal Profilo. [caption id="attachment_4160" align="aligncenter" width="800"]Nuova form di modifica del dataset Nuova form di modifica del dataset[/caption] Anche i vocabolari controllati, primo tra tutti quello delle licenze, sono stati aggiornati e la nuova estensione ckanext-dcatapit metterà a disposizione un campo addizionale per la licenza a livello di risorsa del dataset. [caption id="attachment_4155" align="aligncenter" width="800"]Impostazione della licenza per la risorsa Impostazione della licenza per la risorsa[/caption]  

Anche il supporto al vocabolario controllato dei sottotemi, precedentemente mancante, è stato introdotto insieme al vocabolario controllato per la classificazione del territorio che consente l’associazione di una o più regioni italiane ad ogni organizzazione e facilitare quindi la ricerca dei datasets.

[caption id="attachment_4161" align="aligncenter" width="800"]Nuova form di modifica del dataset, selezione di temi e sottotemi Nuova form di modifica del dataset, selezione di temi e sottotemi[/caption]

Gli sforzi per la realizzazione della nuova versione si sono concentrati anche sul consolidare e accrescere le funzionalità di harvesting dei dataset con lo scopo sia di organizzare e catalogare al meglio i dataset raccolti ma anche di correggere, per quanto possibile, eventuali difformità nei dataset di origine (per esempio temi non conformi al Profilo Applicativo). Tra gli aspetti importanti riguardanti l’harvesting dei dataset troviamo anche i seguenti:

  • Migliorata la validazione dei tag in modo da gestire tag non conformi
  • Introdotto la mappatura delle licenze non conformi con quelle del vocabolario controllato aggiornato
  • Consolidamento delle funzionalità di harvesting già esistenti

Come ultimo punto, ma non per questo meno importante, lo sviluppo di una infrastruttura basata su Docker è stato messo a disposizione (attualmente ancora in fase di testing in vista del prossimo rilascio). Questo progetto, sviluppato in parallelo dal team di GeoSolutions, è disponibile sul GitHub Developers Italia e mette a disposizione tutto ciò di cui avete bisogno per ottenere rapidamente ed in pochi passi un’installazione completa di CKAN corredata dell’estensione ckanext-dcatapit.

Invitiamo tutti coloro che sono interessati a partecipare allo sforzo per lo sviluppo di questa estensione o che fossero interessati ad utilizzare questa estensione a seguire il nostro blog o iscriversi alla nostra newsletter; raccomandiamo di visionare anche i nostri pacchetti di supporto professionale GeoSolutions Enterprise Support Services nel caso si volesse usufruire di un supporto attento e qualificato per la messa in produzione di questa estensione. Allo stesso modo vi invitiamo a visionare le informazioni sugli altri nostri prodotti Open Source quali GeoServerMapstore, GeoNode e GeoNetwork.

The GeoSolutions team,

by simone giannecchini at June 19, 2018 08:43 AM

June 18, 2018

post_TIG_Valencia

La Asociación gvSIG, fiel a su compromiso de dar visibilidad a los proyectos de SIG Libre, colabora con el XVIII Congreso Nacional TIG que se realizará en Valencia entre los días 20 y 22 de junio.

Tendremos un stand donde estaremos encantados de hablar con cualquier institución o empresa interesada en implementar cualquiera de los productos de gvSIG, informaremos de las últimas novedades de la Suite gvSIG y tendremos algún que otro obsequio para las personas visitantes.

Además, impartiremos un taller para aprender scripting en gvSIG Desktop. Será el jueves 21 de 16:00 a 17:30.

Os facilitamos el enlace para ver el programa completo:

https://congresos.adeituv.es/tig2018/paginas/pagina_451_25.es.html

 

by Alonso Morilla at June 18, 2018 05:09 PM

Thanks to the support given by the sponsors of the GDAL SRS barn effort, I have been able to kick in the first works in the past weeks. The work up to now has been concentrated on the PROJ front.

The first step was to set a foundation of C++ classes that implement the ISO-19111 / OGC Topic 2 "Referencing by coordinates" standard. Actually I have anticipated the future adoption of the 18-005r1 2018 revision of the standard that takes into account the latest advances in the modelling of coordinate reference systems (in particular dynamic reference frames, geoid-based vertical coordinate reference systems, etc.), which will be reflected in the corresponding update of the WKT2:2018 standard and future updates of the EPSG dataset. If you are curious, you can skim through the resulting PROJ class hierarchy which is really close to the abstract specification (a number of those classes currenty lack a real implementation for now). With the agreement of the newly born PROJ project steering committee, I have opted for C++11 which offers a number of useful modern features to reduce boilerplate and concentrate on the interesting aspects of the work.

On the functional front, there is already support to read WKT1 (its GDAL variant for now) and WKT2 strings and build a subset of the before mentionned C++ objects. And conversely to dump those C++ objects as WKT1 and WKT2 strings. In particular you can import from WKT1 and export to WKT2, or the reverse (within the limitations of each format). So this abstract modelling (quite close to WKT2 of course) effectively serves its purpose to help being independant from the actual representation of the CRS. As I mentionned an early adoption of the OGC Topic 2 standard, similarly I've taken into account the future WKT2:2018 (OGC 18-010) standard that aligns well with the abstract specification. In the API, the user can select if he wants to export according to the currently adopted version WKT2:2015 (OGC 12-063r5), or with the future WKT2:2018 revision.

The result of those first steps can be followed in this pull request.

Another task that has been accomplished is the addition of the Google Test C++ testing framework to PROJ (thanks to Mateusz Loskot for his help with the CMake integration), so all those new features can be correctly tested locally and on all platforms supported by PROJ continuous integration setup.

There are many future steps to do just on the PROJ front :
  • implement remaining classes
  • code documentation
  • comprehensive support of projection methods (at least the set currently supported by GDAL)
  • import from and export to PROJ strings for CRS definitions and coordinate operations
  • use of the EPSG dataset

by Even Rouault (noreply@blogger.com) at June 18, 2018 11:40 AM

June 16, 2018

Those past couple days, I was working on implementing multi-layer transaction support for GeoPackage datasources (for QGIS 3.4). Multi-layer transaction is an advanced functionality of QGIS (you have to enable it in project settings), initially implemented for PostgreSQL connections where several layers can be edited together so as to have atomic modifications when editing them. Modifications are automatically sent to the database, using SQL savepoints to implement undo/redo operations, instead of being queued in memory and committed at once when the user stops editing  the layer.

While debugging my work during development, I stumbled upon a heisenbug. From time to time, the two auxiliary files attached to a SQLite database opened in Write Ahead Logging (WAL) mode, suffixed -wal and -shm, would suddenly disappear, whereas the file was still being opened by QGIS. As those files are absolutely required, the consequence of this was that following operations on the database failed: new readers (in the QGIS process) would be denied opening the file, and QGIS could not commit any new change to it. When the file was closed, the file returned again in a proper state (which shows the robustness of sqlite). After some time, I realized that my issue arised exactly when I observed the database being edited by QGIS with an external ogrinfo on it (another way to reproduce the issue would be to open a second QGIS instance on the same file and close it). I indeed used ogrinfo to check that the state of the database was consistent during the editing operations. Okay, so instead of a random bug, I had now a perfectly reproducable bug. Half of the way to solve it, right ?

How come ogrinfo, which involves read-only operations, could cause those -wal and -shm files to disappear ? I had some recollection of code I had written in the OGR SQLite driver regarding this. When a dataset opened in read-only mode is closed by OGR, it checks if there's a -wal file still existing (which could happen if a database had not been cleanly closed, like a killed process), and if so, it re-opens it temporarily in update mode, does a dummy operation on it, and close it. If the ogrinfo process is the only one that had a connection on the database, libsqlite would remove the -wal and -shm files automatically (OGR does not directly remove the file, it relies on libsqlite wisdom to determine if they can be removed or not). But wait, in my above situation, ogrinfo was not the exclusive process operating on the database: QGIS was still editing it.... Would that be a bug in the venerable libsqlite ??? (spoiler: no)

I tried to reproduce the situation with replacing QGIS by a plain sqlite console opening the file, and doing a ogrinfo on it. No accidental removal of the -wal and -shm files. Okay, so what is the difference between QGIS and the sqlite console (beside QGIS having like one million extra line of code;-)). Well, QGIS doesn't directly use libsqlite3 to open GeoPackage databases, but uses the OGR GPKG driver. So instead of opening with QGIS or a sqlite3 console, what if I opened with the OGR GPKG driver ? Bingo, in that situation, I could also reproduce the issue. So something in OGR was the culprit. I will save you of the other details, but at the end it turned out that if OGR was opening itself a .gpkg file using standard file API, whereas libsqlite3 was opening it, chaos would result. This situation can happen since for example when opening a dataset, OGR has to open the underlying file to at least read its header and figure out which driver would handle it. So the sequence of operation is normally:
1) the GDALOpenInfo class opens the file
2) the OGR GeoPackage driver realizes this file is for it, and use the sqlite3_open() API to open it
3) the GDALOpenInfo class closes the file it has opened in step 1 (libsqlite3 still manages its own file handle)

When modifying the above sequence, so that 3) is executed before 2), the bug would not appear. At that point, I had some recollection that sqlite3 used POSIX advisory locks to handle concurrent accesses, and that there were some issues with that POSIX API. Digging into the sqlite3.c source code revealed a very interesting 86 line long comment about how POSIX advisory locks are broken by design. The main brokenness are they are advisory and not compulsory of course, but as this is indicated in the name, one cannot really complain about that being a hidden feature. The most interesting finding was: """If you close a file descriptor that points to a file that has locks, all locks on that file that are owned by the current process are released.""" Bingo: that was just what OGR was doing.
My above workaround (to make sure the file is closed before sqlite opens it and set its locks) was OK for a single opening of a file in a process. But what if the user wants to open a second connection on the same file (which arises easily in the QGIS context) ? The rather ugly solution I came off was that the OGR GPKG driver would warn the GDALOpenInfo not to try to open a given file while it was still opened by the driver and pass it the file header it would be supposed to find if it could open the file, so that the driver identification logic can still work. Those fixes are queued for GDAL 2.3.1, whose release candidate is planned next Friday.

Conclusions:
  • never ever open (actually close) a SQLite database with regular file API while libsqlite3 is operating on it (in the same process)
  • POSIX advisory locks are awful.

by Even Rouault (noreply@blogger.com) at June 16, 2018 01:47 PM

June 13, 2018

June 12, 2018

Quando trabalhamos com Sistemas de Informações Geográficas (SIG), alguns trabalhos são bastante repetitivos, beirando à chatice.

Extrair, cortar, realizar analise, extrair, cortar, realizar analise. Quantas vezes você vai ficar repetindo esse processo? Por que não programar para realizar todo ele de uma vez só?

Já apresentamos como realizar esse tipo de procedimento utilizando o ArcGIS, e caso você queira mais detalhes sobre o que é Python, dê uma olhada na nossa postagem sobre como usar Python e a ferramenta Buffer no ArcGIS.

Nesta postagem, utilizaremos o QGIS 2.18 e Python para extrair o limite do município de Cocal do Sul (e de outros municípios), em seguida, iremos utilizar esse limite para recortar o mapa de solos do Estado de Santa Catarina.

Nos links abaixo, você poderá baixar os shapefiles que usaremos nesta postagem.

Como acessar o Python no QGIS (PyQGIS)?

Antes de adicionarmos qualquer shapefile, vamos abrir o terminal e o editor python do QGIS para escrever e executar nossos comandos.

Vá em Plugins e clique em Python Console (1). Provavelmente somente o Terminal será aberto, mas você pode habilitar o editor clicando em “Show Editor” (2), conforme figura abaixo.

Iniciando o módulo Python no QGIS 2.18.Iniciando o módulo Python no QGIS 2.18.

Com todas essas janelas abertas, vamos começar a programar na janela que foi aberta quando clicamos em “Show Editor”.

Carregando shapefile usando PyQGIS

Agora, vamos carregar algumas bibliotecas e vamos utilizar a função addVectorLayer() para adicionar nossos dois shapefiles.

#!/usr/bin/env python
#coding: utf-8

# Carregando bibliotecas no Python
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
import processing
import sys

# Adicionando nossos arquivos shapefile
lim_mun = "C:/Users/ferna/Desktop/PyQGIS/42MUE250GC_SIR.shp"
solos_sc = "C:/Users/ferna/Desktop/PyQGIS/Solos_Santa_Catarina_250000_2004.shp"
iface.addVectorLayer(lim_mun, "Limites Municipais", "ogr")
iface.addVectorLayer(solos_sc, "Solos de SC", "ogr")

A função addVectorLayer recebe três parâmetros, são eles (1) o local onde foi salvo o shapefile; (2) nome da camada e (3) o identificador da fonte de dados, normalmente ogr.

Extraindo o limite municipal

Agora, com as camadas carregadas, iremos acessar os dados da camada “Limite Municipal” e por meio da ferramenta Extract by Attribute, iremos separar o limite do município de Cocal do Sul em um novo shapefile.

Iremos utilizar a função “processing” e dentro dela vamos especificar o algoritmo para extração de dado baseando-se em um atributo.

# Rodando algoritmo para extrair limites de Cocal do Sul
limCocal = "C:/Users/ferna/Desktop/PyQGIS/limCocal.shp"
processing.runalg('qgis:extractbyattribute', lim_mun, "NM_MUNICIP", 0, "COCAL DO SUL", limCocal)

Com o limite municipal de Cocal do Sul em mãos, já podemos rodar o nosso código seguinte para recortar os tipos de solos existentes dentro do município.

Cortando a partir de um polígono

Neste procedimento, utilizaremos a função Clip para recortar as classes de solo do município de Cocal do Sul.

Mas antes de executarmos esse código, nossos shapefiles estão em sistemas de projeção diferentes, isso pode ocasionar erros no momento do cruzamento dos mapas. Por isso, antes de rodar o código de recorte, vamos executar o qgis:reprojectlayer, para converter o shapefile do tipo de solo para SIRGAS2000.

# Convertendo os sistemas de coordenadas
Solos_SIRGAS = "C:/Users/ferna/Desktop/PyQGIS/Solos_SIRGAS.shp"
processing.runalg("qgis:reprojectlayer", solos_sc, "epsg:4674", Solos_SIRGAS)

# Recortando nossa area de estudo
solosCocal = "C:/Users/ferna/Desktop/PyQGIS/solosCocal.shp"
processing.runalg('qgis:clip', Solos_SIRGAS, limCocal, solosCocal)
iface.addVectorLayer(solosCocal, "Solos de Cocal do Sul", "ogr")

E dessa forma, conseguimos extrair os tipos de solos do município de Cocal do Sul.

Note que as funções Reproject Layer e Clip precisam dos seguintes argumentos:

  • Reproject Layer: (1) Arquivo de Entrada, (2) Sistema de Coordenadas Final, (3) Arquivo de Saída.
  • Clip: (1) Arquivo a ser cortado, (2) Limites do corte, (3) Arquivo de Saída.

Como realizar esse processo para varias cidades?

Para isso, vamos construir uma variável com os nosso municípios alvos (i.e. Ermo, Forquilhinha, Nova Veneza e Garopaba) e em seguida, criaremos um loop do tipo for para rodar todos eles, veja abaixo.

# Extraindo multiplos mapas de solo com um loop
cidades = ["ERMO", "FORQUILHINHA", "NOVA VENEZA", "GAROPABA"]
for n in cidades:
  limite = "C:/Users/ferna/Desktop/PyQGIS/lim" + n +".shp"
  processing.runalg('qgis:extractbyattribute', lim_mun, "NM_MUNICIP", 0, n, limite)
  solos = "C:/Users/ferna/Desktop/PyQGIS/solos" + n + ".shp"
  processing.runalg('qgis:clip', Solos_SIRGAS, limite, solos)
  iface.addVectorLayer(solos, "Solos de " + n , "ogr")

Note que após realizar esse processo, você poderá substituir a variável cidades pelos municípios que você deseja, desde que o nome esteja igual ao nome do município no shapefile com os limites municipais.

Obs.: Estou pesquisando como extrair os municípios que apresentam caracteres especiais em seus nomes (i.e. acentos, cedilhas), pois até agora, não consegui extrair o shape de solos deles. Até onde pesquisei, tem a ver com a codificação dos caracteres (UTF-8). Caso você tenha a resposta, deixe ela nos comentários que estaremos agradecendo e atualizando a postagem.

[Atualização em 18/06/2018]

Corrigindo o problemas de Encoding

Depois de pesquisar um pouco sobre como converter um shapefile para um Encoding diferente, conseguimos realizar o procedimento anterior para municípios com acentos.

O novo código tem uma parte para realizar essa correção, onde carregamos novamente o shapefile (função QgsVectorLayer()) e em seguida salvamos ele num novo formato (função QgsVectorFileWrite().writeAsVectorFormat())

Lembre-se também de colocar um “u” na frente dos textos que contém acentos, como fizemos na variável cidades.

Confira o código completo abaixo.

# -*- coding: utf-8 -*-

# Carregando pacotes no Python
import processing
import sys
import osgeo.ogr as ogr
import osgeo.osr as osr

# Carregando nossos arquivos shapefile
lim_mun = "C:/Users/ferna/Desktop/PyQGIS/42MUE250GC_SIR.shp"
solos_sc = "C:/Users/ferna/Desktop/PyQGIS/Solos_Santa_Catarina_250000_2004.shp"

# Convertendo os sistemas de coordenadas
Solos_SIRGAS = "C:/Users/ferna/Desktop/PyQGIS/Solos_SIRGAS.shp"
processing.runalg("qgis:reprojectlayer", solos_sc, "epsg:4674", Solos_SIRGAS)

# Corrigindo Encoding
Camada = QgsVectorLayer(lim_mun, None, 'ogr')
Camada.setProviderEncoding("utf8")
Camada.dataProvider().setEncoding("utf8")

lim_UTF8 = "C:/Users/ferna/Desktop/PyQGIS/lim_UTF8.shp"
QgsVectorFileWriter.writeAsVectorFormat(Camada, lim_UTF8, "utf_8_encode", Camada.crs(), "ESRI Shapefile")

# Extraindo vários itens com acentos
cidades = [u"CRICIÚMA", u"MORRO DA FUMAÇA"]
for n in cidades:
  limite = "C:/Users/ferna/Desktop/PyQGIS/lim" + n +".shp"
  processing.runalg('qgis:extractbyattribute', lim_UTF8, "NM_MUNICIP", 0, n, limite)
  solos = "C:/Users/ferna/Desktop/PyQGIS/solos" + n + ".shp"
  processing.runalg('qgis:clip', Solos_SIRGAS, limite, solos)
  iface.addVectorLayer(solos, "Solos de " + n , "ogr")

Caso tenha ficado com alguma dúvida, deixe ela nos comentários que estaremos respondendo assim que possível.

by Fernando BS at June 12, 2018 07:01 AM

June 11, 2018

HEV-E

Sharing data and information related to risk management is a stringent necessity. Natural events have an ever increasing impact on global population and assets, mostly in areas with reduced capabilities to deal with emergencies. Disaster management, prevention, and planning activities require access to the most up to date and detailed information available for a geographic area. Often data resides in some remote corners of the web hardly discoverable or, in the worst case, is kept segregated in local storage reducing or completely cancelling its value. Moreover data often lacks fundamental information (metadata) regarding its contents and formats.

The GFDRR group of World Bank tackled this within the second round of its "Challenge Fund" initiative. One of its goals was designing a common data model to store and share data about exposures, hazards and vulnerabilities, and a web platform to ingest, explore and download these data.

GeoSolutions was committed for its design and development. The project has been based on a lightweight User Centered Design approach,  doing interviews to stakeholders and collecting suggestions from domain experts. The results of this phase was a mockup that in a few weeks has become the base of the HEV-E Platform.

[caption id="attachment_4108" align="aligncenter" width="800"]HEV-E mockup HEV-E mockup[/caption]

Although being in its initial phase a first release of the platform was released a few weeks ago.  New and improved functionalities will be added in the future. Thanks to a great set of tools we were able to go online in a couple of months:

  • GeoNode: it provides the metadata services the and layers views management
  • Geoserver: (OGC) map services and layers styling
  • Django: a dedicated project has been implemented to expose custom APIs and extending GeoNode functionalities
  • MapStore and React: the frontend is completely based on MapStore (our flagship frontend framework) and new specific React components

The final result is a Catalog that let users explore Exposures, Hazards and Vulnerabilities functions currently available (for the moment just a small sample dataset).

[caption id="attachment_4144" align="aligncenter" width="800"]HEV-E Homepage HEV-E Homepage[/caption]  

The original dataset are split into single layers, that can be searched and filtered through the HEV-E catalog frontend. From the catalog a preview of the geographical area covered by the layer, and a preview of the layer content themselves, is shown on the contextual map. A user can add a layer to the map, to keep it around while continuing navigating through the catalog. Being in sync with the area currently shown on the map, the catalog helps the user obtaining only the relevant layers for the context currently explored.

For each layer a Detail view provides insights on the specific layer's contents, according to the layer type and contents. As an example, for exposures a chart with the number of occurrences by construction material or type of occupancy is shown.

[caption id="attachment_4116" align="aligncenter" width="800"]HEVE catalog search HEV-E catalog search[/caption]

During the exploration the user is able to add each layer to a Download area, a functionality is similar to common e-store "shopping carts". From this area layers can be selected to submit a download orders, that will be managed by the HEV-E platform asynchronously. A notification or an email will be sent to the user to communicate when the requested files are ready for download. A URL to the Shapefiles, CSV or GeoPackage (the format depends on layer type and user preferences) will be provided for direct download.

[caption id="attachment_4120" align="aligncenter" width="800"]HEVE Download Area HEV-E Download Area[/caption]

The project has proved again the benefits of adopting mainstream software integration to compose advanced custom applications. GeoNode's standard functionalities cannot cover all the specific needs and often a tailored user interface with custom tools and functionalities are required, but it can be adopted as a "backend service" with a bespoke frontend and, in this case, a dedicated backend API.

We wish long life to HEV-E and we hope to continue our contribute to it and its social goals!

Last but not least, we would want to thank the GFDRR group at the World Bank which provided the funding for this work.

If you are interested in learning about how we can help you achieving your goals with open source products like GeoServerMapStoreGeoNode and GeoNetwork through our Enterprise Support Services and GeoServer Deployment Warranty offerings, feel free to contact us!

The GeoSolutions Team,

320x100_eng

by Giovanni Allegri at June 11, 2018 10:12 AM

June 06, 2018

If you’re are following me on Twitter, you’ve certainly already read that I’m working on PyQGIS 101 a tutorial to help GIS users to get started with Python programming for QGIS.

I’ve often been asked to recommend Python tutorials for beginners and I’ve been surprised how difficult it can be to find an engaging tutorial for Python 3 that does not assume that the reader already knows all kinds of programming concepts.

It’s been a while since I started programming, but I do teach QGIS and Python programming for QGIS to university students and therefore have some ideas of which concepts are challenging. Nonetheless, it’s well possible that I overlook something that is not self explanatory. If you’re using PyQGIS 101 and find that some points could use further explanations, please leave a comment on the corresponding page.

PyQGIS 101 is a work in progress. I’d appreciate any feedback, particularly from beginners!

by underdark at June 06, 2018 07:50 PM

Este año dentro de los cursos de verano que ofrece la Universidad de Castilla-La Mancha podréis encontrar uno dirigido a todos aquellos que quieran iniciarse o profundizar en el conocimiento y aplicación de los Sistemas de Información Geográfica. Un curso en el participaremos directamente el equipo de la Asociación gvSIG junto a profesores de los Departamentos de Producción Vegetal y Tecnología Agraria, y de Ciencia y Tecnología Agroforestal y Genética.

El curso se realizará el 27 y 28 de septiembre.

La matrícula se puede realizar hasta el 16 de septiembre.

Más detalles:

https://cursosdeverano.uclm.es/catalogo/31-uso-sistemas-de-informacion-geografica-libre-y-gratuito-suite-gvsic-scripting-y-geoestadistica/

Inscripción:

https://cursosdeverano.uclm.es/matricula/

by Alvaro at June 06, 2018 09:02 AM

I created a couple of OSM visualisations for my talk at the OSGeo Ireland conference.

See: History of OpenStreetMap in Ireland

These are pretty easy to make, but take a fair bit of time. I did mine for Ireland, but should work with any part of the world.

Required software:

  • PostgreSQL with PostGIS
  • Python
  • QGIS
  • osmium-tools

This is the trickiest part, installing osmium-tools: here.

Data:

An OSM full history export. The best source for these is GEOFABRIK.

For Ireland:

http://download.geofabrik.de/europe/ireland-and-northern-ireland.html

Due to GDPR, you will have to log in with an OSM id to download the full history extracts. User ID’s are personal data.

Process:

The workflow is pretty simple. Osmium-tools provides pretty easy API access to the history files, where you can provide a data, and it will extract what OSM was like at that date. We simply need to loop through the desired dates we want to extract, and pipe the results into a workflow that loads the data into PostgreSQL. The final step is simply rendering in QGIS using the time manager plugin.

Python Script:

Github GIST:

https://gist.github.com/HeikkiVesanto/f01ea54cca499a6a144d18cf8909c940

The tables in the database will be:

  • lines
  • multilinestrings
  • multipolygons
  • other_relations
  • points

Each feature will be tagged with the date it is associated with.

Visualisation:

To visualise the data in QGIS we use simply use the excellent time manager plugin, filtering on the load_date field and with a monthly interval.

Result:

by Heikki Vesanto at June 06, 2018 09:00 AM

FOSS4G 2018

Dear Reader, GeoSolutions is pleased to announce its presence at FOSS4G 2018 in Dar Es Salam, Tanzania, from 27th to 31th August. The annual FOSS4G conference is the largest global event for Open Source geospatial solutions, and this year will be held in Africa after almost 10 years. FOSS4G brings together developers, users, decision-makers and businessmen from a broad spectrum of organizations and fields of operation.

GeoSolutions is proud supporter for the event as a Gold sponsor and we have also submitted a number of workshops and presentations and workshops on GeoServerGeoNode as well as MapStore, find the details here below.

Workshop

 - Introduction to GeoNode, with Alessio Fabiani. Monday the 27h from 8:30 am to 1:00 pm.

 - GeoNode developers workshop, with Alessio Fabiani. Monday the 27h from 2 pm to 5:30 pm.

 - OGC services with GeoServer: from journeyman to master, with Andrea Aime. Monday the 27th from 8:30 am to 1:00 pm.

Presentations

 - One GeoNode, many GeoNode, with Alessi Fabiani

 - Serving earth observation data with GeoServer: addressing real world requirements, with Andrea Aime and Simone Giannecchini

 - Creating Stunning Maps in GeoServer, with SLD, CSS, YSLD and MBStyles, with Andrea Aime and Mauro Bartolomeoli

 - Crunching Data In GeoServer: Mastering Rendering Transformations, WPS And SQL Views, with Mauro Bartolomeoli and Andrea Aime

 - GeoServer in Production: we do it, here is how! with Simone Giannecchini and Mauro Bartolomeoli

 - MapStore, modern mashups with OpenLayers, Leaflet and React, with Mauro Bartolomeoli

 - Mapping the world beyond web mercator with GeoServer, with Andrea Aime

 - State of GeoServer 2018, with Jody Garnett, Andrea Aime and Ian Turton

 - State of JAI Advanced Image Processing, with Jody Garnett, Andrea Aime and Eugene Cheipesh

 - GeoServer Ecosystem, with Jody Garnett, Andrea Aime and Ian Turton

 - Helping open source projects thrive: a guide for users and occasional contributors, with Andrea Aime and Jeff McKenna

If you want further information, do not hesitate to contact us.

Looking forward to seeing you in Dar Es Salam!

The GeoSolutions Team,

320x100_eng

by simone giannecchini at June 06, 2018 08:08 AM

June 05, 2018

A new geoprocess is now available in gvSIG, that allows to convert a 3D or 3DM layer into a 2D layer. This geoprocess will delete the Z and/or M coordinates, leaving only the X and Y coordinates. It can be applied on any type of geometry.

Thanks to this new plugin you can use certain geoprocesses that only worked on 2D layers. If an error appeared when performing any of the geoprocesses available at the Toolbox in gvSIG, it could be caused because some of the input layers was a 3D layer. By converting these layers into 2D layers previously, the geoprocesses can be performed without problem.

To install this plugin you must access the Add-ons Manager (Tools menu), and connect by URL to the server that appears by default. In the next window, search by the term “2D” the “Transform Geometries to 2D” plugin will appear. Selecting and installing it, you must restart gvSIG to have it available in the application.

Once installed, we will have it available by accessing the Toolbox, and accessing to the Scripting-> Transform section. We only need to select the input layer, and the name and path of the output layer.

by Mario at June 05, 2018 04:52 PM

Se ha publicado un nuevo geoproceso en gvSIG que permite convertir una capa 3D o 3DM a una capa 2D. Este geoproceso eliminará las coordenadas Z y/o M, dejando únicamente las coordenadas X e Y, y se puede ejecutar sobre cualquier tipo de geometría.

Gracias a este nuevo plugin se podrán utilizar ciertos geoprocesos que únicamente funcionaban sobre capas 2D. Si al realizar alguno de los geoprocesos de la Caja de herramientas disponibles en gvSIG se obtenía error, una de las posibles causas era que alguna de las capas de entrada era una capa 3D. Convirtiendo dichas capas a 2D previamente ya se podrán realizar dichos geoprocesos sin problema.

Para instalar este plugin se debe acceder al Administrador de complementos (menú Herramientas), y conectar por URL al servidor que aparece por defecto. En la siguiente ventana, realizando una búsqueda por el término “2D” aparecerá el plugin “Transform Geometries to 2D”. Seleccionándolo e instalándolo, se deberá reiniciar gvSIG para tenerlo disponible ya en la aplicación.

Una vez instalado lo tendremos disponible accediendo a la Caja de herramientas, y entrando en el apartado Scripting->Transformación. Solo deberemos seleccionar la capa de entrada, y el nombre y la ruta de la capa resultante.

by Mario at June 05, 2018 04:52 PM

This week I&rsquo;m in Bolsena at the 10th annual Geonetwork codesprint. Geonetwork is the metadata catalogue that we (being Astun Technology) use to deliver our metadata catalogues, for INSPIRE, and for Government customers. I recently asked if I could join the Project Steering Group for Geonetwork, and happily was accepted, and I was then asked if I would like to come along to this event. Coding in the sun, in Italy, in June, what a trial!

June 05, 2018 10:17 AM

Ao fazer uma mapa, seja para um cliente ou um trabalho acadêmico, muitas vezes, as legendas não são suficientes para identificar o que está sendo representado no mapa.

Por isso, para resolver tal problema, utilizamos os rótulos (Labels).

Os rótulos são adicionadas no mapa para mostrar as informações sobre um objeto (pontos, nascentes, linhas, rios, áreas de estudo), ou seja, qualquer camada vetorial pode ter rótulos associados e esses rótulos tem seu conteúdo baseado nos atributos da mesma camada.

Para este tutorial, iremos rotular um shapefile de linhas disponibilizado no site do Departamento Estadual de Infraestruturas (DEINFRA). O shapefile que iremos utilizar é o de Rodovias, conforme figura abaixo.

Shapefile de Rodovias.

Agora com o shapefile baixado, iremos criar os rótulos no QGIS. É importante frisar que para inserir o arquivo shapefile no QGIS, o ideal é extrair sua base de dados do arquivo zipado.

Agora com o arquivo extraído do zip, abra o QGIS. Neste tutorial irei utilizar o QGIS 2.18.15.

Com o QGIS aberto, insira o arquivo Shapefile.

O shapefile é um arquivo vetorial normalmente composto por pontos, linhas ou polígonos.

Ao inserir seu arquivo no QGIS, seus dados ficarão conforme figura abaixo.

Shapefile inserido no QGIS.

Agora com o arquivo inserido, iremos criar os rótulos. Para inserir o rótulo, basta clicar com o botão direito do mouse sobre o nome do arquivo “Rodovias_SC”.

Clique em “Rodovias_SC”.

Note que ao clicar com o botão direito sobre o shapefile, irá aparecer algumas opções como: Tabela de Atributos; Filtrar; Renomear; Propriedades dentre outros. No nosso caso, iremos escolher a opção “Propriedades”.

Clique em propriedades.

Ao selecionar a opção “Propriedades”, será aberto uma janela contendo uma série de informações gerais do Shapefile, tais como sistemas de coordenadas, como classificar as cores, rótulos, etc.

Informações gerais do Shapefile.

No nosso caso, iremos clicar sobre a opções “Rótulos”.

Opção ”Rótulo”.

É nessa “aba” que será habilitada a opção rotular e para fazer isso precisamos escolher o tipo de rótulo que queremos, baseado em um item da tabela de atributos.

A tabela de atributos representa os dados associados a cada uma das feições (ponto, linha ou polígono) existentes no Shapefile.

Ao abrir as opções de rótulo, você irá encontrar as opções: Não Rotular; Mostrar Rótulo para as camadas; Rótulo Baseado em Regra e Bloqueado, conforme mostra a figura abaixo.

Opções de Rótulos.

Para criar o rótulo baseado nos itens da tabela de atributos, iremos selecionar a opção “Mostrar rótulos para as camadas”. Ao escolher a opção esta opção, note que todos os demais itens abaixo foram habilitados.

Item “Mostrar rótulos para as camadas”.

Agora iremos selecionar qual item da tabela de atributos utilizaremos para rotular. Para selecionar tal item, basta clicar na opção “Rotular com”, conforme mostra a figura abaixo.

Opção “Rotular com”.

Note que clicar na opção “Rotular com”, irá aparecer o nome das colunas da tabela de atributos. Para este tutorial, iremos escolher a opção “SGRODPUB”, que refere-se ao nome das rodovias.

Escolha a primeira opção.

Os itens recém habilitados referem-se a formatação do rótulo e como sua aparência irá ficar no mapa. Tais itens são:

  • Texto: Serve para determinar a fonte, tamanho e os estilos.
  • Formatar: Define as informações referentes às linhas (altura e alinhamento).
  • Buffer: Determina o contorno da letra, tamanho e cor.
  • Fundo: Serve para determinar o fundo do rótulo, formato, tamanho, espessura e dentre outros.
  • Sombra: É utilizado para configurar a sombra, tamanho, sentido, cor, escala e transparência.
  • Posição: Serve para determinar a posição, alinhamento a qual o rótulo se encontra em relação a referência;
  • Renderizar: Determina como o rótulo irá aparecer no mapa.

Ao final, clique em “Aplicar” e em seguida em “Ok” que seu aquivo ficará conforme mostra a figura abaixo.

Arquivo com os rótulos criados.

No entanto, ainda não terminamos nosso tutorial, pois note que os “nomes” dos rótulos estão grandes e orientado pelas linhas das estradas, vamos modificar isso.

Para modificá-los, precisamos voltar ao item “propriedades” “Rótulos” e formatar nosso rótulo.

Na opção “Texto”, iremos mudar a fonte para “Arial” e o tamanho da letra para “6”.

Formate a fonte e o tamanho da letra.

E na opção “Posição”, escolha o item “Horizontal”. Esse item fará com que o nome dos rótulos fiquem no formato horizontal, conforme mostra a figura abaixo.

Escolha a opção “Horizontal”.

Ao final, clique em “Aplicar” e em seguida em “OK” e seu arquivo ficará conforme figura abaixo.

Arquivo Formatado.

No entanto, queremos deixar no arquivo as rodovias que apresentam no nome a palavra “SC” e para isso iremos utilizar “expressões”.

Expressões são fórmulas e funções que permitem realizar tarefas mais complexas.

Para gerar as expressões, é preciso voltar ao item “Propriedades” >“Rótulos”, conforme mostra a figura, e clicar no pequeno e no lado direito da janela.

Opção Expressões.

Ao clicar na opção “Expressões” será aberto uma “Caixa de Diálogo Expressão”.

Caixa de Expressões.

É nessa “caixa” que serão geradas todas as expressões e fórmulas para seus rótulos. Para nosso exemplo iremos utilizar as funções:

  • If: Refere-se a função SE . Essa função serve para comparar valores e avaliar os resultados a partir de uma condição pré-definida (ex: SE algo é Verdadeiro o resultado é SIM, SE Falso, NÃO); e
  • Left: Serve para determinar os caracteres localizados à esquerda do campo indicado e em seguida adicionar o resultado gerado no novo campo.

Agora, iremos utilizar a função left para fazer com que a função if avalie se as duas primeiras letras na coluna SGRODPUB são iguais à SC e para avaliar isso, iremos digitar a seguinte expressão:

if( left( SGRODPUB,2) = ‘SC’, SGRODPUB, ”)

Na função left(), indicamos qual campo queremos avaliar e quantos caracteres serão avaliados a partir da esquerda (neste caso, 2 caracteres). A função verifica se esses dois caracteres são iguais a SC e se a comparação for verdadeira, irá retornar o nome da rodovia, caso contrário, irá retornar um carácter vazio.

E ao final, clique em “Aplicar” e em seguida “Ok” e seu mapa ficará conforme mostra a figura abaixo.

Arquivo contendo apenas as SCs.

E chegamos ao final do nosso tutorial, não deixe de comentar logo abaixo da postagem suas dúvidas ou comentários.

by Émilin CS at June 05, 2018 08:52 AM

June 04, 2018

I am a strong believer in the fact that geography plays a part in everything we do. From requesting an Uber or tracking a package to routing the closest ambulance or analyzing neighborhood crime patterns, location is a critical part …

The post Fast-track Your GIS in the Cloud with Boundless Server Enterprise as a Managed Service appeared first on Boundless Geo.

by Anthony Calamito at June 04, 2018 07:40 PM

The 14th International gvSIG Conference will be held from October 24th to 26th under the slogan “Economy and Productivity“ at School of Engineering in Geodesy, Cartography and Surveying (Universitat Politècnica de València, Spain).

The period to send communication proposals is now open, and they can be sent to the email address: conference-contact@gvsig.com. There are two types of communication: paper or poster. Information regarding to regulations on communication presentations and deadline can be found in the Communications section of the website.

Organizations interested in collaborating in the event can find information in the section: How to collaborate, with different levels of sponsoring.

During the next weeks we will be publishing all the information related to the workshops that will be given at the gvSIG Conference.

We expect your participation!

by Mario at June 04, 2018 04:13 PM

Del 24 al 26 de octubre de 2018 se celebrarán las 14as Jornadas Internacionales gvSIG en la Escuela Técnica Superior de Ingeniería Geodésica, Cartográfica y Topográfica (Universitat Politècnica de València, España), bajo el lema “Economía y Productividad”.

Ya está abierto el periodo de envío de propuestas de comunicación, que pueden remitirse a la dirección de correo electrónico conference-contact@gvsig.com. Para ello existen dos modalidades de comunicación: ponencia y póster. Toda la información sobre las normas para la presentación de comunicaciones, así como las fechas límite para el envío de las propuestas, puede consultarse en el apartado ‘Comunicaciones‘ de la web.

Las organizaciones interesadas en colaborar en el evento pueden encontrar información en el apartado ‘¿Cómo colaborar?‘ de la web de las jornadas, con distintos niveles de patrocinio disponibles.

En las próximas semanas iremos dando más información sobre los talleres que tendrán lugar en las mismas.

¡Esperamos vuestra participación!

by Mario at June 04, 2018 04:05 PM

June 03, 2018

This year’s QGIS User Conference will be embedded within the FOSS4G conference. That means that you should refer to the FOSS4G web site for all registration and event details with the exception of the QGIS Hackfest (22-26 August) which follows our normal organisation procedure on the QGIS Wiki.

There are five main activities for QGIS Users to enjoy at the conference:

  1. The QGIS Hackfest: This is our twice-yearly meet up to work on and improve the QGIS code base. Come along to this event if you want contribute documentation, bug fixes, bug reports, features and other ideas for improvements to the QGIS project. The hackfest is a side event to be held on the island of Zanzibar and will happen before the main conference. Again refer to the QGIS Hackfest wiki page for details and to register.
  2. The Workshops: FOSS4G is always popular for the wide range of workshops presented. The workshop presentations are very often by the developers of the software being explained, which gives you a unique opportunity to talk face to face with the people using the software you are using. There will be a number of QGIS specific workshops at FOSS4G – you will be able to identify them easily on the mobile app that provides the conference programme by filtering on ‘QGIS’ in the workshops section. For a current list of all the workshops at the event please refer to: https://2018.foss4g.org/workshop-schedule/ 
  3. The Presentations: There will be a wide range of QGIS related presentations during the main conference. 17 QGIS related presentations have been registered. See https://2018.foss4g.org/programme/list-of-presentations/ for a full list of the conference presentations.
  4. The Academic Track: This year a large number of academic papers have been submitted, a good number of which relate to QGIS. Watch the conference web site for more details to be published soon!
  5. The QGIS Plenary / Panel Discussion: During the conference we will have an ‘Ask Me Anything’ session with QGIS developers and community members forming a panel to field any questions you might want to ask! This is a unique opportunity to find out more about the project, its roadmap or just come along to say ‘thank you’ to the dedicated team of community members who put so much work into making QGIS!

If you have not already registered for FOSS4G2018, do so now to enjoy early bird rates! Visit the Registration Page for more details! We are looking forward to meeting you in Dar es Salaam and Zanzibar!

About the FOSS4G2018 Conference

The annual Free and Open Source Software 4 Geospatial. (FOSS4G) conference is the largest community gathering focused on open source geospatial software. FOSS4G brings together developers, users, decision-makers and observers from a broad spectrum of organizations and fields of operation. Through six days of workshops, presentations, discussions, and code sprints, FOSS4G participants, learn, exchange, and create new collaborations, geospatial products, standards.

FOSS4G is a global conference, with attendees from around the world! Last year, Boston, USA was the host city, before that in 2016 it Bonn, Germany. Now is the time for Dar es Salaam, Tanzania! FOSS4G 2018 will host numerous workshops over 27 – 28 August with exciting keynotes and presentations at the Julius Nyerere International Convention Centre 29 – 31 August, and finally Code Sprints and community building events September 1 & 2. In addition to bringing together the FOSS4G community in Dar, the 21st QGIS Developer meeting will take place in Zanzibar (a short 60min ferry trip away!) the 22 – 26 of August – the Geospatial Savanna is on the rise in East Africa!

The vision for the conference is to make it as accessible and inclusive as possible, bridging the gaps between the various communities that make us so strong, to make us stronger. This will be achieved through a Travel Grant Program that will enable economically disadvantaged participants the opportunity to attend, covering travel, lodging and conference costs. This will be bolstered by an exciting conference program, taking the very best that the open source geospatial community can offer. This ranges from locating schools to the instrumentation of communities with cheap, open source, 3D printed weather stations that improve community resilience to climate change.

The theme for FOSS4G 2018 is “Leave No-One Behind”. We live in a world where our users and developers have the opportunity to make a difference to the lives of everyone, whether it’s those in extreme poverty looking for access to clean water, to those using routing algorithms to calculate the fastest route to work. Location and geography are at the heart of these challenges and a FOSS4G 2018 in Dar es Salaam will invigorate our existing projects, bringing them to new users and developers while supporting and nurturing the existing community.

by Tim Sutton at June 03, 2018 07:18 PM

May 31, 2018

Thumb

Since the launch, MapTiler Cloud featured seven beautiful base maps for various occasions like background map for presenting own data, car navigation or outdoor activities. But for those who want a specific design to match the company’s brand, we prepared a simple, but powerful tool to design own map style, which is available to all users now.

Entirely different map design in a few mouse clicks

Creating brand new map design is a simple task with Customize tool: you pick about six colors and all map elements will change accordingly.

The customize tool is available if you create a free account, sign in and click on any map. The Customize a copy button will bring you directly to the tool, where you can see group of layers and color which currently presents this group. By clicking on the color palette, you will get a color selection dialog, where you can define a new color for a selected group. The color selection tool capabilities are operating system dependent and range from a simple window with color selection and its representation in hex format to the complex tools with color-picking options. You can also turn off the layer completely.

Experimenting is a safe activity, the basic styles stay untouched and available in the administration. Each change can be easily reverted with a reset button.

Languages, fonts and 3D buildings

From the Customize tool menu, you can access the Language and Mics tab. There are currently more than 50 languages supported with an option to include alternative names for non-latin alphabets. The language selection is also possible for raster tiles. Mics tab offers font selection and a button for switching off 3D buildings.

All changes based on our basic maps done using Customize tool will stay compatible with future versions of software used on our hosting and data, which are updated weekly. 

Built from scratch

Advanced users have also other options how to change the map appearance. Hidden under three dots behind the map in the administration, there is an option to Edit style and Import style, as well as an option to Export style.

Edit style offers robust map design editor, which gives an option to work on every small map detail. Apart from changing colors, you can also add or remove map elements like buildings, selected landcover or specific POIs.

MapTiler Cloud also offers importing styles done in an external tool or text editor. Currently, there is a built-in support for GL JSON styling language. 

All customization methods are available in MapTiler Cloud, which you can start using with a free account.

With Edit tool, you can either customize a map visually or by writing source code With Edit tool, you can either customize a map visually or by writing source code

by Petr Sloup (info@klokantech.com) at May 31, 2018 10:00 AM

В статье рассмотрены решения некоторых отдельных, наиболее популярных задач, связанных с моделированием пеших перемещений (людей или животных) по пересечённой местности. Потребность в такого рода моделировании часто возникает при необходимости проложить маршрут в пешем походе, определить области перемещений пределах заданных временных интервалов, а также в задачах археологии, зоологии и других дисциплин.

Рассмотрено решения для трёх базовых проблем:

– Построение изохрон перемещений по пересеченной местности относительно одной или множества исходных точек
– Построение оптимального (с точки зрения временных затрат) маршрута по пересеченной местности между двумя точками
– Построение коридора оптимальных временных затрат между двумя точками

Для подготовки данных и моделирования используется открытый пакет QGIS 3.0.2 с модулями GRASS и SAGA, вызов которых доступен из панели анализа.

Прочитать | Обсудить

by Эдуард Казаков at May 31, 2018 08:03 AM

May 30, 2018

Last week I was invited to give a workshop at the Second Irish OSGeo Conference in Portlaoise. The event was a great success with a attendees from across the OSGeo space, from academics to startups.

I also volunteered to give a talk on OpenStreetMap (OSM) in Ireland. Since we are currently in the process of setting up an official chapter of OSM in Ireland. Check out OpenStreetmaMap.ie if you want to help.

Check out my full talk: here

But some of the visuals are more interesting than the talk as a whole.

To start out, the first edits in Ireland.

The first line:

Located in Banbridge, in Northern Ireland between Newry and Belfast:

First polygon:

Clearly St. Stephens Green, a great park in Dublin:

Then a look at the full history of roads in Ireland on OpenStreetMap:

A large part of the history of OpenStreetMap in Ireland is the townlands project. Townlands in Ireland are small divisions of land, often used in addressing for example. Your address could be: Mr. O’Brien, Blue house, Tawny (the townland), Donegal. The postman knows where you are.

There are over 61,000 townlands in Ireland. Traced manually from 650+ out of copyright OSi maps from Trinity College. Check out Townlands.ie for more info.

The project ran from 2012 to 2017 and the progress is clear when charting the history of boundaries in OpenStreetMap in Ireland:

And since the conference was held in Portlaoise, here is how it looks over time in OSM:

For the script to generate these histories see: Creating OpenStreetMap History Visualisations

by Heikki Vesanto at May 30, 2018 11:00 AM

PyWPS finished the OSGeo incubation process

On April 11th 2018, OSGeo Board of Directors recognized [1] PyWPS project as an official OSGeo project, thanks to the efforts of the PyWPS Project Steering committee and Tom Kralidis, our incubation mentor. The incubation process started 9 years ago [2] and was one of the longest processes within the OSGeo ecosystem. Over this time, PyWPS demonstrated [3] a stable community, evolving into version 4 with completely new code base and license change, took part on several Google Summer of Code events, formed a Project Steering Committee [4] and many more.

About PyWPS

PyWPS (http://pywps.org) is an implementation of the Web Processing Service standard from the Open Geospatial Consortium. PyWPS is written in Python. It enables integration, publishing and execution of Python processes via the OGC WPS standard.

PyWPS is Open Source and released under an MIT license.

About OSGeo

The Open Source Geospatial Foundation (OSGeo http://osgeo.org) is a not-for-profit organization whose mission is to foster global adoption of open geospatial technology by being an inclusive software foundation devoted to an open philosophy and participatory community driven development.

[1] https://www.loomio.org/d/vcAgpzQl/recognize-pywps-as-a-new-osgeo-project-with-jachym-as-vp-of-pywps-within-our-organization-and-an-initial-committee-budget-of-2000-usd-for-2018

[2] https://trac.osgeo.org/osgeo/ticket/337

[3] https://github.com/geopython/pywps/wiki/ProjectGraduationChecklist

[4] http://pywps.org/development/psc.html

May 30, 2018 12:00 AM

May 28, 2018

FOSS4G EU 2018

Dear Reader,

GeoSolutions is proud to announce that we will take part in this year FOSS4G Europe in Guimaraes, Portugal, from 16th to 21nd of July as Silver Sponsor.

The full program of our workshops is provided here below. We also have a vast number of presentations accepted which cover MapStoreGeoServer and GeoNode but the program is not final yet, hence we will amend this post when available.

Workshops

  - GeoNode, the Open Source geospatial CMS, with Alessio Fabiani. 16th of July from 9:30 to 13:00.

  - OGC services with GeoServer: from journeyman to master, with Andrea Aime and Nuno Oliveira. 20th of July from 9:30 to 13:00.   - Introduction to MapStore, mashups made simple, with Mauro Bartolomeoli.  20th of July from 14:00 to 18:00.

Workshop details are available here and workshop selection can be made here. Make sure you select your favorite workshop in advance since only those with a minimum confirmed attendance will take place!

Presentations

 - State of GeoServer 2018, Andrea Aime, Jody Garnett and Ian Turton. 17th of July from 10:25 to 10:50.  - Mapping the world beyond web mercator with GeoServer, Andrea Aime, Nuno Oliveira and Simone Giannecchini. 17th of July from 11:10 to 11:35.  - Serving earth observation data with GeoServer: addressing real world requirements , Simone Giannecchini and Andrea Aime. 17th of July from 16:25 to 16:50.  - MapStore 2, modern mashups made simple, Mauro Bartolomeoli and Simone Giannecchini. 18th of July from 10:35 to 11:50.

 - One GeoNode, many GeoNodes, Alessio Fabiani, Simone Giannecchini and Giovanni Allegri. 18th of July from 14:25 to 14:50

- Crunching Data In GeoServer: Mastering Rendering Transformations, WPS And SQL Views, Nuno Oliveira, Andrea Aime and Simone Giannecchini. 19th of July from 09:45 to 10:10

- Creating Stunning Maps in GeoServer, with SLD, CSS, YSLD and MBStyles, Andrea Aime, Nuno Oliveira and Simone Giannecchini. 19th of July from 16:25 to 16:50

The full (although provisional) conference program is available here.

If you want further information, do not hesitate to contact us.

Looking forward to seeing you in Guimaraes!

The GeoSolutions Team,

320x100_eng

by simone giannecchini at May 28, 2018 09:14 AM

The PostGIS development team is pleased to release PostGIS 2.5.0alpha.

This release is a work in progress, and some features are still slated to be added. Although this release will work for PostgreSQL 9.4 and above, to take full advantage of what PostGIS 2.5 will offer, you should be running PostgreSQL 11beta+.

Best served with PostgreSQL 11beta which was recently released.

View all closed tickets for 2.5.0.

After installing the binaries or after running pg_upgrade, make sure to do:

ALTER EXTENSION postgis UPDATE;

— if you use the other extensions packaged with postgis — make sure to upgrade those as well

ALTER EXTENSION postgis_sfcgal UPDATE;
ALTER EXTENSION postgis_topology UPDATE;
ALTER EXTENSION postgis_tiger_geocoder UPDATE;

If you use legacy.sql or legacy_minimal.sql, make sure to rerun the version packaged with these releases.

2.5.0alpha

by Regina Obe at May 28, 2018 12:00 AM

May 25, 2018

The gvSIG Association will participate at FOSS4G-EU in Guimaraes (Portugal), from July 16th to 20th 2018, giving several workshops and presentations.

Registrations are now available at the event website and if you want to register into any of the workshops given by the gvSIG Association you can do it from the workshops section.

There will be presentations about different themes:

  • gvSIG Crime: Open source GIS for criminology
  • LIBRA, a regional platform for managing requests for the European Common Agricultural Policy (CAP)
  • gvSIG Suite: a complete catalog of open source software solutions
  • Analysis of an antenna coverage for an emergency communication system
  • 4D in gvSIG: New capabilities to explore time data
  • gvSIG Desktop: written in Java, extendable through Scripting
  • Geopaparazzi state of the art of the digital field mapping application
  • Modelling natural hazards in gvSIG with the HortonMachine plugins
  • gvSIG 2.4 new features

The workshops that will be given are:

GIS applied to municipality management (Monday, July 16th, from 9:00 to 13:00):

Participants will learn about how to use the main functionalities of gvSIG to manage the information of a municipality, for example editing, geoprocessing, or how to connect to the information offered by many of the public administrations through web servers, among other things. We will also show the main functionalities of gvSIG Mobile, and how to connect to gvSIG Online, an integral platform for Spatial Data Infrastructures implementation.

Developing new tools with gvSIG Scripting (Monday, July 16th, from 14:00 to 18:00):

In this workshop, we will introduce the participants into the basics to develop new plugins for gvSIG Desktop. We will explain all the parts involved, from coding to publishing. We will mainly use the Scripting Composer tool that it’s installed with any installation of gvSIG.

As a example project for the workshop, a new script will be developed. Starting from zero, the general API of gvSIG will be explained and the basics to develop over it with Jython. This project will be created in a way that later could be added to the icons or geoprocess toolbox in gvSIG. It will contain two parts, the code part with the process and the interface part developed with Abeille.

Modelling natural hazards in gvSIG with the HortonMachine plugins (Friday, July 20th, from 9:00 to 13:00):

The workshop will cover the main aspects of the hydro-geomorphological analysis of a river basin starting from a DTM. The aim is to evaluate the maximum discharge that can occur in a section for given precipitation or using statistical information derived from the Intensity Duration Curves. Some generic geomorphological analysis on the DTM will be performed that will be used to delineate the stream network and the watershed closed at the desired section.

The last step will be the evaluation of the hillslope stability and of the maximum discharges using the shallow stability model Shalstab and the semi distributed model Peakflow integrated in the HortonMachine library.

Geopaparazzi and gvSIG: never out of data in the field (Friday, July 20th, from 14:00 to 18:00):

The workshop is dedicated to professionals, researchers and students that needs to collect data from the field and use this information to update or create GIS data, but also to OpenStreetMappers as well as tourists that want to keep a geo-diary.

The workshop starts with an introduction of the application, installation and main features. Then a short section will be dedicated to the preparation of the input data: background maps and vector layers. Following these sections there is a practical testing of Geopaparazzi outdoor in the field. The last section, back in the room, is dedicated to the export of the collected data to be visualized or used in a GIS format using gvSIG.

You can find more information about the workshops at the event website.

See you in Portugal!!

by Mario at May 25, 2018 09:29 AM


Today it is with great joy that I just copy/paste an email that arrived in the geopaparazzi mailinglist. I already announced it, but this is the proper announcement by the guys from GeoAnalytic Inc. So I just leave this to you all, as written by Brent Fraser:


Hi All,Geopaparazzi 5.6.0 is now available at Google's Play Store (and GitHub as an APK).  One of my favorite new features is Cloud Profiles. Its purpose is to ease the data management tasks by automatically downloading project files, Spatialite databases and other files when connected to a 
"compatible" web server.    

 
And there's more!  When you activate a Profile, Geopaparazzi will set the basemap and attach the Spatialite databases ready for viewing in the Map View.    

So what about the "compatible" web server?  Since the Cloud Profiles list is a JSON text file, you could hand coded it and use a plain old web server like Apache or IIS.  Or do some server-side scripting if you want to get fancy. We've got an Open Source project started to be a "reference server" for this.  hopefully it will grow to provide more Geopaparazzi services, but right now it just servers up Cloud Profiles. Have a look at the blog post of more details:

 
https://geoanalytic.github.io/a-reference-server-for-geopaparazzi-cloud-profiles/    

There is a public version set up so you can experiment with Cloud Profiles (it delivers two demo data-sets: Vienna and Bolzano).  To try it out:   

  1. Open up Geopaparazzi 5.6.0 on your device  
  2. Go into Settings (using the gear icon on the action bar)  
  3. Go into Cloud server settings  
  4. Edit the "Cloud Profiles URL" to be https://geo.trailstewards.com/myprofiles/  (don't forget to have the trailing slash in the above URL). You don't need any values for the Username, Password, or Cloud Project server.  
  5. Go back to the main dashboard screen and press the big Import icon (the one on the bottom left)  
  6. Press the Cloud Profiles at the bottom of the Import options.  
  7. Press the icon beside the Profile you would like to download.  Some of the files are large-ish so it is best to be connected via WiFi.    
  8. After the Profile has downloaded, it's time to "activate" it:  
    • On the main dashboard screen, press the menu icon on the far left of the action bar and select "Profiles"  
    • You should see the Profile you downloaded listed there.  
    • Press the Profile's gear icon to change the properties  
    • Slide the Activate profile switch to the right to activate it  
    • Go back to the main dashboard screen and press the Map View icon.    
You should see a basemap with and overlay as defined by your selected profile!  

Best regards,  
Brent Fraser  
GeoAnalytic Inc.



This is a great contribution to the geopaparazzi community and makes me feel that the geopaparazzi project is on the right track to be a good free and open source project.

Enjoy!






 

by andrea antonello (noreply@blogger.com) at May 25, 2018 08:07 AM