Ismael Olea — web personal
Acerca de

«Producir y nutrir,
producir y no poseer,
obrar y no retener,
acrecentar y no regir,
son el misterio de la vida.
»

Lao Tse hablando de procomunes en el siglo VI ac.

OmegaT packaged with Flatpak

2020-04-14 00:00:00 +0200

OmegaT logo

It took me a while since I announced I retired OmegaT from Fedora and my first try to deploy it with Flatpak and, I hope, Flathub. There were some reasons:

  • I was completely new to Flatpak,
  • the big amount of work to write the manifest of a non trivial application compiled completely from scratch,
  • the complexity at that time of working with Java and Flatpak.

Well, it has been time to resume the task. I’m not really an OmegaT user (I’ve used it just a few times in all these years) but I feel committed helping it to be better known and used in the Linux Desktop. In the past I made a lot of work with technical translations and I fully understand the power of the tool for profesional users and it’s opensource: as far as I know OmegaT is the best CAT (Computer Assisted Translation) opensource tool in the world.

So I’m here again and did some work for a final product. Today the work is a lot of easier because the existence of the OpenJDK Flatpak extension (see this update from Mat Booth). Thanks for this extension! It’s so nice I’m finishing other two java programs to be published at Flathub: Freeplane and JClic. For this release series I’m taking the easy way of packaging the binary portable bundle instead of compiling from sources because… it’s tedious. I am concerned it’s not the best practice. And this time I’ve started from a more recent version beta 5.2.0.

I invite you to give it a try and provide some feedback if any. Some details:

  • install it:
    • $ wget https://dl.bintray.com/olea/org.omegat.App.flatpak (about 170Mb);
    • $ flatpak install --user org.omegat.App.flatpak
  • a merge request at upstream for moving the XDG metadata resources;
  • it will be using org.freedesktop.Sdk.Extension.openjdk11, the LTS OpenJDK extension at Flathub.

Remember when you install a Flatpak package it is fully self-contained, you don’t need to install anything more (in this case the JRE is included in the bundle) and it’s isolated from the rest of the desktop so you’ll be able to keep an install indefinitely without worrying it will broke on any operating system update.

Remember too you could install this bundle in any modern Linux desktop. The only requirement is to have Flatpak installed, as more recents versions of Linux are.

Next steps:

  • finishing a final manifest to propose to Flathub in a couple days or so, which will be, as far as I am concerned, the main publishing site of the Flatpak bundle; when in Flathub any user could install it pointing and clicking as in any other app store;
  • getting accepted at upstream my minor contributions, basicaly metadata;
  • extending the bundle with some of the most popular OmegaT extensions and dictionaries;
  • and eventually rewrite the manifest for compiling from sources.

Hope you’ll find it useful.

PD: fixed how to install the package from CLI and changed a couple times the downloading URL :-/

Mapas fronterizos de España y sus comunidades autónomas

2020-04-04 00:00:00 +0200

Hace unos días expliqué un método para descargar mapas fronterizos a partir de OpenStreetMap. El interés era crear unos mapas de las comunidades autónomas españolas que una compañera de WMES necesitaba para sus clases en la universidad. Así que una vez que he sabido cómo he aprovechado para prepararlos.

Aquí pues está disponible el mapa de bordes fronterizos de España y sus comunidades autónomas para vuestro uso y disfrute.

Los datos están licenciados según las indicaciones de copyright de OSM:

© Colaboradores de OpenStreetMap
Los datos están disponibles bajo la licencia Open Database License (ODbL).

A partir de ahí podéis disponerlo con toda libertad.

Cómo usar el mapa

Se pretende que casi cualquier persona con conocimientos básicos de ofimática pueda usarlos. Una rápida explicación de cómo:

  • El mapa está compuesto por varias capas: una por cada autonomía y ciudad autónoma y otro con los bordes fronterizos de España.
  • Observaréis que las fronteras del país incluyen una parte marítima: son los límites legales de las aguas territoriales.
  • Para vuestro proyecto hay que abrir el fichero completo, con todas las capas. Si sólo necesitáis alguna de las capas podéis desactivar o eliminar las demás.
  • El fichero está en formato KMZ y debería poder abrirse con casi cualquier software que trabaje con mapas. En este caso ha sido compuesto con Google Earth Pro, software multiplataforma disponible gratuitamente.
  • ¿Puedo usar el mapa en Google Maps? En teoría sí porque técnicamente es compatible pero el tamaño es mayor del permitido, así que no puedes importar el mapa completo. Pero si sólo necesitas parte del contenido basta editarlo con aplicación, por ejemplo el mencionado Google Earth, y exportar solamente las capas precisas a un fichero y a su vez importarlo a un mapa en My Maps.

Obviamente si trabajas directamente con datos de OSM no necesitarás este mapa.

Disfrutadlo con salud.

How to create border maps for your projects

2020-03-31 00:00:00 +0200

When working with data projects it is usual to use administrative maps. In my experience is not trivial to find the cartographic files as open access or opensource data sources, so after some search I found a method to create an ad-hoc map for any administrative region coded into OpenStreetMap. It’s not a trivial method but it is no as complex as it seems at first sight. I’ll try to introduce the essential concepts to easy understand the recipe. If you know other methods as good or better than this please give me some feedback.

I used this method with geodata for Spain so I guess it works with any other administrative region coded in OSM.

First you need to know an OpenStreetMap concept: the relation. In our case we’ll use multipolygon relations, used to code the borders of areas of our interests. The important thing to remember here is you are going to use an OSM relation.

Second you’ll want to select the region of your interest and you’ll need to figure out how it has been mapped in OSM. So you need to find the related OSM relation. As example I’ll use Alamedilla, my parents’ town in the province of Granada, Spain.

the method

Go to https://www.openstreetmap.org and search for the region of your interest. For example Alamedilla:

example screenshot

Click to the correct place and you’ll see something like this:

example screenshot

Look at the URL box at the browser and you’ll see something like this: https://www.openstreetmap.org/relation/343442. The code number you need for the next steps is that one in the URL after the relation keyword. In this example is 343442.

Then visit the to overpass turbo service, a powerful web-based data query and filtering tool for OpenStreetMap:

example screenshot

The white box at left is where you write the code of your query for Overpass. You have a wizard tool in the menu but it’s not trivial too. Instead you could copy exactly this code:


[out:json][timeout:2500];
(
    relation(343442)({{bbox}});
);
out body;
>;
out skel qt;

example screenshot

In your case you need to change the 349044 number (used for the Alamedilla’s example) with the relation number you got before. If you modify the query keep in mind the default timeout (25) maybe is not enough for your case.

Now, clicking the Run button you’ll execute your query. Keep in mind the resulting data set could be really big, depending how big the area is.

So, here it is:

example screenshot

Zoom the map to have a better view:

example screenshot

Now you’ll find the resulting data set in GeoJSON format ready at the Data tab (right side). If this format is fine for you you are done. But if you need some other you are lucky enough because when clicking into Export button you’ll find some other formats to export: GPX, KML and OSM data.

In this example we’ll use the KML format used by Google Earth, Maps and many others.

example screenshot

importing into Google Earth

Open Google Earth:

example screenshot

and open our kml file: [File][Open]:

example screenshot

and here it is:

example screenshot

Note: I modified the color (at the object properties) to make it more visible in the screenshot.

So, it is done. Now you can use the kml file in your application, import to any GIS software or convert to another format if required.

importing into Google Maps

Go to Google MyMaps and create a new one. Import a new layer an select your kml file:

example screenshot

Here it is:

example screenshot

conclusion

Now you are able to create maps of any region added into OpenStreetMap, export them to any of the said formats and import into your applications. Hope this helps.

If you finally use data from the OSM project remember to add the correct credits:

We require that you use the credit “© OpenStreetMap contributors”.

See credit details at osm.org/copyright.

This is an example of how AWESOME OpenStreetMap is and the extraordinaire work these people does. Big thanks to all of the contributros for these impressive service.

  • Ismael Olea — web personal
  •  

Pastoreando procomunes desde 1994 — Shepherding the commons since 1994

This website runs on green hosting - verified by thegreenwebfoundation.org GPDR friendly statistics