OSGeo Planet

gvSIG Team: Towards gvSIG 2.5: Saving and loading labelling

OSGeo Planet - Wed, 2019-02-13 07:25

We continue with more novelties. In this case it is a simple functionality, but very useful. This new tool allows to save a labelling configuration, being able to recover it later to apply it.

Any GIS user knows that sometimes it can take a considerable time to define the characteristics of a labelling; a labelling configuration that can’t be recovered for other projects. And sometimes we may be interested in applying different types of labelling in a same project to the same layer.

This type of needs are covered with this new functionality that allows to save labelling configuration and recovering it whenever we need it.

Here you have a short demo of this functionality:


Categories: OSGeo Planet

Martin Davis: Better and Faster Interior Point for Polygons in JTS/GEOS

OSGeo Planet - Tue, 2019-02-12 21:03
A humble workhorse of geospatial processing is the ability to compute a point which is guaranteed to lie in the interior of a polygon.  In the OGC Simple Features for SQL specification (and hence in PostGIS) this is known as ST_PointOnSurface.  In JTS/GEOS it is called getInteriorPoint, for historical reasons [1].

Interior points for country boundaries
There are some important use cases for this capability:
  • Constructing a "proxy point" for a polygon to use in drill-down spatial query.  This has all kinds of applications:
  • Cartographic rendering including:
    • Creating leader lines
    • Placing labels for polygons (for which it is a quick solution but not necessarily a quality one.  More on this in a later post)
There is a variety of ways that have been proposed to compute interior points: triangulation, sampling via random or grid points, medial axis transform, etc.  These all involve trade-offs between location quality and performance [2].  JTS uses an approach which optimizes performance, by using a simple scan-line algorithm:

JTS Scan-Line Interior Point Algorithm
  1. Determine a Y-ordinate which is distinct to every polygon vertex Y-ordinate and close to the centre of the vertical extent
  2. Draw a scan line across the polygon and determine the segments of intersection
  3. Choose the interior point as the midpoint of the widest intersection segment
Locating a polygon interior point along a scan-line
The current code has been in the JTS codebase since the release of the very first version back in 2001.  It is elegantly simple, but is quite non-optimal, since it uses the overlay intersection algorithm.  This is overkill for the computation of the scan-line intersection segments.  It also has a couple of serious drawbacks: slow performance, and the requirement that the input polygon be valid.  These are not just theoretical concerns.  They have been noticed in the user community, and have caused client projects to have to resort to awkward workarounds.  It's even documented as a known limitation in PostGIS.
Thanks to Crunchy Data recognizing the importance of geospatial, we've been able to look into fixing this.  It turns out that a relatively simple change makes a big improvement.  The scan-line intersections can be computed via a linear-time scan of the polygon edges.  This works even for invalid input (except for a few pathological situations).
Interior points of invalid polygons(LH invalid polygon shows suboptimal point placement)
Best of all, it's much faster - providing performance comparable to the (less useful) centroid computation.  The performance results speak for themselves:

Dataset# polys# pointsTimePrev
timeImprovementWorld countries244366,95125 ms686 msx 27Land Cover64,090366,95178 ms6.35 sx 81
This has been committed to JTS.  It will be ported to GEOS soon, and from there should show up in PostGIS (and other downstream projects like QGIS, Shapely, GDAL, etc etc).

More Ideas

Some further improvements that could be investigated:
  • Use the centroid to provide the Y-ordinate.  This is probably better in some situations, and worse in others.  But perhaps there's a fast way to choose the best one?
  • Use multiple scan-lines (both vertical and horizontal)
  • Provide better handling of short/zero-width scan-line intersections
  • Support clipping the interior point to a rectangle.  This would provide better results for cartographic labelling

[1] JTS was based on the original OGC SFS specification (version 1.1).  The spec actually does include a method Surface.pointOnSurface.  The reason for the different choice of name is lost to time, but possibly the reasoning was that the JTS function is more general, since it handles all types of geometry.  (One of the design principles of JTS is Geometric Uniformity, AKA No Surprises.  Wherever possible spatial operations are generalized to apply to all geometric types. There is almost always a sensible generalization that can be defined, and it's often quite useful.)

[1a] Also, the acronym IPA is much better than the one for PointOnSurface.

[2] Apparently Oracle has decided to provide blazingly fast performance by simply returning a point on the boundary of the polygon.  Thus proving the maxim that for every problem there is an solution which is simple, fast, and dead wrong.

Categories: OSGeo Planet

gvSIG Team: Towards gvSIG 2.5: Topology

OSGeo Planet - Tue, 2019-02-12 11:11

Another important novelty of the next version of gvSIG Desktop is the incorporation of a topology framework.

The topology term refers to the spatial relationships between the different entities of a GIS. These special relationships turn into a set of rules (topological rules) that we can apply to our data. The topological rules that can be applied depend mainly on the types of data that we have. There are rules that are applied to polygon layers, point layers, line layers, to the relationship between a polygon layer and a point layer, etc.

gvSIG Desktop 2.5 will have a topology framework where we have already implemented a first set of rules, but it is prepared to grow unlimitedly, allowing as many new rules to be developed as necessary.

With this topology framework, gvSIG Desktop possibilities to edit and manage cartographic information are greatly increased.

At this video you can see its interface and how it works:


Categories: OSGeo Planet

gvSIG Team: Camino a gvSIG 2.5: Topología

OSGeo Planet - Tue, 2019-02-12 10:54

Otra de las más importantes novedades de la próxima versión de gvSIG Desktop es la incorporación de un marco de topología.

El término topología se refiere a las relaciones espaciales entre las distintas entidades de un SIG. Estas relaciones especiales se traducen en un conjunto de reglas (reglas topológicas) que podremos aplicar sobre nuestros datos. La reglas topológicas que se pueden aplicar dependen principalmente de los tipos de datos que dispongamos. Hay reglas que se aplican a capas de polígonos, otras a capas de puntos, otras a capas de líneas, otras a la relación entre una capa de polígonos y otra de puntos, etc.

gvSIG Desktop 2.5 traerá un marco de topología al que ya le hemos implementado un primer conjunto de reglas, pero que está preparado para crecer ilimitadamente, permitiendo que se desarrollen tantas nuevas reglas como sea necesario.

Con la incorporación de este marco de topología se amplían enormemente las capacidades de gvSIG Desktop para editar y gestionar la información cartográfica.

Para que veáis su interfaz y funcionamiento os dejamos con este vídeo:

Categories: OSGeo Planet

Gary Sherman: Leaflet Day 14 - Image Overlay and Wrap-up

OSGeo Planet - Mon, 2019-02-11 23:49
We end our series with a somewhat trivial, though interesting addition to our map and a special offer. Leaflet allows you to add an image that spans a specified region on the map. Here we add a picture of a little lost moose to the map. In this instance, it serves no purpose other than to show we can do it. The JavaScript code needed is: var imageUrl = "/images/calf_moose.png"; bounds = thetrail.
Categories: OSGeo Planet

gvSIG Team: Towards gvSIG 2.5: Virtual fields

OSGeo Planet - Mon, 2019-02-11 10:52

We advance one of the (many) novelties that the next gvSIG Desktop version includes and we think that it will be very useful. This new feature is the virtual fields support (also known as calculated or generated fields).

This fields contain values ​​that are calculated when executing a certain formula that the user has defined. And, therefore, their values ​​are automatically updated each time there is a change that affects that formula.

For example, in the next video, we can see how a virtual field with population density based on the values ​​of two other fields (area and population) can be calculated. When changing any of those two values ​​- in the video we can see how the population value is modified – we see how the density is calculated automatically again and it shows the new values.

Another example where the usefulness of these fields is shown is when we create a virtual field that calculates the area of ​​the geometries. Each time we modify a geometry graphically… the polygon area will be updated.

In addition, with the new and powerful formula generator that has been implemented in gvSIG Desktop 2.5 (and which we will discuss in the next post), the possibilities are practically unlimited.

Categories: OSGeo Planet

gvSIG Team: Camino a gvSIG 2.5: Campos virtuales

OSGeo Planet - Mon, 2019-02-11 09:29

Os adelantamos una de las (muchas) novedades que trae la próxima versión de gvSIG Desktop y que pensamos que va a resultar de muchísima utilidad. Se trata del soporte a campos virtuales (también conocidos como campos calculados o generados).

Este tipo de campos contienen valores que se calculan al ejecutarse una determinada fórmula que hayamos definido. Y, por tanto, sus valores se actualizan automáticamente cada vez que hay algún cambio que afecta a esa fórmula.

Por ejemplo, en el siguiente vídeo, vemos como creamos un campo virtual que calcula la densidad de población en función de los valores de otros dos campos: área y población. Al cambiar cualquiera de esos dos valores – en el vídeo vemos como modificamos la población – observamos como de forma automática se calcula de nuevo la densidad y nos muestra los nuevos valores.

Otro ejemplo que os puede permitir ver la utilidad de estos campos: crear un campo virtual que calcule el área de las geometrías. Cada vez que modifiquemos gráficamente una geometría…su área estará actualizada.

Además, con el nuevo y potente generador de fórmulas que se ha implementado en gvSIG Desktop 2.5 (y del que hablaremos en próximos post), las posibilidades son prácticamente ilimitadas.

Categories: OSGeo Planet

Gary Sherman: Leaflet Day 13 - Styling with a Plugin

OSGeo Planet - Sun, 2019-02-10 21:59
Today we’ll take a look at another plugin—one that allows us to interactively change they style of features on our map: Leaflet.StyleEditor. This illustrates how we can customize our map by changing styles on the fly and also serves as a starting point for even more customization. Installing and Referencing the Plugin The web page for the plugin provides information on installing it. This requires getting the css, js, and image files in the proper location, then referencing them in our HTML file:
Categories: OSGeo Planet

Stefano Costa: Reproducible science per archeologi

OSGeo Planet - Sun, 2019-02-10 21:00

Il 20 febbraio 2019, a Padova, tengo un workshop su Reproducible science per archeologi dentro il convegno FOSS4G-IT 2019. Avete tempo fino a mercoledì 13 febbraio per iscrivervi.

Cosa facciamo

Questo workshop guida i partecipanti nella creazione di una analisi di dati archeologici, secondo i canoni della reproducible science sempre più diffusi a livello internazionale e trasversale.

Utilizzando software di elaborazione ben noti come il linguaggio R e l’ambiente di programmazione RStudio, partiremo da alcuni dataset e affronteremo i vari passaggi analitici che vengono trasposti sotto forma di codice: è una procedura pensata per rendere esplicito il processo di ricerca con i suoi meccanismi di tentativi ed errori, secondo il principio della ripetibilità sperimentale.

I partecipanti potranno intervenire attivamente con me nella definizione del percorso e del prodotto finale del workshop, esplorando le pratiche più attuali della open science archeologica diffuse a livello internazionale.

Ci colleghiamo ad altri workshop svolti negli anni scorsi negli USA da Ben Marwick e Matt Harris.

Come iscriversi

Vi potete registrare fino al 13 febbraio 2019 su questa pagina http://foss4g-it2019.gfoss.it/registrazione

Per l’iscrizione è richiesto un pagamento di 10 € che vanno a coprire i costi organizzativi dell’evento – non serve a pagare il sottoscritto.

Letture e riferimenti

Per partecipare servirà avere installato R, RStudio e se possibile anche Git:

Di seguito qualche link a letture utili per prepararsi al workshop:

Categories: OSGeo Planet

GIScussions: Never Lost Again

OSGeo Planet - Sat, 2019-02-09 21:39

Thanks to Ed Freyfogle, I have just finished reading Never Lost Again by Bill Kilday. If you enjoy books about the history of tech and the rollercoaster of a startup in the early part of this century, this is a great read. For me it was a compulsive page turner, partly because I thought that I knew the story and of course I didn’t.

Kilday was the VP Marketing at Keyhole from just about the beginning and he remained with the company after they were acquired by Google and was the marketing lead for both Google Earth and Google Maps through the first part of their explosive growth. This a good chronology of the key events in the creation of Google’s massive geo-business and also provides some intriguing insights into the the backstory, personalities and the rivalries.

It’s quite amazing to remember that Google Maps is just 14 years old (launched on 8th Feb 2005). From a team of 30 odd people it has grown to over 5,000, there are over 1 billion users of Google maps each month.

Unless you are as old as me it is difficult to remember how clunky, slow and limited web mapping was before Google and of course the subsequent intersection with “smart” phones started by the iPhone. If you want a peak at what mapping was like before Google you can scroll through my Brief History of Web Mapping talk which I prepared for a post graduate class at Nottingham University.

Today there are only really 3 players left in the game – Google, the collective of businesses delivering services on top of OpenStreetMap (MapBox, Carto et al) and of course Esri – I discounted Apple because I don’t believe their heart is in it for the long term.

For the consumer who wants to find their way to a meeting, a restaurant, a hotel in almost any city in the world or wants to take a peek at a store front on StreetView, there is one solution that they are most likely to turn to – Google Maps. I wonder what the next 10 years will bring?

Categories: OSGeo Planet

Gary Sherman: Leaflet Day 12 - Create a Leaflet Map from QGIS

OSGeo Planet - Sat, 2019-02-09 17:08
Today we’ll use the qgis2web plugin to export from QGIS to Leaflet. The QGIS project, a location map for the third (in progress) Life on the Alaska Frontier novel, looks like this: Installing qgis2web The qgis2web plugin is installed like any other. Click on the Plugins->Manage and Install Plugins... menu item, click Not installed, and then find qgis2web in the list. Click the Install plugin button to complete the install.
Categories: OSGeo Planet

Gary Sherman: Leaflet Day 11 - Plugins

OSGeo Planet - Fri, 2019-02-08 14:37
At its core, Leaflet is designed to be lightweight. That being said, there are hundreds of third-party plugins available to extend and enhance the functionality of your web maps. Today we’ll illustrate adding a plugin to our map from Day 6. The L.Control.ZoomBar plugin adds a custom zoom control that allows us to draw a box around the area we want to zoom to, as well as adding a Home button to return to the initial map view.
Categories: OSGeo Planet

gvSIG Team: Camino a gvSIG 2.5. Nuevo visor de imágenes mejorado

OSGeo Planet - Thu, 2019-02-07 07:02

Entre las numerosas novedades que trae la próxima versión de gvSIG Desktop, hay algunas que sin tener el impacto funcional de otras como el diseñador de informes o el marco de topología, aportan una mejora funcional considerable. Es el caso del nuevo visor de imágenes, que podrá ser utilizado desde cualquier herramienta que lo requiera, como por ejemplo el hiperenlace a imágenes.

El anterior visor simplemente mostraba la imagen enlazada a su tamaño real. Con este nuevo visor podemos visualizar la imagen escalada al tamaño de la ventana, agrandarla o reducirla e incluso girarla.

Se trata de un visor que además se ha implementado de forma que puedan añadirse nuevas herramientas si fuera necesario.

Os dejamos con un pequeño vídeo que muestra el considerable cambio respecto al anterior visor. Pequeñas mejoras que hacen más grande a gvSIG Desktop.

Categories: OSGeo Planet

gvSIG Team: Towards gvSIG 2.5. New improved image viewer

OSGeo Planet - Thu, 2019-02-07 07:00

Among the many novelties that the next gvSIG Desktop version brings, there are some of them that, without having the functional impact of others such as the report designer or the topology framework, provide a considerable functional improvement. This is the case of the new image viewer, which can be used from any tool that requires it, such as the hyperlink to images.

The previous viewer simply showed the image in its original size. With this new viewer users will be able to see the image scaled to the size of the window, enlarge or reduce it and even rotate it.

This viewer has been implemented so that new tools can be added if necessary.

Here you have a short video where this considerable change is shown. Little improvements that make gvSIG Desktop greater.

Categories: OSGeo Planet

Martin Davis: Joining Crunchy Data to work on PostGIS

OSGeo Planet - Wed, 2019-02-06 22:48
I'm happy to announce that I am taking a position with Crunchy Data as a Senior Geospatial Engineer.  I'm working alongside fellow Victorian geospatial maven extraordinaire Paul Ramsey, as the core of a proposed Geospatial Data Centre of Excellence.

Our mission statement is simple:  make PostGIS bigger, better, faster!

  • Bigger - more spatial algorithms and functions
  • Better - enhance existing functionality to make it easier to use, more powerful, and more robust
  • Faster - keep looking for algorithmic optimizations and ways to use the power of Postgres to make spatial processing faster

A lot of this work will involve enhancements to the core GEOS geometry library.  Part of the goal is to keep JTS and GEOS aligned, so this should produce a nice boost to JTS as well.
Having been lurking in the background for many years now, I'm stoked to be (finally) able to work directly on PostGIS.  And I'm excited to be part of the Crunchy team. They have some of the leading Postgres experts in-house, so I'm expecting that it will be a great learning experience.  And their client list promises to expose us to some fascinating large-scale use cases for spatial data processing, which can only be good for the power and robustness of PostGIS.
I'm also looking forward to re-engaging with the geospatial open source community, and learning more about the (even bigger) open source Postgres community.  Great things lie ahead!

Categories: OSGeo Planet

Gary Sherman: Leaflet Day 10 - Adding a Link to a Popup

OSGeo Planet - Wed, 2019-02-06 16:21
In this post we’ll add a link to the towns popup that will display the satellite view on Google Maps. The API for working with Google Maps URLs can be found here: https://developers.google.com/maps/documentation/urls/guide. To add a link to the town name in the popup, we modify the JavaScript code that creates the towns layer: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 var towns = L.
Categories: OSGeo Planet

EOX' blog: Sentinel-2 cloudless 2018

OSGeo Planet - Wed, 2019-02-06 16:03
Good news everyone, there is an updated version of the Sentinel-2 cloudless map available! After being first in having processed the whole Sentinel-2 archive to create a cloudless mosaic for 2016 it was time to use our experience and improve […]
Categories: OSGeo Planet

Fernando Quadro: Dados do IPHAN disponibilizados com o GeoServer

OSGeo Planet - Wed, 2019-02-06 10:30

O Instituto do Patrimônio Histórico e Artístico Nacional (IPHAN) é uma autarquia federal do Governo do Brasil, criada em 1937, vinculada ao Ministério da Cidadania, responsável pela preservação e divulgação do patrimônio material e imaterial do país.

Tem a função de defender e favorecer os bens culturais do país proporcionando sua existência e usufruto para as gerações presentes e também futuras. Buscando a preservação dos tesouros da cultura nacional.

O IPHAN anunciou que disponibilizou seu acervo de dados geográficos nos formatos WMS e WFS. Os dados foram publicados utilizando o servidor de mapas Geoserver.

Se você precisa utilizar dados do IPHAN, independente do propósito, sabia que agora ficou mais fácil, basta consumir os serviços em:


Categories: OSGeo Planet

gvSIG Team: Camino a gvSIG 2.5. Plugin para convertir una capa vectorial 2D a 3D a partir de un MDT

OSGeo Planet - Wed, 2019-02-06 06:25

Se ha publicado un nuevo plugin para instalar en gvSIG que permite convertir una capa vectorial (formato SHP) 2D a 3D a partir de un MDT que ocupe la misma zona.

El plugin estará disponible para la versión 2.5 final, pero ya puede descargarse sobre la última versión final (gvSIG 2.4).

Esta nueva funcionalidad, disponiendo de una capa vectorial en formato .SHP (ya sea de puntos, líneas o polígonos) en 2D, y de un Modelo Digital de Terreno de la misma zona, convierte la capa vectorial 2D en una capa 3D, tomando las coordenadas Z de dicho ráster, y asignándolas como coordenada Z a los elementos de la capa vectorial.

Para instalar este plugin, se debe entrar en el menú Herramientas -> Administrador de complementos, y seleccionar la opción “Instalación por URL”. Conectando a la URL por defecto se debe seleccionar la categoría “Geoprocess” donde habrá que marcar el paquete “Set Z from raster“. Instalándolo y reiniciando gvSIG aparecerá el geoproceso en la Caja de herramientas (menú Herramientas->Geoprocesamiento), en el apartado Scripting->Transformación.

Para ejecutar este nuevo geoproceso solo se necesita insertar como parámetros la capa vectorial 2D y la capa ráster.

Categories: OSGeo Planet
Syndicate content