OSGeo Planet

Jackie Ng: How can we take advantage of this?

OSGeo Planet - 2 hours 13 min ago

Here's the facts:
  • MapGuide for the longest time has an FDO provider that can read SQLite databases
  • SQLite has an in-memory mode
  • :memory: is a completely valid file name to pass to the connection parameters of a SQLite FDO connection
  • In terms of I/O, memory is the fastest backing store you can have for direct data access.
Now how can we make MapGuide blazing fast (where it is currently not), given the above facts?
That question has been brewing in my mind for some time now.

Categories: OSGeo Planet

Darren Cope: Create World Files For a Directory of KMZ/KML Raster Files

OSGeo Planet - 4 hours 44 min ago

A while back, I worked on a project that required the conversion of a number of KML/KMZ (Google Earth) raster files into vector format (don’t ask!) Because there were a lot of files, it was painstaking to manually geo-reference the files after unzipping the KMZ to extract the raster files. I dug around on the web, and was able to find two tools that did the job. The first, WorldFileTool, works great, but must be run individually for each file (ie. you can’t run it in a batch over multiple files in a directory).  I use this tool if I’m only converting a single file, or less than a handful at at time.

 

The other option I found was a shell script created by Nicolas Moyroud, who had made it available at this link. However, the link now appears to be broken, and I can’t find another reference to the file. As it’s tagged as a “GNU/GPL v3 – Free use, distribution and modification” license, I’m posting a copy here for others who may find it of use. Note that all credit for this file goes to Nicolas Moyroud, and I have no claim to this work!

Click here to download the file!

 

Edit:  I also found a working download link and Nicholas’ descriptive page here (en francais).  He must have changed his URL structure since my original StackExchange post!

Categories: OSGeo Planet

GeoMonday: GeoMonday 2015.3 – A new dimension in Geo

OSGeo Planet - Wed, 2015-07-29 21:16

Intro

One of the most discussed topic of the recent years is the rise of UAVs, MAVs, RPVs or simply drones. These flying devices are equipped in their latest evolutions not only with full HD cameras, but also GPS devices and even small computers. This equipment is the base for next generation aerial geo-data and services. In the 3rd edition of GeoMonday we will cover the whole lifecycle from the creation, processing up to the integration for location intelligence or services. It’s a special pleasure for us to have our session for the first time in the beautiful city center of Potsdam, thanks to our Partner Zukunftsagentur Brandenburg.

Agenda:

When: Monday September 14th, 2015, starting 6pm sharp
Where: arcona Hotel am Havelufer, Zeppelinstraße 136, 14471 Potsdam

You are welcome to join our event to become part of the GeoMonday community. Get your free tickets here:
https://geomonday2015-3.eventbrite.de

We will announce our speakers in the next days and weeks, so stay tuned…


Categories: OSGeo Planet

Markus Neteler: QGIS 2.10 RPMs for Fedora 21, Centos 7, Scientific Linux 7

OSGeo Planet - Wed, 2015-07-29 18:55

qgis-icon_smallThanks to the work of Volker Fröhlich and other Fedora/EPEL packagers I was able to create RPM packages of QGIS 2.10 Pisa for Fedora 21, Centos 7, and Scientific Linux 7 using the great COPR platform.

Repo: https://copr.fedoraproject.org/coprs/neteler/QGIS-2.10-Pisa/

The following packages can now be installed and tested on epel-7-x86_64 (Centos 7, Scientific Linux 7, etc.), and Fedora-21-x86_64:

  • qgis 2.10.1
  • qgis-debuginfo 2.10.1
  • qgis-devel 2.10.1
  • qgis-grass 2.10.1
  • qgis-python 2.10.1
  • qgis-server 2.10.1

Installation instructions (run as “root” user or use “sudo”):

su # EPEL7: yum install epel-release yum update wget -O /etc/yum.repos.d/qgis-2-10-epel-7.repo https://copr.fedoraproject.org/coprs/neteler/QGIS-2.10-Pisa/repo/epel-7/neteler-QGIS-2.10-Pisa-epel-7.repo yum update yum install qgis qgis-grass qgis-python # Fedora 21: dnf copr enable neteler/QGIS-2.10-Pisa dnf update dnf install qgis qgis-grass qgis-python

Enjoy!

The post QGIS 2.10 RPMs for Fedora 21, Centos 7, Scientific Linux 7 appeared first on GFOSS Blog | GRASS GIS Courses.

Categories: OSGeo Planet

Jackie Ng: A (Better) map viewer template

OSGeo Planet - Wed, 2015-07-29 13:36
Based on blog and github stats, the bootstrap map viewer templates that I talked about in a previous post seemed to be the my most popular repo and 2nd most popular post of all time respectively. I'm glad you like it :)

But to tell the truth, I have since found something significantly better and in a humble case of acknowledging that someone made something better than what I have, suggest that you give it a try.

I am talking about Tobias Bienek's sidebar-v2 responsive map viewer template.

Just look at this screenshot!


This template is basically my dream responsive map viewer layout fully realized, which I've been trying to replicate for the longest time since I first heard of bootstrap.

A cursory glance at the repo shows that it's written in the most un-obtrusive of HTML, CSS and JavaScript which means actual integration of bootstrap-styled content should be a simple affair, and their examples already cover all the possible map viewer solutions you would ever use.

So if what I've made is less than desirable, give this template a go.
Categories: OSGeo Planet

gvSIG Team: 11th International gvSIG Conference: “It’s possible. It’s real”

OSGeo Planet - Wed, 2015-07-29 11:40

A year on, the reference conference of the gvSIG Community and one of the more relevant events about free geomatics at an international level will take place. The 11th International gvSIG Conference will be held from December 2nd to 4th 2015 under the slogan “It’s possible. It’s real“.

11gvsig

 

 

Call for papers

The conference program has been excellent at the last years, and we’re sure it will be very good this year. We expect your proposals about big ans small projects, case studies, researches and university works, developed on gvSIG, gvSIG, standard uses and Spatial Data Infrastructure on free geomatics…

If you are interested, call for papers is now open. As of today communication proposals can be sent to the email address: conference-contact@gvsig.com; they will be evaluated by the scientific committee as to their inclusion in the conference program.

There are two types of communication: paper or poster. Information regarding to regulations on communication presentations can be found in the Communications section of the website. Abstracts will be accepted until September 25th.

Sponsors

Organizations interested in collaborating in the event can find information in the section: How to collaborate of the conference website. We call the institutions and companies that use the gvSIG technology, to collaborate at this event.

 


Filed under: community, english, events, gvSIG Association Tagged: 11th International gvSIG Conference
Categories: OSGeo Planet

gvSIG Team: 11as Jornadas Internacionales gvSIG: “Es posible. Es real”

OSGeo Planet - Wed, 2015-07-29 06:53

Un año más celebraremos las jornadas de referencia de la comunidad gvSIG y uno de los eventos más relevantes de geomática libre a nivel internacional. Del 2 al 4 de diciembre de 2015 tendrán lugar las 11as Jornadas Internacionales gvSIG que este año se presentan con el lema “Es posible. Es real”.

11gvsig

 

 

 

 

 

Envío de comunicaciones

Llevamos varios años en que el programa de las jornadas no puede calificarse de otra forma que excelente. Y estamos seguros que este año no será menos. Esperamos vuestras propuestas, de grandes y pequeños proyectos, casos de uso, investigaciones y trabajos universitarios, desarrollos con gvSIG, gvNIX, uso de estándares e Infraestructuras de Datos Espaciales con geomática libre…

Si estás interesado en participar…ya está abierto el periodo para el envío de propuestas de comunicaciones. Las propuestas pueden enviarse a la dirección de correo electrónico conference-contact@gvsig.com, y serán valoradas por el comité científico de cara a su inclusión en el programa de las Jornadas. Existen dos modalidades de comunicación: ponencia y póster. Toda la información sobre las normas para la presentación de comunicaciones puede consultarse en el apartado “Comunicaciones” de la web. El periodo de recepción de resúmenes finalizará el próximo 25 de septiembre.

Patrocinios

Las organizaciones interesadas en colaborar en el evento pueden encontrar información en el apartado “¿Cómo colaborar?” de la web de las jornadas. Hacemos llamamiento especialmente a las empresas e instituciones usuarias de la tecnología gvSIG, a que colaboren en la realización de este evento.


Filed under: events, spanish Tagged: 11as Jornadas Internacionales
Categories: OSGeo Planet

gvSIG Team: Talleres 7as Jornadas gvSIG LAC: Scripting con gvSIG 2.2

OSGeo Planet - Tue, 2015-07-28 10:15

linux-python-logoHola a todos,
Ya casi están aquí las “7as Jornadas gvSIG de Latinoamérica y Caribe”, que este año se celebran en  la Facultad de Geografía de la Universidad Autónoma del Estado de México. En estas jornadas entre varios talleres y exposiciones habrá un “Taller de scripting con gvSIG 2.2″.

¿ A quien va dirigido el “Taller de scripting con gvSIG 2.2″ ?

A usuarios con conocimientos de gvSIG y python/jython, y desarrolladores que deseen iniciarse en la realización de scripts sobre gvSIG.

¿Qué deben conocer y llevar los asistentes?

Debes conocer:

  • La aplicación gvSIG desktop.
  • Nociones de programación.
  • Lenguaje de programación python; esto sería muy recomendable.

En caso de no tener conocimientos de programación o python, se puede asistir al taller y seguirlo a modo de charla, aunque no se puedan realizar todos los ejercicios que vamos a ir viendo.

Qué necesitarás llevar en el caso de seguir el taller con vuestro propio portátil/laptop:

Un gvSIG 2.2 instalado y funcionando correctamente, que tenga instalado el complemento de scripting.

Respecto al Sistema Operativo, debería poder seguirse tanto desde Linux como desde Windows. En mi caso el taller lo impartiré sobre Linux, Kubuntu de 64 bits.

¿ Qué veremos en el taller ?

Se trata de un taller de entre tres y cuatro horas, así que puede dar para ver algunas cosas interesantes.
La idea seria dividir el taller en tres bloques:

  • Una introducción, de nivel básico. Pensado para usuarios con pocos conocimientos sobre programación y python. Veremos como manipular datos espaciales y generar nuevas capas a partir de algunas ya existentes.
  • Un ejemplo de manipulación de mapas (documento mapa), de nivel intermedio. Veremos algunos trucos para personalizar nuestros mapas con un poco de scripting…
    • Ajustando la extensión del mapa a visualizar
    • Personalizando rótulos de este.
    • Cargando imágenes personalizadas.

    Además veremos algunos trucos para poder descubrir de que operaciones disponemos sobre los distintos componentes u objetos a los que tenemos acceso, así como donde podemos consultar información sobre algunos de ellos.

  • Un ejemplo de creación de interfaces de usuario desde scripting, de un nivel avanzado. Veremos como crear formularios con una herramienta externa, propia de Java, que nos permitirá crear interfaces de usuario fácilmente con una alta integración con el resto de gvSIG  y como usarlos desde un script…
    • Crear formularios de forma sencilla
    • Cargarlos desde un script y acceder a sus componentes
    • Asociar operaciones a los botones de nuestros formularios

    Continuaremos con lo que habíamos creado en el punto anterior para dotarlo de interfaz gráfica y acabar disponiendo de una herramienta que nos permita personalizar nuestros mapas.

En función de lo que a los asistentes les interese iremos dejando caer más peso en unas partes u otras, adaptando el taller a estos.

Espero poder publicar antes de las jornadas otro pequeño artículo indicando dónde podéis descargaros algo de documentación sobre lo que iremos viendo durante el taller.

Recordar que los talleres son gratuitos, al igual que todas las actividades de las jornadas, y que para asistir necesitáis realizar vuestra inscripción a las jornadas mediante el siguiente enlace:

http://www.gvsig.com/es/eventos/jornadas-lac/2015/inscripcion

Post anteriores sobre talleres en las 7as Jornadas gvSIG LAC:

Un saludo a todos!


Filed under: development, events, gvSIG Desktop, spanish Tagged: 7as LAC, jython, python, scripting, scripts, taller
Categories: OSGeo Planet

Peter Batty: My mapwheel story

OSGeo Planet - Tue, 2015-07-28 03:28
Yesterday I backed a Kickstarter project called Mapwheel, I think it’s a really cool idea. They let you design a custom “toposcope” or map wheel showing the direction and distance of places of interest from the location where you live (or any other location you choose). You can choose various materials (wood or metal) and customize the design in various ways. Working on the design has been a
Categories: OSGeo Planet

GeoTools Team: FOSS4G 2015 Europe talk from Ian Turton

OSGeo Planet - Mon, 2015-07-27 22:38
I would like to pass on an excellent talk by Ian Turton.

This presentation is a great introduction to using an enjoying open source software for everyone, entertaining illustrated with examples from the GeoTools project.

A big thanks to Ian for this presentation and his long standing outreach efforts. Champions like this make GeoTools a friendly place to work for everyone involved.

We hope everyone enjoyed FOSS4G 2015 Europe and look forward to seeing you in Seoul!

Earning Your Support Instead of Buying It
Categories: OSGeo Planet

From GIS to Remote Sensing: Minor Update: Semi-Automatic Classification Plugin v. 4.5.1

OSGeo Planet - Mon, 2015-07-27 21:23

This post is about a minor update for the Semi-Automatic Classification Plugin for QGIS, version 4.5.1.


Following the changelog:
-changed function for ROI display
-bug fixing
Categories: OSGeo Planet

From GIS to Remote Sensing: Major Update: Semi-Automatic Classification Plugin v. 4.5.0

OSGeo Planet - Mon, 2015-07-27 21:23

This post is about a major update for the Semi-Automatic Classification Plugin for QGIS, version 4.5.0.


Following the changelog:
-added reflectance conversion for Landsat 1, 2, and 3 MSS
-improved the calculation of Band calc which now allows for calculation between
rasters with different size and resolution
-experimental version
-bug fixing
Categories: OSGeo Planet

GeoSolutions: Developer’s Corner: Improved NetCDF/GRIB support on GeoServer

OSGeo Planet - Mon, 2015-07-27 15:48

GeoServer

Dear Readers,

today we want to share some improvements we made in GeoServer in supporting NetCDF and GRIB datasets.

As you know, NetCDF and GRIB are commonly used format in the Meteorological and Oceanographic (MetOc) context for observational data and numerical modeling, being a platform independent format used to represent multidimensional array-oriented scientific data. As an instance, data for air temperature, water current, wind speed computed by mathematical models across multiple dimensions, such as time, depth/elevation or physical entities measured by sensors may be served as NetCDF datasets.

1

In the last years, we have improved the GeoTools library in such a context, by providing a NetCDF plugin based on Unidata NetCDF java library. It is worth to point out that the same library also allows to access GRIB datasets. As a result, you may configure a NetCDF/GRIB coverage store in GeoServer for a NetCDF/GRIB file and setup different coverages/layers, one for each NetCDF variable/GRIB parameter available in the input file, together with its underlying dimension (time, elevation, ...)

 

Whilst the standalone NetCDF/GRIB provides access to a single NetCDF/GRIB file exposing it as a self contained coverage store, multiple datasets can be served as a single imageMosaic coverage store. This is especially useful when you have to deal with a collection of files representing different runs and forecasts of a meteo model. You may think about a Meteorological agency running a model each day, producing N forecasts by day with 1 hour step. In that case, an ImageMosaic can be configured on top of the folder containing the related NetCDF/GRIB datasets. Moreover, scripts running periodically can automatically add new files to that, in order to update the available data with latest forecasts.

With this approach you can configure a coverageStore based on an ImageMosaic, so that you can send WMS getMap requests in order to depicts, as an instance, wind currents at specific heights above ground or send WCS getCoverage requests to get raw data about precipitations at different times.

The GeoSolutions SpatioTemporal data Training contains some WMS/WCS requests examples involving the DLR’s Polyphemus Air Quality modeling System datasets.

Creating meaningful maps for the user requires proper styling to be applied to raw data. SLD allows to customize the rendering of your NetCDF/GRIB datasets.

As an instance:
  • you can show height of waves as dynamic color map (More details about this capability and SLD to be used can be found here)
2
  • you can combine color maps style and contouring to show air temperature. (here you can find the SLD for countouring a DEM. Adapting it for the air temperature case only requires to change the levels parameter values from lines 22)
3
  • You can combine wind components and represent them through windbarbs symbology
4

More details on NetCDF/GRIB styles and other rendering transformations can be found in the Rendering Transformations section of the SpatioTemporal training. In such a context, you can also take a look to this blog post related to wind barbs depicted in the previous example. Full SLD for WindBarbs example is available here.

Whilst WMS allows to create maps/portraits with custom styling to customize the rendering of a specific slice of a NetCDF/GRIB variable, WCS allows to get raw data for an “hypercube” involving multiple values across different dimensions.

In such a context WCS 2.0 defines:

  • Trimming subsetting to specify a range across a dimension
  • Slicing subsetting to specify a single value for a dimension

Standard output formats such as GeoTIFF, ArcGrid don’t allow to encode multiple “2D slices” of the same coverage related to different time,elevation ranges involved in the request.

Therefore, a NetCDF output format has been developed to store all the requested portions of a coverage into a single multidimensional file.

As an instance, a request like this: http://localhost:8080/geoserver/wcs?request=GetCoverage&service=WCS&version=2.0.1&coverageId=geosolutions__NO2&Format=application/x-netcdf&subset=http://www.opengis.net/def/axis/OGC/0/Long(5,20)&subset=http://www.opengis.net/def/axis/OGC/0/Lat(40,50)&subset=http://www.opengis.net/def/axis/OGC/0/elevation(300,1250)&subset=http://www.opengis.net/def/axis/OGC/0/time("2013-03-01T10:00:00.000Z","2013-03-01T22:00:00.000Z") will create a NetCDF file containing all available data for the NO2 (Nitrogen Dioxide) coverage by
  • Trimming on latitude [40 -> 50]
  • Trimming on longitude [5 -> 20]
  • Trimming on elevation [300 -> 1250]
  • Trimming on time [2013-03-01T10:00:00.000Z -> 2013-03-01T22:00:00.000Z]

That request is getting all NO2 data within the elevation range [300-1250] for the time period from 2013/03/01 at 10 AM to 2013/03/01 at 10 PM, in the BoundingBox with corners 5°E 40°N - 20°E 50°N.

On Panoply, the output will look like this. You can notice multiple values available across dimensions: 13 time values and 6 elevation values which can be combined together to get 6*13 = 78 different 2D slices of the requested coverage. 5

An important improvement we recently made in handling NetCDF and GRIB file is related to support for different projections. In the beginning, GT/GS NetCDF plugins were only supporting WGS84 based datasets due to missing logic to parse projection related information. Lately (GeoServer 2.8.x), the NetCDF input format has been improved in order to support different coordinate reference systems which are expressed through GridMapping as per NetCDF-CF conventions so we can support Lambert conformal, Stereographic, Transverse Mercator, Albers Equal Area, Azimuthal Equal Area, Orthographic projections. The NetCDF-CF GridMapping way, requires to associate a NetCDF variable containing the projection information to a multidimensional Variable containing data defined in that projection. As an instance, your dataset may contain an icing_probability variable declaring a grid_mapping = "LambertConformal_Projection" attribute as well as that “LambertConformal_Projection” variable containing this definition: int LambertConformal_Projection; :grid_mapping_name = "lambert_conformal_conic"; :latitude_of_projection_origin = 25.0; // double :longitude_of_central_meridian = -90.0; // double :standard_parallel = 25.0; // double :earth_radius = 6371229.0; // double This information will be internally parsed to setup a Coordinate Reference System. Moreover, a custom EPSG should be added to the GeoServer’s user_projection definitions matching that CRS in order to have a valid code identifying that custom projection. More information on this topic are available as part of the GeoServer NetCDF community module documentation.

Finally, the NetCDF output format has been improved too, in order to:

  • support NetCDF4-Classic format. Long story short, the NetCDF4-Classic format add support for the NetCDF4’s HDF5 compression capability to the NetCDF3 model. This may be helpful to reduce the size of the requested data when performing a GetCoverage requeste involving a wide domain (in terms of bbox, time, elevation, …).
    • NetCDF4 output will be automatically created when the getCoverage request specifies application/x-netcdf4 instead of application/x-netcdf.
    • NetCDF4 support requires NetCDF native libs are available. More details are available at the related GeoServer page.
  • support CF (Climate Forecast) names mapping. Input coverages can be renamed on write, in order to use standard names from the CF convention. Moreover, in case a unit of measure change is involved in this remapping, the data values will be converted to use the canonical unit of measure. Therefore, you may think about configuring the NetCDF output for a “Celsius_Degrees_temp” custom layer to produce an “air_temperature” output expressed in K (Kelvin) to respect the CF Naming convention.
  • support DataPacking on write. This feature allows to store, as an instance, a 64 bit Floating point coverage to a 16 bit Integer data type through a scale & offset mechanism.
  • support for user defined global attributes to be added to the output coverage.
All these new options can be customized through an additional panel available when configuring a layer. 6 More information on the NetCDF output features are available as part of the GeoServer NetCDF Output community module documentation. Hope you have enjoy our NetCDF/GRIB support on GeoServer. The GeoSolutions Team, 320x100_eng
Categories: OSGeo Planet

gvSIG Team: 7as Jornadas Latinoamérica y Caribe: Programa

OSGeo Planet - Mon, 2015-07-27 11:22

00_7LAC_gvSIGYa está disponible el programa de las 7as Jornadas de Latinoamérica y Caribe de gvSIG.

Como ya sabréis este año las Jornadas LAC se celebrarán en Toluca, México, del 26 al 28 de agosto.

En la página web de las Jornadas podéis consultar el programa de actividades con las ponencias que se van a presentar. Un programa muy completo que muestra la variedad de usos de la tecnología gvSIG, y ejemplo de la implantación creciente de gvSIG en los más diversos ámbitos y geografías. Estas jornadas servirán también para conocer los nuevos productos de la Asociación gvSIG, como gvNIX y gvCity.

De forma complementaria al programa, para todos aquellos que quieran más información sobre las Jornadas LAC, hemos ido publicando distintos posts con información de algunos de los talleres que se realizarán en dichas jornadas (y que seguiremos publicando en las próximas semanas).

Os recordamos que también continúa abierta la inscripción, que como en todo evento gvSIG es gratuita, siendo el aforo limitado (y ya hay más de dos centenares de inscritos), por lo que os recomendamos que no esperéis a los últimos días para realizarla.

Aprovechamos para comentaros que varios miembros del equipo gvSIG estaremos en las Jornadas LAC, participando activamente con talleres y ponencias. Y, por supuesto, esperamos que también sea una buena ocasión para conversar, establecer colaboraciones, sumar activos a la comunidad…

¡Os esperamos!


Filed under: community, events, spanish Tagged: 7as LAC
Categories: OSGeo Planet

Antonio Santiago: Generate and host your own raster tiles customized with Mapbox Studio

OSGeo Planet - Sun, 2015-07-26 14:47

If you have never saw maps hosted in Mapbox platform you would probably agree on the quality of its designs. The business of Mapbox is to host and server geospatial data. For this reason, all the great tools Mapbox facilitates are oriented to help their users to prepare and work with their data.

One of the provided tools is Mapbox Studio. Mapbox Studio (MbS) is a desktop application that allows to create CartoCSS themes that are later used to generate raster tiles. Briefly explained, what MbS does is to download OpenStreetMap data in vector format and render it on the fly applying the specified CartoCSS style.

The result of working with MbS is not a set of tiles but a style, that is, a set of rules that express which colour must be used to render roads, at which levels must labels appears and with which size, which colour must be used for ground, etc. This style can be later uploaded to Mapbox platform so that raster tiles were generated on the cloud and we can consume the tiles paying for the service. (Hope one day I can contract their services, they deserve by their great job).

The question we can make us is: how we can generate the raster tiles locally from a given MbS style?

Well, this article is about that. Continue reading.

Working with Mapbox Studio and create your custom style

Let’s start from the beginning so download Mapbox Studio application and install on your system. Once installed execute it and you will be asked to be connected to the Mapbox platform.

There are two main reasons why Mapbox requires you to register as a user. First, the power of the platform is on the cloud and the goal is you upload all your data to the servers. That includes the styles you create.

Second, MbS retrieves data in vector format from Mapbox servers. When you register as a user you get an API token that identifies your requests. Each time MbS makes a request to extract data it has your token that identifies you as user. This way Mapbox can control if any user is making a bad usage of their platform.
Screen Shot 2015-07-25 at 23.43.26

Once logged in you will be allowed to create new map styles. The easiest way is to start using one of the starter styles created by the great Mapbox designers:

Screen Shot 2015-07-25 at 23.47.38

Here we have chose the Mapbox Outdoors style. In the image you can see the style code (CartoCSS which is inspered by CSS) and the resultant tiles obtaining from painting the vector information with the given style rules:

CartoCSS is a Mapnik stylesheet pre-processor developed by MapBox and inspired by Cascadenik. It is like a CSS language specially developed to style maps.

Screen Shot 2015-07-25 at 23.54.20

Store the style with a new name somewhere on your computer, for example, customstyle. If you look at your disk you will see a customstyle.tm2 folder has been created containing a bunch of files that defines the style rules (take a look they are not dangerous).

Finally, modify some properties, for example @land or @crop colors and save to see the result:

Screen Shot 2015-07-25 at 23.54.47

Great !!! You just have created your first custom style.

Generating raster tiles from MbS style

Looking for a solution I discovered the tessera and tl tools. Tessera is a node based command line application. It is based in some modules from mapbox (concretely tilelive) plus others implemented by the author (Seth Fitzsimmons). The result is we can execute tessera passing a MbS defined style, open a browser pointing to a local address and see a map with the raster tiles generated with our MbS style.

Similarly, tl is a node based command line tool we can execute, passing a set of options, to generate a MBTiles file or a pyramid of tiles following the well known z/x/y.png format.

I know about both tools at the article Converting Mapbox Studio Vector Tiles to Rasters from Azavea Labs.

How to install the tools?

NOTE: You need to have NodeJS installed in your system, along with the npm package manager command line tools.

I don’t like to install global node packages (or at least more than the necessary) so I’m going to install the previous tools in a custom folder:

> mkdir tiletools > cd tiletools

Inside the directory execute next sentence, which install the tessera and tl packages among others:

> npm install tessera tl mbtiles mapnik tilelive tilelive-file tilelive-http tilelive-mapbox tilelive-mapnik tilelive-s3 tilelive-tmsource tilelive-tmstyle tilelive-utfgrid tilelive-vector tilejson

You will see a hidden directory named .npm_modules has been created which contains some subdirectories with the same name as the previous packages.

Running tessera

Let’s try to run tessera for the first time. Because it is installed as a local node module execute:

> ./node_modules/tessera/bin/tessera.js Usage: node tessera.js [uri] [options] uri tilelive URI to serve Options: -C SIZE, --cache-size SIZE Set the cache size (in MB) [10] -c CONFIG, --config CONFIG Provide a configuration file -p PORT, --port PORT Set the HTTP Port [8080] -r MODULE, --require MODULE Require a specific tilelive module -S SIZE, --source-cache-size SIZE Set the source cache size (in # of sources) [10] -v, --version Show version info A tilelive URI or configuration file is required.

Tessera requires you pass an URI so it can server its content. It accepts URIs from Mapbox hosted file, Mapnik, Tilemill, Mapbox Studio, …

Repeat again indicating the path to our previously created style indicating the protocol tmstyle://.

> ./node_modules/tessera/bin/tessera.js tmstyle://./customstyle.tm2 Listening at http://0.0.0.0:8080/ /Users/antonio/Downloads/tiletools/node_modules/tessera/server.js:43 throw err; ^ Error: A Mapbox access accessToken is required. `export MAPBOX_ACCESS_TOKEN=...` to set. ...

First seems tessera is working at port 8080 but later we get an error about MAPBOX_ACCESS_TOKEN. If you remember from the first section, Mapbox requires all the requests be signed with the user token. So, you need to get the access token from your account and set it as environment variable before execute tessera:

> export MAPBOX_ACCESS_TOKEN=your_token_here > > ./node_modules/tessera/bin/tessera.js tmstyle://./customstyle.tm2 Listening at http://0.0.0.0:8080/ /Users/antonio/Downloads/tiletools/node_modules/tessera/server.js:43 throw err; ^ Error: Failed to find font face 'Open Sans Bold' in FontSet 'fontset-0' in FontSet

We are close to make it work. The problem now is our MbS style is using a font we have not installed in our system. One easy, but brute force, solution is to install all Google Web Fonts on your system. For this purpose you can use the Web Font Load installation script. In my case I have installed them in the user’s fonts folder ~/Library/Fonts.

Once fonts were installed try executing tessera again:

> ./node_modules/tessera/bin/tessera.js tmstyle://./customstyle.tm2 Listening at http://0.0.0.0:8080/ /Users/antonio/Downloads/tiletools/node_modules/tessera/server.js:43 throw err; ^ Error: Failed to find font face 'Open Sans Bold' in FontSet 'fontset-0' in FontSet

That’ s a bit strange, we have just installed the fonts but they are not found. What is happening? Well, tessera uses mapnik to create the raster tiles and it looks for fonts in the folders specified by the environment variable MAPNIK_FONT_PATH, so let define the variable:

> export MAPNIK_FONT_PATH=~/Library/Fonts/

and execute the script again:

> ./node_modules/tessera/bin/tessera.js tmstyle://./customstyle.tm2 Listening at http://0.0.0.0:8080/ /Users/antonio/Downloads/tiletools/node_modules/tessera/server.js:43 throw err; ^ Error: Failed to find font face 'Arial Unicode MS Regular' in FontSet 'fontset-0' in FontSet

OMG !!! This seems a never ending story. Now we need to install the Arial Unicode font. Look for it, install in your system and execute tessera again:

> ./node_modules/tessera/bin/tessera.js tmstyle://./customstyle.tm2 Listening at http://0.0.0.0:8080/

Great !!! It seems tessera is working fine. Let’s go to open our browser pointing to http://localhost:8080 and see the result:

A map implemented using Leaflet web mapping library is shown, rendering raster tiles that are created in the fly. Look at the console to see the tessera output information:

We can see how tiles at current zoom, the zoom level 8, has been generated.

At this point we have tessera working but what about generate a local pyramid of tiles for a given zoom levels and a given bounding box?

Generating a custom pyramid of tiles with tl command line tool

Before continue we need to know which bounding box we want to generate, the whole World? or only a piece. In my case I want three zoom levels (7, 8 and 9) wrapping Catalonia.

There are some online tools you can use to get the bbox of a region, but one I like it the Bounding Box Tool from Klokan Technologies.

The tl tool can run three main commands but are only interested in the copy one, which copies data between two providers. In our case the MbS style is one provider and the file system is the other. Run the tl command to see the available options:

> ./node_modules/tl/bin/tl.js copy -help '-p' expects a value Usage: node tl.js copy <source> <sink> [options] source source URI sink sink URI Options: -v, --version Show version info -b BBOX, --bounds BBOX WGS84 bounding box [-180,-85.0511,180,85.0511] -z ZOOM, --min-zoom ZOOM Min zoom (inclusive) [0] -Z ZOOM, --max-zoom ZOOM Max zoom (inclusive) [22] -r MODULE, --require MODULE Require a specific tilelive module -s SCHEME, --scheme SCHEME Copy scheme [scanline] -i FILE, --info FILE TileJSON copy data between tilelive providers

So let’s go to execute the command to copy data from our MbS style to the local tiles folder. We want to generate tiles from zoom level 7 to 9 and indicating a bounding box wrapping Catalonia.

Remember the -b options must be indicated as [minLon minLat maxLon maxLat].

> ./node_modules/tl/bin/tl.js copy -z 7 -Z 9 -b "0.023293972 40.4104003077 3.6146087646 42.9542303723" tmstyle://./customstyle.tm2/ file://./tiles Segmentation fault: 11

Ough !!! That hurts, a segmentation fault. After looking for a while I realised it seems a bug. To solve it go to tl/node_modules/abaculus/node_modules and remove the mapnik folder dependency. It is redundant because there is one installed in parent folder.

Execute the command again and see the output:

The tl tool has created a local tiles directory and generated all the raster tiles for the given zoom levels and bounding box. The output shows in addition the time required to generate each tile.

That’s all. Now we only need to host the tiles at our own servers !!!

 

Related Posts:
Categories: OSGeo Planet

Bjorn Sandvik: Master maps

OSGeo Planet - Sat, 2015-07-25 07:53
I’m going freelance over the summer, after 5 great years at the Norwegian Broadcasting Corporation (NRK). It was not an easy decision, but I have to try. I’ll tell more about my plans later. Please sign up to get notified about my services.



Some of the projects I've been working on at NRK:

The flexible mapping stack of NRK.no, allowing journalists and digital storytellers to create advanced maps in minutes. 
"Kartoteket" - our in-house mapping tool built on top of our mapping stack.
Digital storytelling using NRKs mapping stack and Mapbox. 
Digital storytelling using NRKs mapping stack and Mapbox. 
Flood maps using NRKs mapping stack and CartoDB.
Radon affected areas in Norway using NRKs mapping stack.
Our popular photo maps
Video map of the long running TV show Norge Rundt.Tracking of "Sommerbåten" along the coast of Norway.
Other work.
Categories: OSGeo Planet

GeoServer Team: GeoServer 2.7.2 released

OSGeo Planet - Fri, 2015-07-24 07:32

The GeoServer team is happy to announce the release of GeoServer 2.7.2. Download bundles are provided (zipwardmg and exe)  along with documentation and extensions.

GeoServer 2.7.2 is a stable release of GeoServer recommended for production deployment. Thanks to everyone taking part, submitting fixes and new functionality including:

  • Importer raster improvements, added support for GDAL based file optimization when importing rasters, also, it is now possible to add add granules to a mosaic (and optimize them with GDAL in the process)
  • Importer vector improvements, now one can import data into non JDBC data stores too
  • Some improvements in the documentation on using GDAL based data sources in Windows
  • More teaks on the XXE vulnerability fixes (we left it open just enough not to break OGC compliance)
  • Properly rendering GeoTiff files with flipped Y axis
  • Making sure WPS really stops answering requests when not enabled
  • Improvements in NetCDF handling of reprojected requests
  • For a full list, see the release notes.

Also, as a heads up for Oracle users, the Oracle store does not ship anymore with the JDBC driver (due to redistribution limitations imposed by Oracle).

Thanks to Andrea (GeoSolutions) and Kevin (Boundless) for this release

 

Categories: OSGeo Planet

Markus Neteler: Sol Katz Award – Call for Nominations

OSGeo Planet - Thu, 2015-07-23 20:54

The Open Source Geospatial Foundation would like to open nominations for the 2015 Sol Katz Award for Geospatial Free and Open Source Software.

The Sol Katz Award for Geospatial Free and Open Source Software (GFOSS) will be given to individuals who have demonstrated leadership in the GFOSS community. Recipients of the award will have contributed significantly through their activities to advance open source ideals in the geospatial realm.

Sol Katz was an early pioneer of GFOSS and left behind a large body of work in the form of applications, format specifications, and utilities while at the U.S. Bureau of Land Management. This early GFOSS archive provided both source code and applications freely available to the community. Sol was also a frequent contributor to many geospatial list servers, providing much guidance to the geospatial community at large.

Sol unfortunately passed away in 1999 from Non-Hodgkin’s Lymphoma, but his legacy lives on in the open source world. Those interested in making a donation to the American Cancer Society, as per Sol’s family’s request, can do so at https://donate.cancer.org/index.

Nominations for the Sol Katz Award should be sent to SolKatzAward@osgeo.org with a description of the reasons for this nomination. Nominations will be accepted until 23:59 UTC on August 21st (http://www.timeanddate.com/worldclock/fixedtime.html?month=8&day=21&year=2015&hour=23&min=59&sec=59).
A recipient will be decided from the nomination list by the OSGeo selection committee.

The winner of the Sol Katz Award for Geospatial Free and Open Source Software will be announced at the FOSS4G-Seoul event in September. The hope is that the award will both acknowledge the work of community members, and pay tribute to one of its founders, for years to come.

It should be noted that past awardees and selection committee members are not eligible.

More info at the Sol Katz Award wiki page
http://wiki.osgeo.org/wiki/Sol_Katz_Award

Past Awardees:

2014: Gary Sherman
2013: Arnulf Christl
2012: Venkatesh Raghavan
2011: Martin Davis
2010: Helena Mitasova
2009: Daniel Morissette
2008: Paul Ramsey
2007: Steve Lime
2006: Markus Neteler
2005: Frank Warmerdam

Selection Committee 2015:

Jeff McKenna (chair)
Frank Warmerdam
Markus Neteler
Steve Lime
Paul Ramsey
Sophia Parafina
Daniel Morissette
Helena Mitasova
Martin Davis
Venkatesh Raghavan
Arnulf Christl
Gary Sherman

The post Sol Katz Award – Call for Nominations appeared first on GFOSS Blog | GRASS GIS Courses.

Categories: OSGeo Planet
Syndicate content