OSGeo Planet

Fernando Quadro: WFS-T com OpenLayers

OSGeo Planet - Tue, 2018-09-18 18:03

Este post foi publicado originalmente para o OL 3.5 por Dennis Bauszus. Não há uma boa razão para não usar a versão mais recente do OpenLayers, mas caso você utilize uma versão mais atual do OL, veja se não precisará realizar alguns ajustes.

Neste teste foi utilizado o GeoServer 2.8, e o armazenamento de dados é realizado em um banco de dados PostGIS 2.1.

Para o serviço de teste, é utilizada uma tabela muito simples, apenas com uma ID e geometria. A geometria é definida como geometry, sem tipo nem projeção. É importante que o campo de geometria seja chamado de geometria. Caso contrário, as inserções podem criar registros com campos de geometria vazios. Uma restrição deve ser definida no ID ou o GeoServer não poderá inserir registros na tabela.

CREATE TABLE wfs_geom ( id bigint NOT NULL, geometry geometry, CONSTRAINT wfs_geom_pkey PRIMARY KEY (id) ) WITH ( OIDS=FALSE ); ALTER TABLE wfs_geom OWNER TO geoserver; CREATE INDEX sidx_wfs_geom ON wfs_geom USING gist (geometry);

No núcleo dos snippets de javascript do OL está a função ol.format.WFS.writeTransaction, que recebe 4 parâmetros de entrada. Os 3 primeiros parâmetros definem se os dados devem ser inseridos, atualizados ou excluídos da fonte de dados. O quarto parâmetro assume a forma de ol.format.GML e transmite informações sobre o tipo de recurso, namespace e projeção dos dados.

O nó writeTransaction deve ser serializado com um XMLSerializer para ser usado em uma postagem do WFS-T.

Os três casos de uso (insert/update/delete) e a chamada AJAX são mostrados no seguinte trecho de código.

var formatWFS = new ol.format.WFS(); var formatGML = new ol.format.GML({ featureNS: 'https://gsx.geolytix.net/geoserver/geolytix_wfs', featureType: 'wfs_geom', srsName: 'EPSG:3857' }); var xs = new XMLSerializer(); var transactWFS = function (mode, f) { var node; switch (mode) { case 'insert': node = formatWFS.writeTransaction([f], null, null, formatGML); break; case 'update': node = formatWFS.writeTransaction(null, [f], null, formatGML); break; case 'delete': node = formatWFS.writeTransaction(null, null, [f], formatGML); break; } var payload = xs.serializeToString(node); $.ajax('https://gsx.geolytix.net/geoserver/geolytix_wfs/ows', { service: 'WFS', type: 'POST', dataType: 'xml', processData: false, contentType: 'text/xml', data: payload }).done(function() { sourceWFS.clear(); }); };

Inserções são chamadas a partir do evento de “drawend” da interação do OL. A função .clear() no sourceWFS recarrega a fonte após cada transação. Isso garante que os IDs de recurso estejam corretos para os novos recursos e que os recursos excluídos sejam removidos da exibição.

O ID de um recurso modificado é armazenado e a transação de atualização é lançada quando o recurso é desmarcado. Para publicar com êxito uma transação de atualização, a propriedade boundedBy deve ser removida das propriedades do recurso. Um clone do recurso é usado para conseguir isso.

map.addInteraction(interactionSelect); interaction = new ol.interaction.Modify({ features: interactionSelect.getFeatures() }); map.addInteraction(interaction); map.addInteraction(interactionSnap); dirty = {}; interactionSelect.getFeatures().on('add', function (e) { e.element.on('change', function (e) { dirty[e.target.getId()] = true; }); }); interactionSelect.getFeatures().on('remove', function (e) { var f = e.element; if (dirty[f.getId()]) { delete dirty[f.getId()]; var featureProperties = f.getProperties(); delete featureProperties.boundedBy; var clone = new ol.Feature(featureProperties); clone.setId(f.getId()); transactWFS('update', clone); } });

Você pode ver o exemplo completo (na versão 3.16 do OL) no jsFiddle.

Fonte: Medium – Dennis Bauszus

Categories: OSGeo Planet

Blog 2 Engenheiros: Como abrir tabelas com dados de campo para serem apresentados no Google Earth?

OSGeo Planet - Tue, 2018-09-18 06:38

Após alguns dias de trabalho de campo, você retorna para o seu escritório e tem que organizar tudo o que você levantou. Grande parte dos seus dados esta associada à algum local da sua área de estudo.

Como você não esta trabalhando sozinho, você terá que apresentar os resultados desses dias de campo para a sua equipe ou para o coordenador do projeto.

Qual seria a forma mais fácil de apresentar tudo isso para eles?

Um forma de realizar essa apresentação é utilizando o Google Earth em conjunto com vários pontos.

Resultado do processo de exportação de CSV para KMZ no ArcGIS. Ao clicar sobre os ícones do Google Earth, você terá acesso à tabela de atributos exportada.

Antes de começarmos, você vai precisar de um software de geoprocessamento, tais como QGIS ou ArcGIS. Neste tutorial, vamos apresentar o procedimento utilizando os dois.

Além deles, você precisará de um editor de planilhas (tais como Microsoft Excel ou LibreOffice Calc).

Tabulando os dados de campo

Primeiramente, vamos organizar nossos dados de campo em uma planilha, a qual irá conter a localização dos nossos pontos (coordenadas), numeração da foto registrada e as informações complementares.

Criamos abaixo 5 pontos fictícios para você pode acompanhar nosso tutorial.

X (UTM) Y (UTM) Foto Observação 605490 6807439 3848-3852 Ponto de Amostragem de Solo 607801 6807918 3853-3855 Ponto de Amostragem de Água 609479 6807026 3856-3857 Medição de Vazão 609380 6807283 3858-3860 Avaliação da Qualidade do Ar 609703 6806882 3861-3862 Acesso interditado (Ponte Quebrada)

Agora, vamos salvar essa planilha no formato CSV.

No Excel, clique em Arquivo > Salvar Como, na janela que irá abrir, logo abaixo do nome do arquivo, troque o campo por CSV (Separado por Vírgula) e clique em salvar.

O Excel irá avisar que algumas funcionalidades podem ser perdidas ao salvar em CSV, neste caso, você pode clicar em aceitar (sim), sem problemas.

Caso você tenha os dados salvos no seu GPS, no formato GPX, é possível pular essa etapa e trabalhar diretamente no GIS.

Com o arquivo CSV salvo, vamos utilizar o QGIS ou ArcGIS para salvá-lo no formato KMZ.

Abrindo Arquivo CSV no QGIS

Para abrir o nosso arquivo CSV no QGIS, vá em Camada (Layer) > Adicionar Camada (Add Layer) > Adicionar Camada de Texto Delimitado (Add Delimited Text Layer).

No primeiro campo, você deverá procurar a planilha com os seus dados. Em seguida, você poderá renomear o nome da camada, especificar qual é o tipo de delimitador (no caso do CSV é o ponto e vírgula ;). Em seguida, várias opções são apresentadas, permitindo remover cabeçalhos e determinar em qual coluna esta a latitude e longitude.

O resultado é apresentado na parte inferior da janela. Confira a figura abaixo.

Janela para Inserir pontos no QGIS a partir de tabela.Janela para Inserir pontos no QGIS a partir de tabela.

Agora, basta clicar em OK e o QGIS irá solicitar qual é o sistema de coordenadas dos pontos, selecione SIRGAS 2000 UTM 22 S (EPSG: 31982).

Exportando para KMZ no QGIS

Por fim, vamos exportar nossos dados para KMZ para possibilitar a sua apresentação para a nossa equipe de trabalho.

O arquivo CSV recém-aberto estará no painel de camadas. Clique sobre ele com o botão direito e selecione Salvar Como.

Na janela a ser aberta, selecione o formato KML, defina o local onde ele será salvo, qual o nome do arquivo e o sistema  de projeção (1), em seguida, expanda a opção “Select fields to export and their export options” (2) e selecione os campos que deverão ser exportados.

Campo que devem ser habilitados para exportar a tabela de atributos no QGIS.Campo que devem ser habilitados para exportar a tabela de atributos no QGIS.

Abaixo dessas opções, ainda é possível selecionar qual campo contém o nome que irá aparecer no Google Earth (dentro de Datasource Options, modifique “NameField” e “DescriptionField”). No nosso tutorial, não utilizaremos ele.

Caso você habilite essas funções (NameField e DescriptionField), você só poderá mostrar duas colunas no KMZ, sendo que para aparecer a tabela de atributos inteira, elas não devem ser marcadas.

O resultado, ao exportar o arquivo CSV em KMZ, no Google Earth é apresentado na figura abaixo.

Ao clicar sobre os ícones do Google Earth, você terá acesso à tabela de atributos exportada.Ao clicar sobre os ícones do Google Earth, você terá acesso à tabela de atributos exportada. Abrindo Arquivo CSV no ArcGIS

Já havíamos falado sobre a importação de arquivos do Excel no ArcGIS e o procedimento para abrir arquivos CSV no ArcGIS não é muito diferente.

Vá em Arquivo (File) > Adicionar Dados (Add Data) > Adicionar Dados XY (Add XY Data).

Na janela que irá abrir, você deverá indicar onde esta o arquivo CSV salvo, as colunas que contém a latitude e longitude e o sistema de projeção, conforme figura abaixo.

Abrindo arquivos CSV no ArcGIS.Abrindo arquivos CSV no ArcGIS.

Após esse procedimento, você terá o arquivo CSV aberto no seu ArcGIS.

Exportando para KMZ no ArcGIS

No ArcGIS, para exportar para KMZ, vamos utilizar uma ferramenta do ArcToolbox. Procure em Conversion Tools > To KML > Layer to KML.

Nesta ferramenta, você irá apenas indicar qual arquivo deve ser convertido e o local onde o arquivo KML será gerado. Conforme figura abaixo.

Convertendo camada para KML no ArcGIS.Convertendo camada para KML no ArcGIS.

Após a conversão, ao abrir o arquivo no Google Earth, você poderá clicar nos ícones e obter a tabela de atributos.

Resultado do processo de exportação de CSV para KMZ no ArcGIS.Resultado do processo de exportação de CSV para KMZ no ArcGIS.

Note que o ArcGIS considerou a terceira coluna (número da foto) como o nome dos arquivos. Além disso, ele importou o formato do símbolo que adotamos no ArcGIS.

Comparando os Resultados

Você notou que as tabelas geradas são diferentes, mas em nenhum dos casos, isso irá prejudicar a apresentação dos dados.

Caso você abra o arquivo KML no bloco de notas, irá ver que o arquivo gerado no QGIS é mais simples, onde a tabela de atributos é adicionada pela tag ExtendedData em conjunto com as tags SimpleData.

Já no ArcGIS, ele exporta a tabela de atributos como HTML dentro da tag Description, a qual aceita esse tipo de linguagem de programação, possibilitando o ajuste do estilo (como o formato e cores da tabela).

Você pode consultar mais sobre esse tipo de programação visitando o site da Google para Desenvolvedores na Documentação do KML.

Agora, você pode facilmente apresentar e compartilhar os dados coletados em campo para toda a sua equipe.

Ficou com alguma dúvida? Deixa ela nos comentários que responderemos assim que possível.

Fontes Consultadas Como adicionar dados personalizados - Keyhole Markup Language. Google Developers. Disponível em: <https://developers.google.com/kml/documentation/extendeddata?hl=pt-br>. Acesso em 16 set. 2018 GIS Stackexchange - QGIS exporting attributes in a KML file. Disponível em: <https://gis.stackexchange.com/questions/136604/qgis-exporting-attributes-in-a-kml-file>. Acesso em 16 set. 2018.
Categories: OSGeo Planet

GeoSolutions: MapStore Release 2018.02.00: Dashboards and more

OSGeo Planet - Mon, 2018-09-17 16:22

2018.02.00 cover

Dear Reader,

We are pleased to announce the new release 2018.02.00 of MapStore, our flagship Open Source WebGIS product. The full list of changes for this release can be found here, but the most interesting additions are the following:

  • Dashboards: you can now create your own dashboard to mix maps with charts and other widgets to create advanced visualizations that you can  save and share as you already do with maps
  • Improved Homepage: we added support for featured maps and dashboards so that you can make most importan maps and dashboards more prominent
  • Widgets: new Rich Text widget, available both for maps and dashboards
  • Upgraded OpenLayers and Leaflet to latest versions
  • Various bug fixes and performance improvements

About Dashboards

A dashboard is a new kind of resource available on MapStore. A dashboard is a single page that can contain maps, charts, tables, counters, legend and other widgets to create an immersive visualization of your data that goes beyond the simple mapping.

[gallery type="slideshow" size="large" columns="2" ids="4361,4362,4363,4364"] The various widgets can be connected to a map in order to filter data on the current map viewport so that as you interact with the map the widgets adapt their content dynamically. [caption id="attachment_4371" align="aligncenter" width="800"]Connect map and widgets Connect map and widgets[/caption]

Like maps, dashboards can be created, edited and shared with the other users via MapStore.

[caption id="attachment_4372" align="aligncenter" width="800"]Save your own dashboards as you already do with maps Save your own dashboards as you already do with maps[/caption] New Home page with featured resources

The new home page is much better (at least that is our hope) than the previous one, since we first of all did a deep refresh of its look&feel. Administrators can now mark maps and dashboards as "featured" to make them more prominent in the home page and therefore easier to discover for end users who  can quickly find the most important content without using the search functionalities.

[caption id="attachment_4373" align="aligncenter" width="800"]homepage New home page with featured maps[/caption] Below the featured content section you can find the usual list of maps in a tab together with an additional tab that shows dashboards. New Rich Text widget With the new Rich Text widget users can add to maps and dashboards  rich content comprising of images, hyperlinks and formatted text as shown below. Copy and paste from HTML pages is supported as well. [caption id="attachment_4375" align="aligncenter" width="800"]New text widget available for dashboards and maps New rich text widget available for dashboards and maps[/caption]   Future work

For the next releases we have plans to work on the following (in sparse order):

  • Integration with GeoNode
  • Integrated styler for GeoServer
  • Timeslide to support for WMS layers with TIME
  • Support for more general map annotations, beyond simple markers further improvements to charts and dashboards
Stay tuned for additional news on the next features!

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

The GeoSolutions team,
Categories: OSGeo Planet

PostGIS Development: PostGIS 2.5.0rc2

OSGeo Planet - Sun, 2018-09-16 00:00

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

Although this release will work for PostgreSQL 9.4 and above, to take full advantage of what PostGIS 2.5 offers, you should be running PostgreSQL 11beta3+ and GEOS 3.7.0 which were released recently.

Best served with PostgreSQL 11beta3.

WARNING: If compiling with PostgreSQL 11+JIT, LLVM >= 6 is required

2.5.0rc2

Changes since PostGIS 2.5.0rc1 release are as follows:

  • 4162, ST_DWithin documentation examples for storing geometry and radius in table (Darafei Praliaskouski, github user Boscop).
  • 4163, MVT: Fix resource leak when the first geometry is NULL (Raúl Marín)
  • 4172, Fix memory leak in lwgeom_offsetcurve (Raúl Marín)
  • 4164, Parse error on incorrectly nested GeoJSON input (Paul Ramsey)
  • 4176, ST_Intersects supports GEOMETRYCOLLECTION (Darafei Praliaskouski)
  • 4177, Postgres 12 disallows variable length arrays in C (Laurenz Albe)
  • 4160, Use qualified names in topology extension install (Raúl Marín)
  • 4180, installed liblwgeom includes sometimes getting used instead of source ones (Regina Obe)

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.

Categories: OSGeo Planet

QGIS Blog: MacOS specific bug fixing campaign

OSGeo Planet - Wed, 2018-09-12 08:51

If you are a MacOS QGIS user, you are probably bothered by some MacOS specific bugs. These are due to the fact that we have fewer QGIS developers working on the MacOS platform and there are additional MacOS specific issues in the underlying qt5 library.

Nevertheless, we found a developer, Denis Rouzaud, who wants to specifically look into investigating and hopefully solving several of these issues. If you are a MacOS user and care about a better QGIS experience on this platform, we invite you to financially support this effort. As a private person, and for smaller amounts, please use the usual donation channel – if you are a company or organization and want to contribute to this specific effort, please consider becoming a sponsor. In any case – please add “MacOS bug fixing campaign” as a remark when donating/sponsoring or inform finance@qgis.org about your earmarked donation.

This effort runs from the 14th September 2018 until the 3.4 release date, due on October 26, 2018. See the QGIS road map for more details about our release schedule.

Specific issues that are looked into, are:

issue priority subject 11103 1 Support for retina displays (HiDPI) 17773 1 No Retina / HiDPI support in 2.99 on osx 19546 1 QGIS 3 slow on macOS at high resolutions 19524 1 [macOS] Map canvas with wrong size on QGIS 3.2.1 start up 19321 2 Map Tips on Mac doesn’t display the content correctly 19314 1 3.2 crashes on startup on a Mac 19092 2 Measure tool on a Mac uses the top right corner of the cross hair cursor instead of the centre 18943 3 QGIS Server on MacOS X High Sierra 18914 3 [macOS] Plugin list corrupted by wrongly placed checkboxes on Mac 18720 2 QGIS 3.0.1 crashes on Mac 18452 3 Snapping options missing on Mac 18418 2 Scroll zoom erratic on Mac trackpad 16575 3 QGIS 2.18.7 crashes on macOS 10.12.4 when undocking the label panel 16025 2 [macOS] Control feature rendering order will crash QGIS 3975 2 PDF exports on OSX always convert text to outlines

Thank you for considering to support this effort! Please note that some issues may also exist due to up-stream issues in the qt library. In such a case, it can’t be guaranteed if and how fast, such an issue can be fixed.

Andreas Neumann, QGIS.ORG treasurer

Categories: OSGeo Planet

PostGIS Development: PostGIS Patch Release 2.4.5

OSGeo Planet - Wed, 2018-09-12 00:00

The PostGIS development team is pleased to provide bug fix 2.4.5 for the 2.4 stable branch.

View all closed tickets for 2.4.5.

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.4.5

Categories: OSGeo Planet

Paul Ramsey: E&N (T)rail Time

OSGeo Planet - Tue, 2018-09-11 16:00

The last week of August, I took three days and rode my bike from Victoria to Courtenay. It was a marvelous trip, and I got to see and stay in some wonderful towns along the way: Cowichan Bay, Duncan, Chemainus, Ladysmith, Nanaimo, Parksville, Qualicum Beach, Fanny Bay, Union Bay and Courtenay.

Active rail line has not seen a train since 2011

I also got to see a good portion of the old E&N railway line, as that line also passes through all the little towns I visited (with the exception of Cowichan Bay). It doesn’t take a trained surveyor to see that most of the railbed is in really poor condition. In many places the ties are rotting out, and you can pull spikes out of them with your bare hands. Running a train on the thing is going to take huge investments to basically rebuild the rail bed (and many of the trestles) from scratch, and the economics don’t work: revenues from freight and passenger service couldn’t even cover the operating costs of the line before it was shut down, let alone support a huge capital re-investment.

Cast bronze totem in Duncan

What to do with this invaluable right-of-way, an unobstructed ribbon of land running from Victoria to Courtenay (and beyond to Port Alberni)?

May I (and others) suggest a rail trail?

My breakfast destination in Ladysmith

Right now this chunk of land is returning nothing to the province economically. It’s actually a net drain, as municipalities spend money maintaining unused level crossings and the Island Corridor Foundation (ICF) spends federal and provincial grants to cut brush and replace the occasional tie on the never-again-to-be-used line.

Nanaimo waterfront promenade

Unlike the current ghost railway, a recreational trail would pay for itself almost immediately.

  • My first point of anecdata is my own 3-day bike excursion. Between accomodations, snacks along the way, and very tasty dinners (Maya Norte in Ladysmith and CView in Qualicum) I injected about $400 into the local economies over just two nights.
  • My second point of anecdata is an economic analysis of the Rum Runner’s Trail in Nova Scotia. The study shows annual expenditures by visitors alone of $3M per year. That doesn’t even count the economic benefit of local commuting and connection between communities.
  • My third point of anecdata is to just multiply $200 per night by three nights (decent speed) to cover the whole trail and 2000 marginal new tourists on the trail to get $1.2M direct new dollars. I find my made-up numbers are very compelling.
  • My fourth point of anecdata is the Mackenzie Interchange, currently under construction for over $70M. There is no direct economic benefit to this infrastructure, it will induce no tourist dollars and generate no long term employment.

If a Vancouver Island Rail Trail can generate even $3M in net new economic benefit for the province, it warrants a at least $50M investment to generate an ongoing 6% return. We spend more money for less return routinely (see the Mackenzie Interchange above).

No traffic on the line in Qualicum

And that’s just the tourism benefit.

Electric bikes are coming, and coming fast. A paved, continuous trail will provide another transportation alternative that is currently unavailable. Take it from me, I rode from Nanaimo to Parksville on the roaring busy highway 19 through Nanoose: it’s a terrible experience, nobody wants to do that. Cruising a paved rail trail on a quietly whirring electic bike though, that would be something else again.

Right now the E&N line is not a transportation alternative. Nor is it a tourist destination. Nor is it a railway. It’s time to put that land back to work.

Categories: OSGeo Planet

Free and Open Source GIS Ramblings: Geocoding with Geopy

OSGeo Planet - Tue, 2018-09-11 09:21

Need to geocode some addresses? Here’s a five-lines-of-code solution based on “An A-Z of useful Python tricks” by Peter Gleeson:

from geopy import GoogleV3 place = "Krems an der Donau" location = GoogleV3().geocode(place) print(location.address) print("POINT({},{})".format(location.latitude,location.longitude))

For more info, check out geopy:

geopy is a Python 2 and 3 client for several popular geocoding web services.
geopy includes geocoder classes for the OpenStreetMap Nominatim, ESRI ArcGIS, Google Geocoding API (V3), Baidu Maps, Bing Maps API, Yandex, IGN France, GeoNames, Pelias, geocode.earth, OpenMapQuest, PickPoint, What3Words, OpenCage, SmartyStreets, GeocodeFarm, and Here geocoder services.

Categories: OSGeo Planet

Blog 2 Engenheiros: 10 Blogs de Geoprocessamento que Você deve Seguir

OSGeo Planet - Tue, 2018-09-11 06:05

Entende-se por geoprocessamento toda a representação de técnicas e tecnologias capazes de coletar e tratar informações georreferenciadas, visando o desenvolvimento de novas aplicações, tais como Sistemas de Informações Geográficas (SIG).

O SIG permite a realização de análises complexas, pois integram dados de diversas fontes e criam bancos de dados georreferenciados.

O geoprocessamento vem se tornando um importante aliado nas etapas de levantamento de dados; diagnóstico de problemas; tomada de decisões; planejamento urbano, dentre outros.

Foto aérea com drone da cidade de Les Vans (França), por Nicolas Van Leekwijck no Unsplash.Foto aérea com drone da cidade de Les Vans (França), por Nicolas Van Leekwijck no Unsplash.

Atualmente, ele é  utilizado praticamente em todas as áreas, seja para inserir um mapa de localização de uma determinada área de estudo como para traçar planos de trabalho nas áreas de administração municipal.

Pensando nisso, separamos 10 (dez) blogs de geoprocessamento que irão te auxiliar na elaboração de seus mapas.

Anderson Medeiros

Link: http://www.andersonmedeiros.com/

O Blog é mantido pelo Graduado em Geoprocessamento Anderson Medeiros que, desde 2005 compartilha seus conhecimentos nas redes sociais por meio de cursos, palestras, vídeo-aulas, tutorias do software livre QGIS, dentre outros.

Fernando Quadro

Link: http://www.fernandoquadro.com.br/html/

Criado em 2007, o blog é mantido por Fernando Quadro. Fernando é formado em Ciências da Computação e pós-graduado (MBA) em Gerenciamento de Projetos pela Universidade do Vale do Itajaí (UNIVALI).

Atualmente é analista de sistemas e consultor em geotecnologias livres e tenta divulgar com o blog artigos, tutoriais e conteúdos relacionados ao geoprocessamento.

  • GeoServer: Nesse artigo, Fernando explica o que é o GeoServer e suas funcionalidades;
  • PostGIS: Esse artigo ele explica um pouco sobre o PostGIS, sua origem e suas funcionalidades.
Geografia e Cartografia Digital

Link: https://geocartografiadigital.blogspot.com/

O blog  está no ar desde 2013  e pertence ao Luiz Henrique Almeida Gusmão, formado em Geografia pela Universidade Federal do Pará (UFRA).

Além de prestar consultoria em cartografia e geoprocessamento a acadêmicos e pesquisadores por meios  da confecção dos mapas; ele compartilha vários materiais relacionados ao geoprocessamento (tais como livros).

GEOSABER

Link: https://www.geosaber.com.br/

O blog é mantido desde 2007 pelo grupo Geosaber e desde então fornece cursos, tutoriais, artigos e serviços voltados a área do geoprocessamento.

  • Phyton Programming Free Books: Esse artigo fala sobre o livro Phyton in Hidrology escrito por Sat Kumar Tomer;
  • Mapas com R: Neste artigo é apresentado como elaborar mapas de estatística e dinâmicos no R utilizando o pacote inlmisc.
Geotecnologias – Luís Lopes

Link: http://www.geoluislopes.com/

O blog esta ativo desde 2008 e é mantido por Luís Lopes, que compartilha e publica artigos tutoriais sobre os programas QGIS; TerraView; ArcGIS, dentre outros.

Murilo Cardoso

Link: http://murilocardoso.com/

O Blog é mantido pelo geógrafo Murilo Cardoso, focando no ensino de Geografia por meio de artigos, tutoriais e vídeos de programas como QGIS e ArcGIS em diversos formatos.

Processamento Digital

Link: http://www.processamentodigital.com.br/

É um canal de conteúdo Geo mantido pela Hex Tecnologias Geoespaciais. No canal você encontra tutoriais, noticiais e demais conteúdos na área do geoprocessamento.

GeoBrainStorms

Link: https://geobrainstorms.wordpress.com/

O blog é escrito por diferentes profissionais e apresenta em seus conteúdos tutoriais e artigos voltados a manipulação de banco de dados, sensoriamento remoto, SIG e desenvolvimento para Geoprocessamento com base em diferentes softwares.

iDea Plus Geo

Link:http://geo.ideaplus.com.br/

Esse blog apresenta artigos e tutoriais sobre o software gvSIG.

Forest GIS

Link: http://forest-gis.com/

O blog mantém um banco de dados para download, vídeo, artigos e tutoriais de geoprocessamento para a área florestal.

[+ BONUS]

arcOrama: Blog francofono dedicado às tecnologias ESRI (i.e. ArcGIS).

Topi Tjukanov: Geografo finlandês que compartilha vários de seus trabalhos com QGIS no Twitter.

Blog SIG & Territoires: Model Builder : convertir un modèle batch en modèle interactif.

Anita Graser: Autora de livros sobre QGIS, Anita publica vários tutoriais no seu site.

Jesse Sadler: Tem várias postagens sobre o uso do R para o desenvolvimento de mapas.

Blog Geoprocessamento: Apresenta informações e painéis sobre o Geoprocessamento (CAD, GIS/SIG e Sensoriamento Remoto), dentre outros.

Faltou o seu blog? Apresente ele nos comentários para que possamos também visitá-lo.

[Confira também os 10 Blogs de Engenharia que Todo Engenheiro deve Seguir]

Categories: OSGeo Planet

Marco Bernasocchi: QGIS speaks a lot of languages

OSGeo Planet - Tue, 2018-09-11 03:39
QGIS is a real cosmopolitan. Born in Alaska sixteen years ago, it has spread all over the world since. Thanks to its open source mentality, it finds not only in economically strong countries big usergroups. No question, that beside all… See more ›
Categories: OSGeo Planet

Ian Turton's Blog: Playing with Ordnance Survey's ZoomStack and a new Project

OSGeo Planet - Tue, 2018-09-11 00:00

Over the weekend I was playing around with the Ordnance Survey’s new Zoomstack and it is very nice. But I really wanted to see what it looked like in GeoServer with Charley Glynn’s nice SLDs, but then I would need to take each table in PostGIS and add it to GeoServer and add the SLD. There are 21 distinct layers (which is much better than the old days when you needed 100s of layers to cover the whole stack) but was still a little annoying for what is a simple task I do repeatedly.

So ignoring XKCD’s advice I decided that a tool to automate this was needed. So I now have a new project based on GeoTools and GeoServer Manager. The current version works nicely for me and my current problem, if your database user isn’t called ian it may work less well for you!

Results

For those of you in the UK who haven’t played with the Open Zoomstack in GeoServer yet here are some images.

Categories: OSGeo Planet

Fernando Quadro: Consultando várias camadas em uma única consulta no GeoServer

OSGeo Planet - Mon, 2018-09-10 19:41

Prezado leitor,

Você já deve ter passado pelo seguinte problema: filtrar recursos de camadas diferentes usando o WFS.

Como sabemos o CQL não permite que façamos JOIN de camadas. Quando é necessário realizar JOIN de alguma informação, necessitamos criar uma view e a partir desta view uma camada.

Porém hoje, vou apresentar uma forma de como você pode em uma requisição WFS filtrar dados de mais de uma camada. Para isso vamos usar os dados vindos por padrão no GeoServer.

Para aplicar um único CQL_filter em uma camada WFS, é simples. Nós temos a camada topp:tasmania_water_bodiespublicado e queremos obter os recursos onde a área é maior do que 1.066.494.066 metros quadrados, para que possamos fazer a próxima requisição ao servidor:

https://demo.geo-solutions.it/geoserver/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&typeNames=topp:tasmania_water_bodies&propertyName=&cql_filter=AREA>1066494066&outputFormat=application/json

Até aqui foi fácil! Nós teremos 4 recursos que satisfazem os filtros. A sintaxe é clara:

typeNames=topp:tasmania_water_bodiese&cql_filter=AREA>1066494066

Mas, como devemos fazer se quisermos obter recursos de duas ou mais camadas ao mesmo tempo?

Se obtivermos ao mesmo tempo os recursos da camada topp:tasmania_roadscamada com os recursos filtrados anteriormente na camada topp:tasmania_water_bodies, devemos usar uma solicitação semelhante, mas separando o typeNames desta maneira:

typeNames=(topp:tasmania_water_bodies)(topp:tasmania_roads)

E configurar os filtros CQL associados ordenados respeitando os typenames:

cql_filter=AREA<1066494066;TYPE='alley' https://demo.geo-solutions.it/geoserver/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&typeNames=(topp:tasmania_water_bodies)(topp:tasmania_roads)&propertyName=&cql_filter=AREA<1066494066;TYPE='alley'&outputFormat = aplicativo / json

E o propertyName? Usando o parâmetro propertyName na requisição WFS, podemos filtrar as propriedades do recurso conforme desejado. Esse parâmetro é importante para reduzir o tamanho da resposta, obtendo apenas as propriedades nas quais estamos interessados.

Em nosso exemplo, podemos obter apenas o CNTRY_NAME da topp:tasmania_water_bodies e o TYPE da topp:tasmania_roads.

Neste caso, o a requisição será:

https://demo.geo-solutions.it/geoserver/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&typeNames=(topp:tasmania_water_bodies)(topp:tasmania_roads)&propertyName=(CNTRY_NAME)(TYPE)&cql_filter=AREA%3C1066494066; TYPE =% 27alley% 27 & outputFormat = aplicativo / json

Desta forma você conseguirá então filtrar as camadas topp:tasmania_water_bodies e TYPE da topp:tasmania_roads em uma única requisição.

Fonte: Blog Geomatico

Categories: OSGeo Planet

GeoSolutions: MapStore in the Austro Control Spatial Data Infrastructure: supporting dissemination of aeronautical data

OSGeo Planet - Mon, 2018-09-10 16:06

austrocontrol

Dear Reader,

In this post we would like to cover the work we have performed recently for Austro Control GmbH.

Austro Control is one of Europe’s leading air traffic control organisations. There are up to 3,500 controlled flights in Austrian airspace on some days. With a workforce of about 1,000, Austro Control’s key task is maintaining safe, punctual, efficient and environmentally friendly air traffic round the clock, 365 days a year, with over 1 million flight movements in Austrian airspace.

Austro Control is a limited company (plc) owned by the Austrian government that grew from the Federal Office of Civil Aviation (corporatised on 1 January 1994).

Austro Control has two main functions, performed by separate divisions. The Air Navigation Services Division largely comprises operational functions, while the Aviation Agency is responsible for regulatory matters.

An enterprise SDI based on Open Source

As part of their effort to create their own spatial data infrastructure based on Open Source to ingest, manage and disseminate Aeronautical Information to their stakeholders, they have selected MapStore as their webmapping client of choice. It is also worth to point out that MapStore is in good company since Austro Control GmbH also uses GeoServer and GeoNetwork for data and metadata management.

[caption id="attachment_4339" align="aligncenter" width="800"]Austro Control SDI Austro Control SDI[/caption]

Whilst Austro Control GmbH was satisfied with some of the functionalities offered by MapStore they decided to provide funding to implement some specific functionalities as well as to enhance some other functionalities (such contributions will be part of the next, upcoming MapStore release). In the following sections of this post we are going to briefly cover the most important ones.

Import/Export of Maps and Data

This is about the ability for all users to export map definitions and then reload them or send them to someone else for sharing. 

Anonymous users are therefore now able to export map settings locally in a file, which can be saved for later reuse; this includes the status of collapsed/open parts of the hierarchical legend as shown below. It is also possible to load and style directly on the map Shapefiles, GeoJSON and KML/KMZ files, as shown below.

[caption id="attachment_4344" align="aligncenter" width="800"]Map Export at work Map Export at work[/caption] [caption id="attachment_4342" align="aligncenter" width="800"]Map & Data Import GUI Map & Data Import GUI[/caption] [caption id="attachment_4340" align="aligncenter" width="801"]Importing and styling as marker a Shapefile for populated places from Natural Earth Importing and styling as marker a Shapefile for populated places from Natural Earth[/caption] Improved Map Annotations

Users are now able to create, modify, remove, store locally and upload sophisticated map annotations also known as redlining data. The annotations can be of type point, line, polygon, circle and text and are not stored on the server (this will be implemented in a future version) but are transient on the map with the possibility to export to a local storage and re-upload later on.

[caption id="attachment_4346" align="aligncenter" width="800"]Annotations manager on a sample set of annotations showing the various types of annotations elements allowed Annotations manager on a sample set of annotations showing the various types of annotations elements allowed[/caption]

The ability to define a symbology for the annotations (colour, line thickness, point symbols, line/area style, text font, etc.) is also supported as shown below.

[caption id="attachment_4347" align="aligncenter" width="801"]Styling a circle annotation Styling a circle annotation[/caption]

It is also possible to place annotations elements by using coordinate input via the keyboard (point, line, polygon, circle, text): for above mentioned data input the possibility shall exist to enter locations/points of elements via coordinate input on a text field, the format for coordinates are decimal degrees and the aeronautical degree format ("NDD MM SS.xxxx, EDDD MM SS.xxxx").

[caption id="attachment_4348" align="aligncenter" width="801"]Precise annotation geolocation Precise annotation geolocation[/caption]

The ability to print annotations and imported vectorial data is also supported, further improvements to the print tool in MapStore have been provided to properly preserve vector feature styles too.  

[caption id="attachment_4349" align="aligncenter" width="801"]Printing of imported KML files and annotations Printing of imported KML files and annotations[/caption] Support for AIRAC Cycles for publication dates in irregular time lags

MapStore still lacks a proper widget to manage time enabled layer from WMS and WMTS (stay tuned, we are working on that as well) but this was an important missing features since Austro Control Gmbh needs to update data according to the Aeronautical Information Regulation And Control Cycle; therefore the requirement here was to create a widget to display a calendar where the user could select a specific date to control a WMS TIME-enabled layer(s) or to be presented with a predefined list of dates.

[caption id="attachment_4350" align="aligncenter" width="801"]Selecting dates from a predefined list Selecting dates from a predefined list[/caption] [caption id="attachment_4351" align="aligncenter" width="800"]Free selection from a calendar where existing time slots are highlighted Free selection from a calendar where existing time slots are highlighted[/caption]

The date selection applies to all layers that support the time dimension and we also give users the option to display or not layers without time dimension. Notice that only the administrator is able to configure a list of special dates with names that shall be highlighted in the calendar component, as shown before.

Conclusions

Other enhancements were performed as part of this work which will end up in MapStore soon (e.g. ability to measure on the map in nautical miles); eventually, we would like to thank Austro Control GmbH for its patience when dealing with us and for their foresight in embracing the Open Source philosophy.

Last but not least, 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
Categories: OSGeo Planet

Paul Ramsey: Parallel PostGIS and PgSQL 11

OSGeo Planet - Mon, 2018-09-10 16:00

A little under a year ago, with the release of PostgreSQL 10, I evaluated the parallel query infrastructure and how well PostGIS worked with it.

The results were less than stellar for my example data, which was small-but-not-too-small: under default settings of PostgreSQL and PostGIS, parallel behaviour did not occur.

However, unlike in previous years, as of PostgreSQL 10, it was possible to get parallel plans by making changes to PostGIS settings only. This was a big improvement from PostgreSQL 9.6, which substantial changes to the PostgreSQL default settings were needed to force parallel plans.

PostgreSQL 11 promises more improvements to parallel query:

  • Parallelized hash joins
  • Parallelized CREATE INDEX for B-tree indexes
  • Parallelized CREATE TABLE .. AS, CREATE MATERIALIZED VIEW, and certain queries using UNION

With the exception of CREATE TABLE ... AS none of these are going to affect spatial parallel query. However, there have also been some none-headline changes that have improved parallel planning and thus spatial queries.

Parallel PostGIS and PgSQL 11

TL;DR:

PostgreSQL 11 has slightly improved parallel spatial query:

  • Costly spatial functions on the query target list (aka, the SELECT ... line) will now trigger a parallel plan.
  • Under default PostGIS costings, parallel plans do not kick in as soon as they should.
  • Parallel aggregates parallelize readily under default settings.
  • Parallel spatial joins require higher costings on functions than they probably should, but will kick in if the costings are high enough.
Setup

In order to run these tests yourself, you will need:

  • PostgreSQL 11
  • PostGIS 2.5

You’ll also need a multi-core computer to see actual performance changes. I used a 4-core desktop for my tests, so I could expect 4x improvements at best.

The setup instructions show where to download the Canadian polling division data used for the testing:

  • pd a table of ~70K polygons
  • pts a table of ~70K points
  • pts_10 a table of ~700K points
  • pts_100 a table of ~7M points

PDs

We will work with the default configuration parameters and just mess with the max_parallel_workers_per_gather at run-time to turn parallelism on and off for comparison purposes.

When max_parallel_workers_per_gather is set to 0, parallel plans are not an option.

  • max_parallel_workers_per_gather sets the maximum number of workers that can be started by a single Gather or Gather Merge node. Setting this value to 0 disables parallel query execution. Default 2.

Before running tests, make sure you have a handle on what your parameters are set to: I frequently found I accidentally tested with max_parallel_workers set to 1, which will result in two processes working: the leader process (which does real work when it is not coordinating) and one worker.

show max_worker_processes; show max_parallel_workers; show max_parallel_workers_per_gather; Aggregates

Behaviour for aggregate queries is still good, as seen in PostgreSQL 10 last year.

SET max_parallel_workers = 8; SET max_parallel_workers_per_gather = 4; EXPLAIN ANALYZE SELECT Sum(ST_Area(geom)) FROM pd;

Boom! We get a 3-worker parallel plan and execution about 3x faster than the sequential plan.

Scans

The simplest spatial parallel scan adds a spatial function to the target list or filter clause.

SET max_parallel_workers = 8; SET max_parallel_workers_per_gather = 4; EXPLAIN ANALYZE SELECT ST_Area(geom) FROM pd;

Unfortunately, that does not give us a parallel plan.

The ST_Area() function is defined with a COST of 10. If we move it up, to 100, we can get a parallel plan.

SET max_parallel_workers_per_gather = 4; ALTER FUNCTION ST_Area(geometry) COST 100; EXPLAIN ANALYZE SELECT ST_Area(geom) FROM pd

Boom! Parallel scan with three workers. This is an improvement from PostgreSQL 10, where a spatial function on the target list would not trigger a parallel plan at any cost.

Joins

Starting with a simple join of all the polygons to the 100 points-per-polygon table, we get:

SET max_parallel_workers_per_gather = 4; EXPLAIN SELECT * FROM pd JOIN pts_100 pts ON ST_Intersects(pd.geom, pts.geom);

PDs & Points

In order to give the PostgreSQL planner a fair chance, I started with the largest table, thinking that the planner would recognize that a “70K rows against 7M rows” join could use some parallel love, but no dice:

Nested Loop (cost=0.41..13555950.61 rows=1718613817 width=2594) -> Seq Scan on pd (cost=0.00..14271.34 rows=69534 width=2554) -> Index Scan using pts_gix on pts (cost=0.41..192.43 rows=232 width=40) Index Cond: (pd.geom && geom) Filter: _st_intersects(pd.geom, geom)

As with all parallel plans, it is a nested loop, but that’s fine since all PostGIS joins are nested loops.

First, note that our query can be re-written like this, to expose the components of the spatial join:

EXPLAIN SELECT * FROM pd JOIN pts_100 pts ON pd.geom && pts.geom AND _ST_Intersects(pd.geom, pts.geom);

The default cost of _ST_Intersects() is 100. If we adjust it up by a factor of 100, we can get a parallel plan.

ALTER FUNCTION _ST_Intersects(geometry, geometry) COST 10000;

Can we achieve the same affect adjusting the cost of the && operator? The && operator could activate one of two functions:

  • geometry_overlaps(geom, geom) is bound to the && operator
  • geometry_gist_consistent_2d(internal, geometry, int4) is bound to the 2d spatial index

However, no amount of increasing their COST causes the operator-only query plan to flip into a parallel mode:

ALTER FUNCTION geometry_overlaps(geometry, geometry) COST 1000000000000; ALTER FUNCTION geometry_gist_consistent_2d(internal, geometry, int4) COST 10000000000000;

So for operator-only queries, it seems the only way to force a spatial join is to muck with the parallel_tuple_cost parameter.

Costing PostGIS?

A relatively simple way to push more parallel behaviour out to the PostGIS user community would be applying a global increase of PostGIS function costs. Unfortunately, doing so has knock-on effects that will break other use cases badly.

In brief, PostGIS uses wrapper functions, like ST_Intersects() to hide the index operators that speed up queries. So a query that looks like this:

SELECT ... FROM ... WHERE ST_Intersects(A, B)

Will be expanded by PostgreSQL “inlining” to look like this:

SELECT ... FROM ... WHERE A && B AND _ST_Intersects(A, B)

The expanded version includes both an index operator (for a fast, loose evaluation of the filter) and an exact operator (for an expensive and correct evaluation of the filter).

If the arguments “A” and “B” are both geometry, this will always work fine. But if one of the arguments is a highly costed function, then PostgreSQL will no longer inline the function. The index operator will then be hidden from the planner, and index scans will not come into play. PostGIS performance falls apart.

This isn’t unique to PostGIS, it’s just a side effect of some old code in PostgreSQL, and it can be replicated using PostgreSQL built-in types too.

It is possible to change current inlining behaviour with a very small patch but the current inlining behaviour is useful for people who want to use SQL wrapper functions as a means of caching expensive calculations. So “fixing” the behaviour PostGIS would break it for some non-empty set of existing PostgreSQL users.

Tom Lane and Adreas Freund briefly discussed a solution involving a smarter approach to inlining that would preserve both the ability inline while avoiding doing double work when inlining expensive functions, but discussion petered out after that.

As it stands, PostGIS functions cannot be properly costed to take maximum advantage of parallelism until PostgreSQL inlining behaviour is made more tolerant of costly parameters.

Conclusions
  • PostgreSQL seems to weight declared cost of functions relatively low in the priority of factors that might trigger parallel behaviour.

    • In sequential scans, costs of 100+ are required.
    • In joins, costs of 10000+ are required. This is suspicious (100x more than scan costs?) and even with fixes in function costing, probably not desireable.
  • Required changes in PostGIS costs for improved parallelism will break other aspects of PostGIS behaviour until changes are made to PostgreSQL inlining behaviour…

Categories: OSGeo Planet

gvSIG Team: Jornada sobre gvSIG en la Universidad de Extremadura (Cáceres – España) el 20 de septiembre

OSGeo Planet - Mon, 2018-09-10 11:30

El Colegio de Ingenieros Técnicos de Obras Públicas e Ingenieros Civiles de Extremadura, la Escuela Politécnica de Cáceres de la Universidad de Extremadura, la Academia CIVILEX y la Asociación gvSIG organizan una jornada gratuita en Cáceres (España) el día 20 de septiembre sobre geomática libre, en la que se presentará la ponencia “Geolocalizando las tecnologías de la información: oportunidades que ofrece la geomática para la modernización de la gestión”, y otra sobre la Suite gvSIG, con título “gvSIG Suite: soluciones en geomática libre para movilidad, infraestructuras de datos espaciales y SIG corporativo. Casos de éxito”.

También habrá dos talleres gratuitos, uno de introducción a la aplicación gvSIG Desktop y otro sobre scripting en gvSIG.

La jornada se celebrará en el Salón de Actos de la Escuela Politécnica de Cáceres de la Universidad de Extremadura.

El horario completo, el formulario de inscripción, y toda la información sobre las jornadas, podéis encontrarlos en el siguiente enlace.

Categories: OSGeo Planet

gvSIG Team: Taller gvSIG Desktop aplicado a Medio Ambiente en las 14as Jornadas Internacionales gvSIG

OSGeo Planet - Mon, 2018-09-10 09:23

Seguimos repasando los talleres que se impartirán durante las 14as Jornadas Internacionales gvSIG, que tendrán lugar en Valencia (España) del 24 al 26 de octubre. Otro de los talleres que se llevarán a cabo será el de gvSIG Desktop aplicado a Medio Ambiente. 

medio-ambiente

Las personas que trabajan en temas relacionados con el Medio Ambiente se enfrentan a diario con problemáticas que sólo pueden resolverse desde un punto de vista espacial. En este taller aprenderemos a manejar gvSIG y a aplicar sus herramientas de edición y geoprocesos utilizando casos reales como gestión de cultivos, usos del suelo, áreas protegidas, etc.

En las próximas semanas se facilitará en este mismo post toda la información sobre cómo inscribirse en este taller, que será gratuito, así como la cartografía a descargar para poder seguirlo.

En unos días se dará más información también sobre el día y hora en que se impartirá.

Si deseas asistir a las jornadas, te recordamos que el periodo de inscripción a las mismas ya está abierto, pudiendo realizarse el registro a través del formulario habilitado para ello.

¡No os perdáis este taller!

Categories: OSGeo Planet

GIScussions: Sales & Marketing 101 – a year on

OSGeo Planet - Sun, 2018-09-09 14:15
Sales & Marketing 101 workshop Lydia had fun developing her Value Proposition

It’s a year since Marc and I ran the first S&M101 workshop at FOSS4G Boston, since then I have run two more workshops at FOSS4G Europe in Guimaraes and FOSS4G 2018 in Dar es Salaam. In total 36 people have now attended the workshop which is amazing to me.

The two most recent workshops were fitted into a 4.5 hour slot rather than a whole day and that forced me to focus on the elements of the workshop that I felt had the most impact and tightening up the delivery. In Dar there were 15 delegates and we managed to finish only 5 minutes over time!

I wanted to share a brilliant summary of the key points of the workshop from Emmanuel Ng’wandu, a delegate in Dar:

“If you can count to five you will master the laws of sales and marketing.”

  1. Wear the customer’s shoes
  2. Find the pains (and the gains)
  3. 26 words
  4. The funnel of questions from open to closed
  5. Treat rejection like the rhinoceros (let it bounce off you and just carry on)
Sales & Marketing 101 workshop Hard at work on their Value Propositions

The feedback from the delegates has been very positive and I am looking forward to hearing more of their successes using the tools that I taught. If you want to find out more about the Sales & Marketing 101 workshop and how it can help you tighten  up your value proposition, get in touch.

A wall of value propositions A wall of Value Proposition Canvases
Categories: OSGeo Planet

BostonGIS: pgAdmin4 now offers PostGIS geometry viewer

OSGeo Planet - Sat, 2018-09-08 21:13

pgAdmin4 version 3.3 released this week comes with a PostGIS geometry viewer. You will be able to see the graphical output of your query directly in pgAdmin, provided you output a geometry or geography column. If your column is of SRID 4326 (WGS 84 lon/lat), pgAdmin will automatically display against an OpenStreetMap background.

We have Xuri Gong to thank for working on this as a PostGIS/pgAdmin Google Summer of Code (GSOC) project. We'd like to thank Victoria Rautenbach and Frikan Erwee for mentoring.

Continue reading "pgAdmin4 now offers PostGIS geometry viewer"
Categories: OSGeo Planet

Cameron Shorter: Child friendly conferences

OSGeo Planet - Thu, 2018-09-06 20:20
We have introduced a Child Friendly policy at the FOSS4G-Oceania conference as part of our "diversity" focus. We are quite proud of it, and think we have reached an effective balance between the competing priorities of:

  • High cost of dedicated childcare.
  • Variability and unpredictability of different aged children.
  • Retaining a professional conference environment.
  • Respecting needs of children, parents, and conference participants.
  • Making our conference accessible to a diverse audience, which includes those responsible for children.
Hopefully other conferences will draw inspiration from our work embrace something similar. This is what we have come up with:
Child Friendly ConferenceA child-friendly FOSS4G SotM eventFOSS4G SotM Oceania is aiming to be a child-friendly conference. This means we encourage parents to bring their children (still young enough to require minding) to the event, and for those children to be able to integrate with the community.How does this work?The conference Code of Conduct describes expected behaviour for everyone at the conference: https://foss4g-oceania.org/conference/code-conduct
Here are some additional principles for considering children.
As parents, we all know that it is impossible to expect our children to sit quietly for any length of time unless they are engaged with whatever is going on. As such, we request that parents:
  • Be prepared to move in and out of sessions as required by their children.
  • Occupy seats near exits in sessions.
  • Self-organise with other parents to manage children if there is a must see session or talk.
  • Be aware of the needs of other conference attendees, who have also paid to turn up and hear people speak.
  • Extend the principles of the conference Code of Conduct to children, both yours and others. Treat them respectfully, and avoid corporal punishment.
In kind, we request that everyone:
  • Be patient with children. They are our future leaders and learn by modelling what we do.
  • Be patient with parents. Children are not robots and don’t have ‘quiet now’ buttons.
  • Leave seats near exits free, for use by parents and children (see above - they may need to make quick exits)
  • Assist. If you see a child looking lost or distressed, get down to their level and ask them how you can help. Find a conference volunteer to hand over to.
Remember parents are doing the best they can. At the conference, if you have issues with children or parents, please contact the diversity team (as per the Code of Conduct).
If you feel that your child will not disrupt your presentation, you are welcome to bring them on stage (if they want to). Please organise this with your child ahead of time, so that you can arrange a carer or some other way of occupying your child while you speak.
For parents wanting tools to assist with helping their children get through a conference, there is a wealth of material that may be useful here: https://www.handinhandparenting.org/blog/.What does it cost to bring children?Children can attend for free. The catering cost is covered by the Good Mojo program. Please let us know as soon as you can if you are bringing your child(ren) so we can adjust numbers appropriately.
We all know that children can eat in amazing disproportion to their physical size, and we will cater for them as adults.What facilities are available for parents?The conference will aim to provide a ‘chill space’ - a refuge for parents and children at the venue. The University of Melbourne has fantastic outdoor spaces (please use them!); but Melbourne weather is not always friendly.
We are also looking into a specific space for breast pumping/feeding - however, breastfeeding mums are welcome to feed wherever they feel comfortable doing so (with respect also to the needs of your child).
While we will do our best to provide spaces away from the buzz, this is at present a work in progress - look out for updates!
Please use the foss4g-oceania-discuss e-mail list or join us on the Maptime Australia Slack to discuss with the FOSS4G organisers and coordinate with other conference parents. (Many of the organisers are also parents)

--//--
Special kudos goes to Adam Steer who has been the primary driver behind getting this initiative off the ground.

Categories: OSGeo Planet

SourcePole: The tale of a vector tile benchmark

OSGeo Planet - Thu, 2018-09-06 19:22

At the beginning there was a chat with @ortelius outside the Namenlos bar at FOSS4G in Bonn. Jef insisted in doing a benchmark of MVT server implementations at the next FOSS4G. With my experience from the FOSS4G WMS benchmarks, where I supported Marco Hugentobler in the QGIS team, I knew how much time such an exercise takes and was rather sceptical.

Two years later I was at a point in the development of t-rex, my own vector tile server, where I needed just this bechmark. I was replacing the built-in webserver with a new asynchronous high-performance webserver, but wanted to measure the performance win of this and other planned improvements. So I decided to implement an MVT benchmark before starting any performance tuning sessions. The dataset I wanted to use was Natural Earth, which is has a decent size for a world wide dataset. A few weeks earlier, Gretchen Peterson blogged about a Natural Earth MVT style she had done for Tegola, Jef’s tile server contestant.

natural-earth-quickstart

I got Gretchens permission to use it and so I started implementing the same map with t-rex. I gave me 5 days for benchmarking and refactoring t-rex, but at the end of day one, I had only about 5 of 37 layers finished. So I postponed my plan for a complete benchmark and used the partially finished tileset for my further work. My idea of performance tuning was to start a profiling tool on my code and look into the hot spots. But the map was so slow at the current state that it was clear that some database operations must be the reason. Instead of starting to profile code, I added a drilldown functionality to t-rex first. This command returns statistics for all tile levels at a set of given positions.

The returned numbers revealed a very slow layer called ne_10m_ocean, which turned out to be a single multipolygon covering the whole earth. So step two wasn’t about code tuning, but dividing polygons into pieces which can make better use of a spatial index. Remembering Paul Ramsey mentioning ST_Subdivide exactly for this case, I threw some SQL at the PostGIS table:

CREATE TABLE ne_10m_ocean_subdivided AS SELECT ST_Subdivide(wkb_geometry)::geometry(Polygon,3857) AS wkb_geometry, featurecla, min_zoom FROM ne_10m_ocean

The query for using the table with t-rex is a bit more complicated:

SELECT ST_Multi(ST_Union(wkb_geometry)) AS wkb_geometry, featurecla, min_zoom FROM ne_10m_ocean_subdivided WHERE min_zoom::integer <= !zoom! AND wkb_geometry && !bbox! GROUP BY featurecla, min_zoom

And the result? The creation of a vector tile went from several seconds far below one second. Lession learned: before tuning anything else, tune your data!

The rest of the week I’ve integrated the shiny new web server into t-rex which ended up (together with other new features like Fake-Mercator support) in a major new release 0.9.

In the meantime, my colleage Hussein finished the Natural Earth map, but I decided to relabel it from a benchmark to a t-rex example project. While completing the map I remembered a simpler map based on Natural Earth data, which we used for some exercises in our vector tile courses. The style needs only 5 vector tile layers and is therefore much easier to implement. I’ve simplified this style from Petr Pridal’s MapBox GL JS offline example a bit, resulting in a map, which still looks quite pretty:

mvt-benchmark-style

So I had a new base for an MVT benchmark, which was enough motivation to finish this project before FOSS4G Dar es Salaam. An important goal was to take as much work as possible away from other projects implementing this benchmark. So even starting the benchmark database is a single Docker command. During the conference I’ve talked to several developers and power users of other vector tile servers to give them a first hand introduction.

So finally, here is the MVT benchmark, ready for contributions. Have a look at it and let’s revive the benchmark tradition at FOSS4G 2019 in Bucharest!

Pirmin Kalberer (@implgeo)

Categories: OSGeo Planet
Syndicate content