OSGeo Planet

gvSIG Team: Scripting en gvSIG: Integración con Git

OSGeo Planet - Fri, 2018-04-13 08:41

Desde la versión gvSIG 2.4, hemos aumentado el número de herramientas que facilitan el desarrollo de las extensiones desde el Editor de Scripts. Una de estas nuevas herramientas es la integración de Git con el Editor. Esta integración nos facilitará llevar un control de versiones para las extensiones que estemos desarrollando.

Desde la Asociación gvSIG utilizamos principalmente esta integración para el desarrollo de las extensiones que tenemos publicadas en gvSIGAssociation en Github.

Para los que no lo conozcan, Github es una plataforma basada en Git que se utiliza para mantener un seguimiento de desarrollos de programación. Nos permite tener repositorios de manera gratuita (siempre y cuando sean públicos)  y almacenar nuestro código, así como, mantener un historial de las diferentes versiones que desarrollemos. Por lo que si estás interesado en compartir un proyecto y tenerlo almacenado en la nube con seguridad, Github puede ser un buen sitio donde empezar.

El modo de utilizar desde gvSIG sería sencillo. Vamos a explicar un ejemplo paso a paso.

  • Las funcionalidades de Git/Github son muchas y extensas, en este ejemplo solo vamos a ver lo que sería modificar un repositorio que nos pertenece desde gvSIG.

Para empezar, tenemos un repositorio ya inicializado en Github, como en este ejemplo el proyecto gvsig-desktop-scripting-ConvertFieldToDate  En el caso de otros desarrolladores podrían tener estos repositorios en sus propios perfiles, asociados a sus empresas, privados, etc. Si eres nuevo en Github  o Git, hay muchas guías por Internet que te pueden ayudar a iniciarte.

Primer paso sería ir a la web del proyecto en Github y copiar el enlace al repositorio donde pone “Clone or Download”:

Y clickar sobre el “Copiar el portapapeles”

Siguiente paso sería irnos al Editor de Scripts en gvSIG, y crear una carpeta en nuestro directorio. En este caso vamos a crearla dentro de “Addons” con el mismo nombre que tiene el proyecto “ConvertFieldToDate”.

Siguiente paso, seleccionamos la carpeta en nuestro árbol de proyectos y buscamos el módulo de Git.

Para empezar, vamos a clonar los ficheros que ya tenemos en Github para trabajar en nuestro ordenador. Seleccionaremos la opción “Clone” y introduciremos el enlace copia de la web anteriormente. Siempre con cuidado, teniendo la carpeta del proyecto correcta seleccionada.

Y después de ejecutarse:

Si vamos a la carpeta del proyecto podemos ver que aún está vacía, pero ya hemos creado un enlace entre esta carpeta y su análoga en Github.

Vamos a acceder al panel que nos va a permitir manejar la mayor parte de opciones de Git. Teniendo la carpeta siempre seleccionada, vamos a Git -> Show Changes

Podemos ver que nos aparecerá un nuevo tab abajo con las diferencias que existen entre nuestro repositorio local, y nuestro repositorio remoto en Github, además de un menu con muchas otras opciones.

Para empezar, queremos traernos a nuestra carpeta que está actualmente vacía nuestros ficheros. Para ello clickaremos sobre el botón “Update all” y clickaremos “Yes” a la pregunta “Are you sure to overwrite files in the workspace?”. Esto descargará los ficheros de la nube a local. Cuidado si ya dispones de algún fichero en esta carpeta ya que con esta operación podría ser eliminado:

Una vez concluida la operación, si actualizamos el árbol de proyectos “:

Veremos que ya aparece un “+” delante de “ConvertFieldToDate” y comprobamos que tiene los ficheros:

En este caso, queremos corregir una serie de imports en el fichero “convertFieldToDate”, por lo que abrimos el script, realizamos los cambios y guardamos el script.

Una vez realizados presionamos el botón de refrescar  en la ventana anterior.

Veremos que nos aparece que el fichero ha sido modificado y que es diferente al que está en el repositorio online.

Si seleccionamos uno de los cambios de la lista y apretamos en el botón de “Show differences”, podremos comprobar los cambios que ha sufrido el fichero. En este caso, la eliminación de dos líneas de código:

Para subir los cambios al repositorio online primero tenemos que hacer un commit de ellos. Podemos selecionar primero si queremos que suba todos o solo los de los ficheros seleccionados. Presionaremos el botón de Commit:

Escribiremos un mensaje que describa el problema solucionado:

Una vez realizado el commit, tendremos que subir los cambios realizados al repositorio online. Para este paso hay que usar el botón de Push.

Nos pedirá el usuario y contraseña del repositorio.

Una vez finalizado aparecerá un mensaje de “OK”

Si vamos a la web podremos comprobar que el commit se ha realizado correctamente.

 

Y podemos visualizar los cambios de este commit:

Esto es una breve introducción de la funcionalidad de Git en gvSIG.

Esperemos sacar más documentación próximamente pero para cualquier duda como siempre podéis preguntar en las Listas de Desarrollo

 

Categories: OSGeo Planet

From GIS to Remote Sensing: Cloud Masking, Image Mosaic, and Land Cover Change Location

OSGeo Planet - Fri, 2018-04-13 08:20
This tutorial is about the use of SCP for the assessment of land cover change. It is recommended to complete the Tutorial 2: Cloud Masking, Image Mosaic, and Land Cover Change Location before this tutorial.

The purpose of this tutorial is to locate land cover change over one year (between 2017 and 2018), using free Sentinel-2 images.

Read more »
Categories: OSGeo Planet

Martin Davis: The world needs a new flavour of SOSS!

OSGeo Planet - Thu, 2018-04-12 18:29
Yes, you don't what the acronym SOSS means, because I just made it up. SOSS stands for Standard Open Simple Spatial format.

It's crazy that in the 21st century the most common de facto standard spatial format is based on 30-year old technology, is proprietary, and has silly limitations such as 11-character uppercase attribute names.

I'm talking, of course, about shapefiles.

Surely we can do better than this?!

Now there are actually a few things that shapefiles get right. For instance, the shapefile's simplistic tabular data model gets two full marks for being - simple and tabular! Hierarchical data models are very cool and highly expressive, but overkill and too complex for 80% of the use cases out there.

Another useful feature of shapefiles is that they store floating point data with full precision - i.e. in binary. Representing binary floating point numbers as textual decimal values is inherently lossy, and causes all kinds of subtle and annoying problems. (I'm always surprised that this doesn't crop up more often as a serious limitation of GML.)

So what are the current leading contenders for a SOSS format? Here's an opinionated list, with pros and cons


FormatProConShapefiletabular, lossless numericsproprietary, antiquated, limitedGMLcomplex to model and parse, lossy numerics, poor schema handlingopen, flexibleKMLproprietary, lossy, limited attribute handling, designed for presentationrelatively simple, well documentedGeoRSSnot appropriate as a full-featured SOSS, lossyGeoJSONtoo tied to Javascript, lossy, no schema standardYAMLneeds a spatial profile
Conspicuous by its absence on this list is XML. In fact XML is a meta-format, not a format. To utilize XML would require defining an appropriate profile (which would need to be highly restricted to meet the criteria of simple). The major drawback of XML is that specifying the profile almost inevitably drags one into the mind-bending hell of XML Schema. (There are other schema languages, such as RelaxNG, but they involve similar complexity and have even less traction).
There's also more esoteric formats such as NetCDF, but it fails the simplicity test, and it's unclear how well it supports Geometry types.



Categories: OSGeo Planet

gvSIG Team: Correction of shapefiles with errors in gvSIG Desktop

OSGeo Planet - Thu, 2018-04-12 12:45

Since gvSIG 2.3, when a shapefile has corrupt geometries it is loaded in the Table of Contents (ToC) but not in the View, but we can have the option to correct that layer. One of the reasons is that if the layer with corrupt geometries was loaded, and the user edited that layer, saving editing with those errors it could cause problems and lose data. To avoid this the decision has been to load it in the ToC but not to load the geometries, and inform the user.

If after adding the layer in the View we see that it is added in the ToC but it is deactivated and marked with a red exclamation point, and an error message appears in the lower left part of the screen, it is a sign that it is a layer with errors.

It may happen that the layer has been loaded without problems in the view initially, but if all the records are not read, there has been any error. Then when performing any subsequent operation (it can simply be a zoom) the corrupted geometry is detected and the layer is deactivated, showing the red exclamation mark.

In order to see the details of the error we will activate layer, and with the secondary button of the mouse we will select “Show errors”.

In the new window that is opened we can have information about which geometries are corrupt, with a message similar to this: “There were errors loading the feature ‘x’ from ‘[layer_name]'”, where “x” will be the geometry number (we must take into account that the first geometry is “0”), and “layer_name” will be the name of our layer.

This window will also indicate what type of error is, and what we should do. The errors can be related to the number of vertexes of a line or a polygon for example, if we have a line with an only vertex or a polygon with two vertexes, that is not correct. In that case we will see a message similar to this: “Invalid number of points in LinearRing (found 3 – must be 0 or> = 4).”

It can also give us instructions about if it is possible to solve it. For example, the message “Check ‘Fix LinearRings and LineStrings’ in the shape’s properties of the add layer dialog to try fix it” may appear.

If we get this message, we can try to correct the layer. From the previous window we will access to its properties by clicking on the lower button “_View_properties_of_data_source” (or its corresponding translation).

Note: For the moment in gvSIG 2.3 and 2.4 this option is only available for shapefiles. For the rest of vector formats it will be necessary to delete the layer at the View and add it again, and then access to its properties from the “Add layer” window.

In the layer properties window we will access to “Advanced” tab and we will follow the steps that the error message indicated.

There will be several options to fix the error.

Correction of geometries when they have less points than needed

If the error message inform us about which geometry was corrupt, and it indicates us to mark the “Fix LinearRings and LineStrings” option, at the “Advanced” tab we will mark it, and we will accept, and in the View we will click with the secondary button on the active layer and we will press “Reload”. In this way we will see the elements of the layer in the View, and duplicated vertexes will be added at the end of the geometries that had less points than needed.

Correction of geometries with another type of error

If we have corrected a geometry that had less points than needed, we said that gvSIG duplicates the necessary points for the geometry to load it well, but after being fixed automatically it can remain a polygon with three points where two of them coincide. In that case we may want to know why the geometry was wrong and correct it if it’s possible.

When we have seen the initial information of the error, the message has indicated which geometry was corrupt. We would then open the attribute table, and we would look for the register indicated in the error. As the records start from “0” in the code, and in the attribute table they starts from “1”, we will have to add “1” to the record indicated in the error. For example, if it indicated the geometry number “5” we will look for the element “6” of the attribute table.

After selecting the element we will make a Zoom to the selected feature, and we will see the corrupted geometry on the View. The next step will be to put the layer in editing mode and correct the geometry.

Depending on the initial error message, we will try to correct it in one way or another. Some of the possible ways to correct the geometries would be the following:

  • If it is a polygon layer and we have a geometry formed by two points, we can delete it and create a new polygon or we can add more vertexes. The same if it is formed by a point.
  • If it is a polygon layer where we have a multipolygon geometry, and one of the polygons of of that multipolygon is really a point or a line, we would use the “Explode geometry” tool first and we would delete the excess parts or we would correct them.

Once the geometries are corrected, we won’t be able to save the layer that we are editing. The application will force to export to a new layer when finishing editing. With this, the new layer will be loaded correctly on the View.

Elimination of corrupt geometries

If we want to remove the corrupt geometries directly, we will mark the “Load corrupt geometries as null” option at the “Advanced” tab. Then we will accept, and on the View we will click with secondary button on the active layer and we will press “Reload”. In this way we will see the elements of the layer in the View.

The next step will be to put the layer in editing mode. Then we will open its attribute table, and we will go to the Table->Properties menu. We will see the different fields of the layer at the new window. We will mark the GEOMETRY field as visible, and we will accept later. So, if we go to the last column in the table we will see that it is the field that contains the geometry.

The next thing is to put the GEOMETRY field active and sort it in descending order, so that at the top we will see the records that do not have geometry (the value at GEOMETRY field is empty).

The corrupt geometries will be among the records where the GEOMETRY field is empty, but we must take into account that if we have more than one record with the GEOMETRY field empty, it is possible that any of these geometries is correct. For example, if we have worked with a database previously, it’s easy to have null geometries on it, so exporting that database to SHP, those records would be kept and they wouldn’t be an error really. If we only have a null geometry in the table, it will be the one with the error.

By having the layer in editing mode, we could select the records that we want to delete in the table directly, and we would click on the “Remove row” button (also available in the Table menu), which would eliminate the desired geometries.

Finally we will finish editing, where the application will force us to save it as a new layer on disk. In this way we will have the corrected layer, without the geometries that were corrupted.

 

Categories: OSGeo Planet

GIScussions: An address is …

OSGeo Planet - Wed, 2018-04-11 18:34

postage-perspectives

This week a headline in the Telegraph caught my eye:

Postcodes ‘no longer fit for purpose’ as study shows most people have one which does not go directly to their door

The article goes on:

Postcodes are “no longer fit for purpose” as three in four people in the UK have an address that does not lead directly to the door of their home or business, according to new research.

British technology company What3words has said that the current address system in the UK needs to change after it found that people are struggling more than ever to get their parcels delivered to the right location.

A survey carried out by the company showed that out of 1,000 people in the UK, 74 per cent said deliveries, services and visitors struggle to find their homes or businesses; equating to almost 46 million people nationally.

And now the revolutionary firm is hoping to stop the delivery nightmare with their global grid system.

First up I should congratulate the marketing and PR team at what3words for getting this piece published in a so called quality daily paper. Those of you who know me and have read some of my previous posts on location codes will know that this would be a red rag for me, and despite my best efforts I couldn’t resist the bait.

Bailar pegados

Let’s start by deconstructing the premise of this puff piece.

“three in four people in the UK have an address that does not lead directly to the door of their home or business”

Well that’s an enormous jump from a postcode to an address! This is either a deliberate attempt to mislead by conflating addresses with postcodes or it is just sloppy writing/editing or most probably a bit of both.

Assuming the wording should have been “three in four people have a postcode that does not lead directly to the door...” then it is stating the obvious as most postcodes refer to an average of 15 properties with a small number applying to individual commercial properties (or even a floor in a large multi-tenanted block). Coordinates are assigned to the “middle house” within a postcode group, this is better explained by EDINA (slightly out of date with reference to Address-Point)

Code Point is derived from Gridlink and provides a National Grid reference for each unit postcode in the United Kingdom to a resolution of 1 metre. Each Grid Reference point is known as the Code-Point Location Coordinate (CPLC).

To generate each CPLC, the mean position of each delivery point in a unit postcode is calculated and the CPLC is allocated the ADDRESS-POINT (an Ordnance Survey Gridlink product) coordinates which fall nearest to this mean.

Although each postcode is allocated a grid reference, the grid reference may be shared by more than one postcode. For example, if a block of flats ( a Vertical Street) contains more than one postcode, each postcode will be allocated with the same grid reference as its CPLC.

So on that basis only 7% of houses have a postcode that leads to their front door. But miracle of miracles (and it pains me to praise the Royal Mail) according to the BBC News 99.87% of mail is delivered correctly. So clearly the fact that postcodes do not identify individual front doors does not prevent the mail being successfully delivered.

“the current address system in the UK needs to change after it found that people are struggling more than ever to get their parcels delivered to the right location”

Really? That’s not my experience, why would the mail services be able to successfully deliver mail but not the parcel services? In the last 5 years we have had one parcel delivery which went astray and that turned up a week or so later. I would have thought that most large scale home delivery firms will be using a full address product such as Ordnance Survey’s AddressBase Premium which provides accurate coordinates for every address in GB (yes, I know, now I’ve praised RM and OS!).

“A survey carried out by the company showed that out of 1,000 people in the UK, 74 per cent said deliveries, services and visitors struggle to find their homes or businesses; equating to almost 46 million people nationally”

Now I really wonder what the author of the piece, or her editor, were thinking of (or smoking)? 46 million people have a struggle to be found! This is difficult to believe, to say the least (I had to rephrase the first and second drafts of this paragraph to remove the expletives). Surely one or two (or several more) of the people I know or you know would have mentioned their struggle to be found? Is there a conspiracy going on to keep this national scandal a secret? Why do we not know that 46m people are struggling to be found? Should we call in the emergency services to help them get found or is it time to mobilise the army?

Do they “struggle” every day, every week, once a month, once a year, once in the last 10 years? I have a ‘thing’ about headlines based on surveys where the questions asked and raw data are not available. These pseudo scientific surveys are often carried out on behalf of companies promoting the need for their products or services or by campaigners seeking to make a point by asking ‘loaded’ questions. Of course what3words could easily shut me up by providing the raw data behind their survey and if I have mischaracterised their survey I will happily write a grovelling retraction.

“And now the revolutionary firm is hoping to stop the delivery nightmare with their global grid system”

You’ve got to hand it to the what3words PR team, they have played a blinder. We have now escalated to a “delivery nightmare” 46 million people are waking up with cold sweats worrying whether their Amazon or ASOS delivery is go missing – I recommend cocoa before bed along with a subscription to Prime.

A thought – 3m squares may not be the answer to the delivery nightmare. About 17% of homes are flats which means that the from doors are both inside the main entry point and stacked vertically above each other which will still leave the poor delivery person struggling to find the front door from his 3 word code. That’s 1 in 6 or 10 million people still having sleepless nights because drivers are using 3 word codes instead of addresses.

Enough! A code is not an address

 

BS

A location code (whether it is a postcode or based on 3 words or some other algorithm) is a proxy for coordinates it is not an address or even a proxy for an address (you might argue that a postcode is an aggregate of multiple addresses).

Addresses are an important component of our social, democratic, economic and digital infrastructure. I am grateful to my friends at GeoPlace for some useful quotes on why addresses matter

“Urban development, economic growth and the provision of basic services are inextricably linked to the existence of sound address infrastructures in urban and rural areas alike.”

Anna Tibaijuka, Tanzanian minister of lands, housing and human settlements development

Addresses are a component in establishing legal identity (which would suggest that they need to be allocated by a legal authority)

“Four billion people are excluded from the rule of law, as the lack of a legal identity often prevents them from enjoying their rights as citizens. Setting up an addressing system is the first step towards tackling that issue.”

Commission on Legal Empowerment of the Poor, United Nations Development Programme

The UPU may have an axe to grind on this topic but once again they are suggesting that addresses need official authentication.

Addresses appear to be a key element in aiding the delivery of policies at national and international levels in support of the Millennium Development Goals particularly with regard to governance, rule of law, poverty reduction, disease prevention and the provision of basic services such as electricity, sanitation and water.

Addressing the World – an address for everyone. Universal Postal Union 2012

Let me be clear here, I am not anti what3words. If delivery firms think that licensing a 3 word code system as a proxy for coordinates will help them to deliver parcels then go for it. If their customers want to remember their 3 word code rather than their address because that will prevent their “nightmare struggle” to get deliveries then that’s wonderful, I’m all in favour of getting a better night’s sleep. And if Mercedes think that 3 words will help their owners’ in car navigation system, then good luck to them (personally I would focus on beefing up the voice recognition to enable it to detect street addresses, because there aren’t many Mercedes in places without an address system).

What infuriates me (understatement) is the knowing endeavour to conflate a location code, a proxy for coordinates with no other context or hierarchy, with an address when it clearly is considerably different. Oh and add in the use of a faux survey to assert that there is a “delivery nightmare” in the UK which they (and only they?) can solve.

An address is …

Let’s try to define what constitutes an address and why a 3 word code is not an address. Rob Walker, a past chair of the Association for Geographic Information, and something of a super nerd on addressing and address standards submitted a paper to the “ISO Workshop on address standards: Considering the issues related to an international address standard”  (2008) in which he suggested that (my italics and bold below)

An address is a label used to reference a geographical object such as a property, for the purpose of identification and location, through the use of identifiable real-world objects. Addresses are widely used in government, commerce and everyday life as descriptions of where places are, and people are often referenced by their home address. The most common form of address is the postal address, used for the delivery of mail, where the address is essentially a routing instruction leading to the property.

It’s those real world identifiable objects that give an address context and make it human readable.

Addresses are used for a range of purposes including

  • Delivery organisations, to identify delivery points;
  • Other service organisations, to identify the location of service delivery points;
  • People, to uniquely identify themselves via their place of residence;
  • Governments, to identify where people live and work, for planning public services;
  • Taxation authorities, to levy taxes on people and organisations;
  • Emergency services, for deployment and contingency planning;
  • Land authorities, for property registration and transactions;

Rob outlines a general structure for addresses

Addresses generally follow a simple structure incorporating the names or numbers of a nested set of spatial units:

  • The name or number of a sub-unit within a building or property;
  • The name or number of a building or property within a street;
  • The name of a street;
  • The name of (one or more) geographic areas (locality, town, county etc);
  • The name of a country.

Part of such an address is often abbreviated by a code (e.g. a postcode or area code).

The exact definition of each of these levels in an address usually varies from country to country, and are often defined in national standards. (e.g. BS 7666 in the UK).

17 West Street, Epsom, Surrey gives me an immediate idea of where Astun’s office is, even if I don’t know Epsom well I probably have an idea of where Epsom is in relation to where I live. Adding the postcode doesn’t help me with that context but it usually works with the maps app on my phone. On the other hand doing.random.manliness doesn’t even tell me that the address is in the UK but it did give me a laugh

w3w has our office address down as doing.random.manliness .. more or less where the gents is. In fairness, you just don't get the same comedy value with KT18 7RL

— Daniel Ormsby (@ormsbydaniel1) April 9, 2018

 Apparently If the Queen wanted a package delivered to her front door, she’d just have to reference ‘rocks.skin.grand’.

I am sure there are lots of slightly risqué 3 word combinations that we can all search for but please let’s not kid ourselves that HRM is going on line and ordering her pizza to be delivered to her sleaze-word address. 

It’s probably time to get the tin hat out as the flack comes flying in

Categories: OSGeo Planet

Jackie Ng: Some patches and fixes of MapGuide Open Source 3.1.1

OSGeo Planet - Tue, 2018-04-10 13:10
Barely a week after releasing MapGuide Open Source 3.1.1, I've added some patches that may be of use for some of you out there.

Firstly, I've uploaded a newer release of Fusion that includes a fix for an issue with Google Maps support discovered after the 3.1.1 release. If you downloaded Fusion with the updated Bing Maps support in the past, this release is packaged in the same fashion: Download, extract and overwrite the existing Fusion installation.

Secondly, for those that use Oracle and have been clamoring for 12c support. I've uploaded experimental King Oracle FDO provider dlls that have been built against the Oracle 12c instant client SDK. These providers have not yet been fully tested against Oracle 12c and has been made available for you to provide any feedback or report any issues regarding 12c support.

If either one of these patches is of interest to you, grab them from the updated 3.1.1 release notes page.
Categories: OSGeo Planet

Fernando Quadro: Live GeoCast #02: Big Data, Data Science e Open Data

OSGeo Planet - Mon, 2018-04-09 14:29

Prezados leitores,

Devido ao grande sucesso última live realizada a 2 semanas com grandes nomes do cenário GIS, resolvemos dar seguimento ao projeto com mais uma live e uma grande novidade: a criação do canal GeoCast Brasil no YouTube (clique aqui pra ver o vídeo de apresentação).

À próxima livre será realizada na próxima terça-feira, dia 10/04 às 20:30, e terá como tema “Big Data, Data science e Open Data: colocando os pingos nos ‘is’“.

Não percar essa oportunidade, realize já o seu agendamento através do vídeo abaixo.

E não esqueça de se inscrever no canal, e se puder ajudar a compartilhar e divulgar essa Live que ocorrerá amanhã!

Te espero lá!

Categories: OSGeo Planet

gvSIG Team: gvSIG aplicado a Medio Ambiente. Tema 4: Geoprocesos

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

Ya tenéis disponible el Tema 4 del curso gratuito gvSIG aplicado a Medio Ambiente. En este tema conoceremos y aprenderemos a utilizar los geoprocesos vectoriales disponibles en la caja de herramientas de gvSIG.

imagen.pngEstamos ya en el ecuador del curso y aprender a manejar los geoprocesos nos permitirán pasar de un nivel básico a un nivel más avanzado de gvSIG, por lo que os animamos a participar y a aprender junto con el resto de compañeros y compañeras.

http://www.geoalternativa.com/gvsig-training/course/view.php?id=3&section=6

Además, en el foro de esta semana podréis compartir vuestras impresiones acerca del inicio de los SIG. Para ello tenéis disponible un enlace a un vídeo muy interesante sobre cómo eran los Sistemas de Información Geográfica en 1967.

Como siempre, si tenéis dudas, os animamos a escribir en la lista de usuari@s de gvSIG: http://osgeo-org.1560.x6.nabble.com/gvSIG-usuarios-f4118557.html

 

Categories: OSGeo Planet

PostGIS Development: PostGIS Patch Releases 2.2.7, 2.3.7, and 2.4.4

OSGeo Planet - Fri, 2018-04-06 00:00

The PostGIS development team is pleased to provide bug fix release 2.2.7, 2.3.7 and 2.4.4 for the 2.2, 2.3, and 2.4 stable branches.

Please note that PostGIS 2.2 is reaching end-of-life and there will be one more patch release later in the year for it. If you have not upgraded to at least PostGIS 2.3, we encourage you do so before we discontinue support for PostGIS 2.2.

View all closed tickets for 2.4.4, 2.3.7, 2.2.7.

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

2.3.7

2.4.4

Categories: OSGeo Planet

Just van den Broecke: Emit #4 – Push or Pull?

OSGeo Planet - Thu, 2018-04-05 21:17

This is Emit #4, in a series of blog-posts around the Smart Emission Platform, an Open Source software component framework that facilitates the acquisition, processing and (OGC web-API) unlocking of spatiotemporal sensor-data, mainly for Air Quality and other environmental sensor-data like noise.

A lot of things have happened with the project since the last Emit #3 (feb 2018 already). The main news is that the SE Platform is now being migrated to the national Dutch GDI services infrastructure, PDOK. This infrastructure, entirely built with OSGeo software, is maintained by the Dutch Kadaster and already (since 2010) provides open access to Dutch geospatial datasets and -services including the Dutch INSPIRE access point. Having the SE Platform hosted and maintained within PDOK gives a tremendous opportunity for long-term evolution and stability beyond its initial project-based funding.

There’s lots of exciting new technological details related to this migration, like the move from the current ad-hoc Docker-based deployment to a full-fledged Kubernetes (K8s) Cloud roll-out. This could be the subject of an entire post by itself. For this we’re setting up a fresh GitHub organization, plus SE Docker Images via DockerHub. All work-in-progress but first results are already tangible.

So what’s this Push or Pull about? As announced in Emit #1, I’ll try to explain the SE architecture “by following the data”. So sensor data is acquired by sensor stations constantly, 24 hours a day, and lots of it. To give somewhat of a figure: within the SE project the Intemo Sensor Station “Josene” station provides more than 100 different sensor values, “indicators”. These range from meteo-data like Temperature, Humidity, Pressure, to Air Quality values for NO2 (Nitrogen Dioxide), CO2 (Carbon Dioxide), O3 (Ozone), finedust (PM) and audio/noise indicators (sound pressure) like Decibels (A) min/max/average for about 30 frequency bands (see image below).

Values for these about 100 indicators are sampled about every 20 seconds. Even with about one hundred Josene sensor stations currently one can imagine this will produce “a lot of data” to say the least. O yes, and we also like to keep all data, i.e. maintain history…Josene sensor-stations are connected via Wifi and will have to send their data to “somewhere”. Eventually, a user will need to view/consume sensor-data via an app, like the SmartApp (see image below), or web-services without being overwhelmed.

So how does the SE Platform deal with this potential tsunami of data? Well, the keywords are Buffering, Harvesting and Aggregation. Back to following the data. Each Josense sensor station will constantly push its data to what is called a Data Collector within the SE architecture. A Data Collector is basically a buffer (server) that will store bulk “timeseries” data for each station. Data is stored in bulk, i.e. not every sample is stored in an individual record but as blobs. The granularity is one blob per station/per day/per hour.  This already reduces data records to 24 blobs per day per station. A lot of storage but a reasonable number of records. Also remind: this is raw, unvalidated, unaggregated data. Best is to first show a picture from the global architecture as below.

Starting at the bottom of the picture above: Sensors send (push) their raw data to their attached Data Collector. Currently this even happens outside the SE Platform: the two Data Collectors from the left are maintained by our partners Intemo (Intemo Data Collector) and CityGIS (CityGIS Data Collector) within their own premises. In the course of the project we have been adding another Data Collector based on InfluxDB for the AirSensEUR. Also the RIVM SOS is viewed as a Data Collector for purposes of Calibration (for another Emit).

The important notice is that the SE Platform deploys Harvesters that constantly Pull the raw data from a series of Data Collectors. So this is where the Push/Pull decoupling is realized. For this (Pull) we have developed a simple Raw Sensor REST API nicknamed the Whale API. Each Data Collector exposes its buffered bulk data (history) as JSON Blobs via this very simple API, independent from its internal storage technology. One may ask: why all this unnecessary indirection? Basically, here we have the Push/Pull decoupling realized. This gave us many advantages:

  • Sensors only need “one IP-address to send to”
  • Data Collectors can be optimized for their purpose
  • The Whale API provides a thin interface while still allowing transfer of bulk data
  • The Whale API also provides “last/current” values, so a quick pass-through for near-realtime data
  • Harvesters can run at their own pace/schedule
  • The SE Platform can be deployed anywhere, in Test, Production phases and build-up its data
  • Development and testing can be done locally, on a development laptop even
  • Data Collectors provide bulk-data from “time zero” so when moving/migrating SE servers or re-architecting ETL or Calibration algorithms we can re-bootstrap from “time-zero”

More details can be found within the ever-evolving Smart Platform Technical documentation. As said, we are in the process of migration. Basically moving all software from a single SE GitHub repo at Geonovum to our new GitHub organization and SE DockerHub, so look into the latter for the current/upcoming status.

So within this Emit I tried to depict how sensor-data “gets into the platform without overwhelming it”. So the Harvesters keep on Harvesting, but what next? Like Neil Young sings in Harvest: “Dream up, dream up,
let me fill your cup. With the promise of a man.” That is, I promise a next Emit #5 on After The Goldrush, sorry After The Harvest.

 

Categories: OSGeo Planet

gvSIG Team: Lanzada la convocatoria del Premio JUST-Side

OSGeo Planet - Thu, 2018-04-05 10:14

¿Te interesa la Justicia Territorial? ¿Vas a hacer una tesis de graduación, maestría o doctorado?¿Te gusta investigar y escribir?

Desde JUST-Side ponemos en marcha este concurso que se enmarca entre los objetivos de la red CYTED a la que pertenece la Asociación gvSIG.

Pueden concurrir estudiantes o investigadores de cualquier área científica que tengan como tema de investigación la reflexión o análisis de injusticias territoriales de base socioambiental, a partir de información territorial, ambiental o social, orientado a la mejora de las políticas públicas: derecho, ciencias políticas, geomática, geografía,…

Atentos a las fechas, el plazo límite de envío de los trabajos el 30 de septiembre de 2018.

Por su interés, os pedimos que nos ayudéis a difundir esta iniciativa en el mayor número posible de universidades.

Más información en: https://justside123.wixsite.com/esjustside

Y si para vuestros trabajos necesitáis utilizar un Sistema de Información Geográfica y no tenéis conocimientos previos, podéis aprovechar el curso gratuito de gvSIG Desktop para medio ambiente que ofrecemos.

Os dejamos con el vídeo de la convocatoria:

Categories: OSGeo Planet

Petr Pridal: Maps and GDPR: privacy for your visitors

OSGeo Planet - Thu, 2018-04-05 09:00

As of 25th May 2018, new EU regulation harmonizing data protection across the member states will come into force. The General Data Protection Regulation, commonly abbreviated as GDPR, will enhance the digital rights of EU citizens at the cost of a strict data protection compliance regime. The GDPR applies to all companies and institutions, regardless of their size, inside and outside of the EU, who are working with personal data of EU citizens.

How to prepare your organization

The new set of digital rights for EU citizens guaranteed by GDPR means a preparation of companies and organizations handling any kind of personal data, which is any information related to the natural person or data subject that can be used to identify the person directly or indirectly. This doesn’t only mean full name, photo and home address, but also things like IP address, email or even cookie if it can be used to identify the person.

For companies which are already respecting privacy and handling data in compliant with current legislation, GDPR means just a minor modification of current processes. As the information systems are becoming more complex and the flow of information is increasing, you can miss some details, which are not core to your business. Such an example is a map included in your web page or integrated into your mobile app. However, you are still responsible for all the data being collected and processed according to the GDPR.

The penalty can get up to €20 million, or 4% annual global turnover — whichever is greater.

If you haven’t started yet, you should take an action. Prepare yourself by taking these steps:

  1. Collect, store and process only personal data you really need. Collecting data for advertising purposes is acceptable (if other conditions are fulfilled), saving individuals’ personal data “because maybe they can be useful somehow one day” is not.
  2. Make sure you have informed consent for all personal data you are working with. If not, try to obtain it additionally. To stay on the safe side, double opt-in is a best practice. Make also sure users have a chance to revoke the consent.
  3. Have a process for handing over the data to the client if you are requested, updating them if they are out-dated and you are asked to do and to delete all unnecessary personal data you hold or to stop processing them.
  4. Build new project with security by design. For current ones, make sure the personal data are secured to the highest level you can achieve as a company or organization.
  5. If your security fails and there is a security incident which involves your clients’ personal data, have a process to inform affected people within 72 hours.

While most of the changes within an organization need to be done in internal processes, you also should make a revision and modifications on the software side if needed.

If you take these steps seriously and not just as a box-ticking exercise, it can have a positive effect on your organization. Organizing your data doesn’t just give you tidiness feeling, but also increase efficiency whenever someone has to work with them. Reduction of data can also be a positive thing as according to the study 85% of data stored in companies is redundant. And if you take your users’ privacy really seriously and stop provide the information about them to third parties, your business privacy will increase as well, because along with it you will also send out information about your business.

Underestimating the preparation and ignoring the rules will not just have a negative effect on your business reputation, but your bank account as well: the penalty can get up to €20 million, or 4% annual global turnover — whichever is greater.

Self-hosted maps are the solution

While many seek cloud services as their salvation, in case of a security issue, both parties partake in a shared responsibility. Moreover, with even a small piece of code inserted in your web or product, which is tracking your users, you are exposing an information about your business. The flow, composition and other information are gold valued, especially in the tech business.

While self-hosting a world map can be seen as a high-tech task for a skilled technician, in fact with OpenMapTiles maps it is a 10 minutes clicking job. To guarantee the security, the source code is available for an inspection. Only with a self-hosted solution you have fully under the control who is coming, what personal data are being collected, what is happening with them and guarantee you are 100% GDPR compliant.

Our map hosting respects the end-users privacy

Those who don’t have enough resources or don’t want to bother with self-hosting a map should search for a safe digital partner. While there are providers which claim to have a free-of-charge service, the price you are paying is your clients’ and business’ data. The free in their case means collecting and processing a massive amount of data and selling it out, mainly by targeted advertisement.

With MapTiler Cloud map hosting service, you can be sure your clients’ data are not being misused, simply because we do not collect any personal information. Our map services have no geolocation tracking code and we are not making a telemetry. Our services respect privacy by design and are built and maintained by the highest security standard. All the traffic between our servers and end-users is encrypted by HTTPS. 

With the core data centers in the EU, secure infrastructure, transparent business model, you can trust MapTiler Cloud map hosting service as a safe digital GDPR compliant partner.

Categories: OSGeo Planet

gvSIG Team: Nueva edición concurso gvSIG Batoví 2018

OSGeo Planet - Wed, 2018-04-04 15:22

Leemos en el blog de gvSIG Batoví que se lanzá una nueva edición del concurso gvSIG Batoví, que ya el año pasado nos maravilló con los elaborados e imaginativos proyectos que presentaron los alumnos de secundaria.

Como primera del fase del concurso se celebrará la 2ª edición del mini curso-taller “Capacitación en el uso de gvSIG Batoví“, para el que las inscripciones ya están abiertas, y que cuenta con el respaldo de la Asociación gvSIG.

Para saber más: https://www.ceibal.edu.uy/es/articulo/mini-curso-taller-gvsig-batovi

Aprovechamos para felicitar al proyecto Ceibal por la iniciativa y animamos a otros países a replicar la experiencia que está desarrollándose en Uruguay.

Categories: OSGeo Planet

gvSIG Team: OpenGeoFiction: fictitious maps in gvSIG Desktop

OSGeo Planet - Wed, 2018-04-04 11:36

We are going to show a curiosity for fictitious maps lovers. OpenGeoFiction is a project based on the OpenStreetMap platform aimed to create a fictitious world. Seas, rivers, cities, countries… a virtual world that grows every day. Therefore, OpenGeoFiction is a world created collaboratively and free by a community…, that can be available on our gvSIG Desktop. 

We can add the OpenGeoFiction map service through the ‘OSM’ tab, inside the ‘Add layer’ window, using the following parameters:

Once the server has been added among the available ones, we can add it as a layer to our gvSIG Desktop View. We have to take into account that the view must be in EPSG: 3857, which is the projection used by this  world of fiction.

Categories: OSGeo Planet

gvSIG Team: OpenGeoFiction: Mapas ficticios en gvSIG Desktop

OSGeo Planet - Wed, 2018-04-04 08:12

Hoy os traemos una curiosidad para los amantes de los mapas ficticios. OpenGeoFiction es una proyecto basado en la plataforma de OpenStreetMap orientado a la creación de un mundo ficticio. Mares, ríos, ciudades, países…todo un mundo virtual que crece día a día. OpenGeoFiction, por tanto, es un mundo creado de forma colaborativa y libre por una comunidad…y que podemos tener disponible en nuestro gvSIG Desktop.

Podemos añadir el servicio de mapas de OpenGeoFiction mediante la pestaña de ‘OSM’, dentro de la ventana de ‘Añadir capa’, utilizando los siguientes parámetros:

Una vez añadido el servidor entre los disponibles ya podemos añadirlo como capa a nuestra Vista de gvSIG Desktop. Una última nota, la Vista debe estar en EPSG: 3857, que es la proyección que utiliza este mundo de ficción.

Categories: OSGeo Planet

Jackie Ng: Announcing: mg-desktop and MapGuide nuget packages for 3.1.1

OSGeo Planet - Tue, 2018-04-03 17:55
It's been so long since putting out the last release of MapGuide that you sometimes forget that there are also supplemental build artifacts that tail off of the main MapGuide build process that need to be released as well!

In our case, that would be new nuget packages for the MapGuide .net API and mg-desktop.

The new mg-desktop binaries are also available as plain zip packages, should the NuGet way of acquiring not work out for you.
Categories: OSGeo Planet

Blog 2 Engenheiros: Como definir pontos de amostragem utilizando QGIS e ArcGIS

OSGeo Planet - Tue, 2018-04-03 06:16

Quando trabalhamos com solos, precisamos amostrar grandes áreas para determinar a qualidade dele e indicar a quantidade de insumos agrícolas (por exemplo, fertilizantes e calcário).

Para isso, é definido a área de interesse e distribuímos, na forma de grade ou aleatoriamente, diversos pontos igualmente espaçados. Dando inicio, assim, ao nosso plano de amostragem.

Lembre-se que há situações onde amostras compostas são aceitas (exemplo, fertilidade do solo), enquanto para análise de contaminantes no solo, amostras simples são recomendadas.

Como distribuir esses pontos de forma rápida e dar inicio às coletas?

Podemos realizar esse trabalho utilizando algumas ferramentas como o QGIS ou o ArcGIS. Aqui, vamos mostrar como utilizar os dois softwares.

-- Sumário -- Como criar (manualmente) pontos no QGIS Criando Pontos Aleatórios no QGIS Criando Grade de Pontos no QGIS Como criar (manualmente) pontos no ArcGIS Criando Pontos Aleatórios no ArcGIS Criando Grande de Pontos no ArcGIS Como criar pontos no QGIS

Antes de mostrar as ferramentas dos programas de SIG, é interessante que você saiba como criar pontos manualmente. Vamos iniciar nosso tutorial com o QGIS (2.18).

Note que o procedimento para criar pontos é semelhante ao de criação de polígonos, afinal, ambos são shapefiles.

Para criar uma nova camada shapefile, no menu superior do QGIS, clique em Camada > Criar Camada > Shapefile (conforme figura abaixo). Uma nova janela irá aparecer solicitando os dados do shapefile a ser criado.

Como criar um shapefile no QGISComo criar um shapefile no QGIS

A criação de shapefiles também pode ser realizada pelo seguinte atalho no teclado Ctrl+Shift+N.

Na nova janela aberta, selecione como Tipo o item Ponto, e vamos ver cada um dos itens que podemos modificar.

  • Codificação do arquivo (File Enconding): Conjunto de dados para representar os caracteres utilizados – Quando algumas letras não aparecem no QGIS, um dos problemas pode ser a codificação;
  • Sistema de Referência: SAD69? SIRGAS2000? Qual será o sistema de coordenadas dos seus pontos (aconselhamos a utilizar o SIRGAS2000, pois é o sistema oficial do Brasil);
  • Novo campo (New Field): Adiciona itens na tabela de atributos do nosso shapefile, neste tutorial, cada campo estará associado à cada ponto criado (aqui, criamos um campo chamado nome, do tipo Texto, com comprimento de 25 caracteres);
Campos a serem preenchidos para criação de shapefile no QGIS.Campos a serem preenchidos para criação de shapefile no QGIS.

 

Após esse procedimento, clique em OK. Em seguida, o QGIS irá perguntar onde você quer salvar o shapefile.

Note que o shapefile criado esta vazio, ou seja, não há nenhum ponto adicionado.

Para criar uma nova feição (um ponto), selecione o shapefile de pontos criado e clique sobre o lápis amarelo no menu de edição (ou você pode clicar sobre o shape e buscar o item Alternar Edição / Toggle Edition).

Menu de Edição de Shapefiles do QGISMenu de Edição de Shapefiles do QGIS

Quando você ligar a edição, as outras ferramentas do menu de edição ficarão acessas. Entre as novas opções disponíveis, esta a Adicionar Feição (Add Feature), ao lado do ícone utilizado para salvar as modificações.

O menu de edição irá mudar suas figuras conforme o tipo de shape (ponto, linha, polígono) que esta sendo editado.

Clique sobre o botão para adicionar feição e você poderá clicar sobre o mapa e adicionar, livremente, novos pontos.

Ao adicionar um ponto, o QGIS irá lhe perguntar os dados deste ponto, no nosso caso, será o id e o nome do ponto, para serem adicionados na tabela de atributos.

E dessa forma, você vai inserindo os pontos de amostragem e quando finalizar, salve as modificações do shapefile clicando sobre botão Salvar Edição da Camada (Save Layer Edits). E finalize a edição clicando novamente sobre o lápis amarelo.

Esse procedimento pode ser útil quando temos uma área pequena e poucos pontos para serem amostrados. Mas imagine se tivermos que colocar mais de cinquenta pontos?

Muito trabalhoso, considerando que há ferramentas que podem nos auxiliar.

Criando Pontos Aleatórios no QGIS

Para criar nossos pontos aleatórios, precisamos antes definir uma área de estudo, neste tutorial vamos utilizar o limite estadual de Santa Catarina, disponível no site do IBGE (clique aqui para baixá-lo).

Ou se você preferir, pode conferir nosso tutorial de como criar um polígono no QGIS e delimitar sua área de estudo.

Vamos adicionar nosso shape do estado de Santa Catarina e vamos acessar a janela Toolbox (Caixa de Ferramentas) que esta disponível no menu superior do QGIS, especificamente no item Processing (Processar).

Você pode acessar o Toolbox usando o atalho Ctrl+Alt+T.

A nova janela aberta demonstrará diversos algoritmos e ferramentas para executar diferentes tarefas, sendo que no topo, há uma caixa para procurar a ferramenta desejada.

Procure por “Random Points” (Pontos Aleatórios em Inglês)(1) e depois clique na opção Random Points in Layer Bounds (2), ou seja, pontos aleatórios nos limites de uma camada.

Uma nova janela será aberta.

Como criar pontos aleatórios no QGIS.Como criar pontos aleatórios no QGIS.

Nesta janela, defina a área onde você quer criar seus pontos (3), quantos pontos você deseja criar (4), distância mínima entre os pontos (5) e onde o arquivo gerado será salvo (6). Por fim, clique em Run.

Cuidado com o item “Distância mínima entre pontos”, dependendo do sistema de coordenadas, teremos unidades diferentes (geográfica em graus e projetada em metros).

Após esse procedimento, você terá seus pontos distribuídos na sua área de interesse, sendo que, seguindo nosso tutorial, você vai ter algo semelhante à imagem abaixo.

Pontos aleatórios distribuídos em Santa Catarina.Pontos aleatórios distribuídos em Santa Catarina. Criando Grade de Pontos no QGIS

Agora, se o seu interesse é criar uma grade (regular) de pontos, você deverá pesquisar no Toolbox do QGIS por “Regular Points” e depois abrir a ferramenta com o mesmo nome.

Na janela que irá abrir, você terá que alimentar os seguintes parâmetros:

  • Input extent (xmin, xmax, ymin, ymax): Retângulo indicando as coordenadas iniciais e finais da grade, pode ser inserido um shape, clicando no botão ao lado da caixa do parâmetro e selecionando “Use layer/canvas extent”;
  • Point spacing/count: Espaçamento entre os pontos. Aqui, lembre-se do sistema de coordenadas, pois coordenadas geográficas estão em graus e as projetadas em metros;
  • Initial inset from corner (LH side): Espaçamento utilizado para a primeira linha de pontos;
  • Regular points: Local onde será salvo a grade de pontos gerada.

A imagem abaixo mostra os dados que utilizamos neste tutorial.

Como criar uma grade regular de pontos no QGIS.Como criar uma grade regular de pontos no QGIS.

Perceba que os pontos criados ultrapassam a extensão do estado de Santa Catarina, mas toda a área de estudo contém pontos da nossa grade.

Para recortar a grade de pontos, busque no Toolbox por “Clip” e você encontrará a ferramenta do mesmo nome, Clip. Ao clicar sobre ela, uma nova janela irá abrir e será solicitado os seguintes itens:

  • Input layer: Camada que será recortada (no nosso caso, nosso shape de pontos regulares);
  • Clip layer: Camada que será utilizada como molde para recorte (no caso, a nossa área de estudo);
  • Clipped: Local onde será salvo o novo shapefile de pontos.

Após todos esses procedimentos, você terá uma grade de pontos dentro do estado de Santa Catarina, conforme figura abaixo.

Grade de pontos criada dentro da área de interesse no QGIS.Grade de pontos criada dentro da área de interesse no QGIS.

Gostou do Tutorial? Assine nossa lista de email para receber nosso eBook “Como inserir pontos em linhas no QGIS 2.18” e crie seus planos de amostragem em qualquer rio, córrego, riacho, transecto ou estrada.

Como criar pontos no ArcGIS

No ArcGIS, podemos criar um shapefile de três formas diferentes:

  • Desenho (Ferramenta Drawing);
  • ArcToolbox;
  • ArcCatalog.

Neste tutorial, iremos focar na terceira (ArcCatalog), por ser a mais parecida com a utilizada no QGIS.

O ArcCatalog é o gerenciador de arquivos do ArcGIS, onde é possível criar, editar e deletar seus arquivos, facilitando a organização do seu projeto.

Para abrir o ArcCatalog, no menu superior do ArcMap, clique em Windows e em seguida selecione Catalog. Uma nova janela irá aparecer.

Janela do ArcCatalog (ou Catalog)Janela do ArcCatalog (ou Catalog).

Nas duas primeiras pastas, você poderá navegar pelos seus arquivos do Windows e localizar onde você quer salvar seu shapefile de pontos.

Clique com o botão direito sobre a pasta (que você escolheu) e selecione New, em seguida, busque Shapefile. Uma nova janela será aberta solicitando o nome do shapefile e o tipo (ponto, linha, polígono).

E não se esqueça de definir o sistema de coordenadas (utilize o SIRGAS2000, pois ele é o sistema oficial no Brasil).

Como criar um shapefile no ArcGISComo criar um shapefile no ArcGIS.

Verifique se a sua ferramenta Editor esta ligada, para isso, no menu superior, vá em Customize > Toolbars > Editor.

Na barra de ferramento do Editor, clique sobre Editor e selecione Start Editing (1). Em seguida, clique em Create Features (2) e na nova janela (3), escolha o shapefile que você deseja editar e escolha na parte inferior da janela a feição que você quer criar (4).

Como criar uma nova feição no ArcGISComo criar uma nova feição no ArcGIS.

Agora, basta ir clicando no mapa e definir a localização dos pontos, sendo que após inserir todos os pontos, você deve salvar as edições (Save Edits) e finalizá-las (Stop Editing).

Mas isso é muito trabalhoso, especialmente se tivermos mais de cem pontos! Por isso, há ferramentas que facilitam nosso trabalho.

Criando Pontos Aleatórios no ArcGIS

Para criar nossos pontos aleatórios, vamos precisar definir uma área de estudo, neste tutorial vamos utilizar o limite do estado de Santa Catarina, disponível no site do IBGE (clique aqui para baixá-lo).

Ou se você preferir, pode conferir nosso tutorial de como criar um polígono no ArcGIS e delimitar sua área de estudo.

Após adicionar o shapefile do limite do estado de Santa Catarina, vá em ArcToolbox > Data Management Tools > Feature Class e clique sobre Create Random Points.

Uma nova janela será aberta e você precisará informar os seguintes parâmetros:

  • Output Location: Pasta onde será salvo o shapefile de pontos;
  • Output Point Feature Class: Nome do shapefile de pontos a ser criado;
  • Constraining Feature Class: Shapefile que irá determinar o limite de criação dos pontos, no nosso caso é o limite do estado de SC;
  • Number of points: Número de pontos a serem criados;
  • Minimum Allowed Distance: Distância mínima permitida entre os pontos;
Como criar pontos aleatórios no ArcGISComo criar pontos aleatórios no ArcGIS

Cuidado com o item “Distância mínima permitida”, dependendo do sistema de coordenadas, teremos unidades diferentes (geográfica em graus e projetada em metros).

O resultado desta ferramenta é apresentado na figura abaixo.

Resultado da distribuição de pontos aleatórios no ArcGIS.Resultado da distribuição de pontos aleatórios no ArcGIS. Criando Grade de Pontos no ArcGIS

A criação de grades de pontos no ArcGIS é semelhante à criação de pontos aleatórios, inclusive, as ferramentas encontram-se no mesmo Toolbox (ArcToolbox > Data Management Tools > Feature Class), sendo o nome dela Create Fishnet.

Nesta ferramenta, você irá inserir os seguintes dados:

  • Output Feature Class: Nome e localização dos shapefiles a serem criados;
  • Template Extent: Extensão/limites da grade a ser criada (ao colocar o limite da área de estudo, os parâmetros abaixo deste item serão preenchidos automaticamente);
  • Cell Size Width e Cell Size Height: Comprimento e altura das células que serão criadas;
  • Number of Rows e Number of Columns: Número de Linhas e Colunas a serem criadas;
  • Create Label Points: Mantenha essa opção ligada, pois é ela que irá criar nossa grade de pontos.

Se você preencher o comprimento e altura das células, pode deixar a opção número de linhas e colunas zeradas. O caminho inverso também é válido.

Note que o ArcGIS cria uma grade com linhas e no meio dos quadrados criados, são colocados pontos, ou seja, o resultado dessa operação é um shape com pontos e outro com linhas.

Veja que os pontos (assim como no QGIS) também ultrapassam nosso limite definido. Para manter somente os pontos dentro da área de estudo, vamos utilizar a ferramenta Clip, disponível em: ArcToolbox > Analysis Tools > Extract > Clip.

Na ferramenta Clip, você irá inserir o shapefile que será recortado (Input Features), o polígono que será utilizado para recortar (Clip Features) e onde o resultado será salvo (Output Feature Class).

O resultado é apresentado na imagem abaixo.

Grade regular de pontos criada no ArcGIS, após recorte.Grade regular de pontos criada no ArcGIS, após recorte.

E com isso, chegamos ao final do nosso tutorial. Agora você já sabe como distribuir pontos dentro de uma área de interesse e já pode planejar como serão realizadas as suas amostragens.

Qualquer dúvida ou dificuldade, utilize os comentários desta postagem para podermos te ajudar.

Gostou do Tutorial? Assine nossa lista de email para receber nosso eBook “Como inserir pontos em linhas no QGIS 2.18” e crie seus planos de amostragem em qualquer rio, córrego, riacho e transectos.

Categories: OSGeo Planet

Jackie Ng: Announcing: MapGuide Open Source 3.1.1

OSGeo Planet - Tue, 2018-04-03 00:02
I am pleased to announce the final release of MapGuide Open Source 3.1.1

The only changes from the Release Candidate are:
  • A fix in the AJAX viewer to prevent clicks in interactive tooltip content from falling through (possibly accidentally triggering map selections as a result).
  • Permission fixes for the windows installer and linux install scripts so that the Fusion QuickPlot widget can work out of the box.
Download/Release Notes
Categories: OSGeo Planet

gvSIG Team: gvSIG aplicado a Medio Ambiente. Tema 3: Edición gráfica

OSGeo Planet - Mon, 2018-04-02 10:00

Ya está activado el Tema 3 del curso gratuito “gvSIG aplicado a Medio Ambiente: Edición gráfica” que podéis encontrar en http://www.geoalternativa.com/gvsig-training/

imagen_1.png

Durante esta semana aprenderemos a digitalizar información geográfica, a crear y editar capas vectoriales, conoceremos las herramientas disponibles para insertar elementos de dibujo en el mapa, y cómo modificar la información y editarla una vez que está creada.

Además también veremos cómo configurar las propiedades de edición para optimizar nuestra tarea de edición.

En este módulo sólo hay un documento de lectura, pero la práctica es larga, así que os recomendamos empezar desde el inicio de la semana con el Ejercicio_T3  poder contar con la ayuda de l@s compañer@s y facilitadores.

Como siempre, si tenéis alguna duda, podéis expresarla en la lista de usuari@s: http://osgeo-org.1560.x6.nabble.com/gvSIG-usuarios-f4118557.html

Categories: OSGeo Planet

Free and Open Source GIS Ramblings: Optional parameters in QGIS Processing scripts & models

OSGeo Planet - Sun, 2018-04-01 17:44

Remember the good old times when all parameters in Processing were mandatory?

Inputs and outputs are fixed, and optional parameters or outputs are not supported. [Graser & Olaya, 2015]

Since QGIS 2.14, this is no longer the case. Scripts, as well as models, can now have optional parameters. Here is how for QGIS 3:

When defining a Processing script parameter, the parameter’s constructor takes a boolean flag indicating whether the parameter should be optional. It’s false by default:

class qgis.core.QgsProcessingParameterNumber( name: str, description: str = '',  type: QgsProcessingParameterNumber.Type = QgsProcessingParameterNumber.Integer,  defaultValue: Any = None,  optional: bool = False,  minValue: float = -DBL_MAX+1, maxValue: float = DBL_MAX)

(Source: http://python.qgis.org/api/core/Processing/QgsProcessingParameterNumber.html)

One standard tool that uses optional parameters is Add autoincremental field:

From Python, this algorithm can be called with or without the optional parameters:

When building a model, an optional input can be assigned to the optional parameter. To create an optional input, make sure to deactivate the mandatory checkbox at the bottom of the input parameter definition:

Then this optional input can be used in an algorithm. For example, here the numerical input optional_value is passed to the Start values at parameter:

You can get access to all available inputs by clicking the … button next to the Start values at field. In this example, I have access to values of the input layer as well as  the optional value:

Once this is set up, this is how it looks when the model is run:

You can see that the optional value is indeed Not set.

References

Graser, A., & Olaya, V. (2015). Processing: A Python Framework for the Seamless Integration of Geoprocessing Tools in QGIS. ISPRS Int. J. Geo-Inf. 2015, 4, 2219-2245. doi:10.3390/ijgi4042219.

Categories: OSGeo Planet
Syndicate content