Implementing the WMS GetLegendGraphic request with MapServer

Posted by – Thursday 2012-05-10

UNM’s MapServer supports the WMS request GetLegendGraphic, which according to the WMS specification is not mandatory [note 1].

Fortunately, configuring MapServer to get the WMS server returning the legend graphic for each layer is easy. Unfortunately, the manual section explaining how to do it seems, at least to me, a bit hidden; here is the link: http://bit.ly/Kp3xQx.


notes

[note 1] While UNM’s MapServer – which is free and open source software – as of version 5.2.1, released in January 2009, supported the GetLegendGraphic request, ArcGIS Server – commercial software – did not do it (http://bit.ly/JCcynz) until version 10, released circa October 2011.

Revisiting ECW support to GDAL via plugins: a patch.

Posted by – Wednesday 2012-05-02

In the blog post “Adding ECW support to GDAL via plugins” (February 2011) I shared the experiences I had to get the GDAL library able to work with the proprietary ECW format.

Some days ago I had to repeat the task, and that recipe did not work. Under Debian 6 I was unable to build libecwj2-3.3.tar.gz for GDAL 1.6.3 using GCC 4.4.5. One year ago the environment was different: Debian 5, GDAL 1.5.2 and GCC 4.3.2.

Fortunately, via Google I found “Patch to build libecwj2-3.3.tar.gz with GCC 4.1″ on OSGeo’s gdal-dev mailing list, which gave me a clue to solve the problem.

More…

Adding a Fibre Channel disk to a Debian Linux server

Posted by – Sunday 2012-04-29

Given the deep economic crisis Spain is living, budgets are shrinking and in particular, reusing old computers has become mandatory for many people working in organizations that rely on information technologies.

Giving old computers a new life might come with some curious problems. At work we decided to reuse a HP Proliant server which was bought circa year 2005. It has a four cores Itanium processor, which make it suitable for a task like serving web pages dinamically generated. The problem is its small storage capacity by today’s standards: just two hard disks of 36 GB each one.

Fortunately, the server has two HP QLogic ISP2312 Fibre Channel adapters. Thus storage shortage can be solved without buying additional hard disks (supossing they are avaialable for sale); instead, the needed storage is added via Fibre Channel (FC).

More…

A short note about setting Apache Tomcat 7 environment variables under Debian 6.

Posted by – Sunday 2012-04-22

In this post we will see a way of setting Apache Tomcat, version 7, environment variables when running under Debian 6.

Let’s suposse that Apache Tomcat – Tomcat for short – has been installed in the directory TOMCAT_DIR and that we want to set the used java virtual machine and the amount of used RAM memory.

More…

Retrieving data from LAS files using LibLAS

Posted by – Sunday 2012-02-05

LAS is the de facto standard file format used for interchaging LiDAR data, “a public file format for the interchange of 3-dimensional point cloud data data between data users” [note 1] [1]. It has been created by the ASPRS (American Society for Photogrammetry and Remote Sensing) and the current format version is 1.4 [note 2] [2].

In this post we will see how to retrieve the (x, y, z) data from a LAS file using the LibLAS tools in a Ubuntu Linux environment.

1. Installing LibLAS

In a Ubuntu Linux computer, using the command apt-get to install the package liblas-bin will install the LibLAS utilities [3, 4] plus the required libraries:

$ sudo apt-get install liblas-bin

LibLAS can also be compiled from the source code. On the other hand, MS Windows users can install LibLAS and its associated utilities using OSGeo4w [5].
More…

Anonymous, you are very wrong

Posted by – Sunday 2012-01-22

After Megaupload.com shutdown, Anonymous countered with DDoS attacks against websites such the USA’s Department of Justice or the MPAA.

Anonymous, you are very wrong. Do you know who really is Megaupload’s founder, Kim Schmitz (alias Kim ‘Dotcom’)?

Kim Schmitz, Megaupload's CEO

Kim Schmitz
picture taken from elmundo.es

According to the Wikipedia:

In 1998, Schmitz was sentenced to a probationary sentence of two years for computer fraud and handling stolen goods. According to a report by News & Record, he had traded stolen calling card numbers he bought from hackers in the United States.

[...]

In 2001, Schmitz purchased $375,000 worth of shares of the nearly bankrupt company LetsBuyIt.com and subsequently announced his intention to invest EUR 50 million in the company. Unknown to others, Schmitz did not have the funds available to invest, although the announcement caused the share value of LetsBuyIt.com to jump by nearly 300%. Schmitz quickly sold the shares and profited $1.5 million as a result.

Schmitz had also arranged and obtained an unsecured loan of EUR 280,000 from Monkey AG, a company for which Schmitz had served as Chairman of the Board. The funds were to be paid to Kimvestor AG. As a result, both Monkey and Kimvestor went bankrupt. Schmitz expressed remorse, stating that he had been “dazzled” and had not recognized that he would be unable to repay the loans.

In January 2002, Schmitz was arrested in Bangkok, Thailand, deported to Germany, and sentenced to a probationary sentence of one year and eight months, and a EUR 100,000 fine, the largest insider-trading case in Germany at the time. Schmitz also pleaded guilty to embezzlement in November 2003 and received a two-year probation sentence.

Wikipedia: Kim Dotcom

The (now) defunct Megaupload.com has nothing to see with the Wikipedia or freedom speech in general. By supporting Megaupload.com you are actually disservicing the cause. I did not join last Wednesday blackout to support Kim Schmitz or other crooks who make tons of money by using other’s work.

I do hate the MPAA, the Spanish Sociedad General de Autores y Editores and the like. But what Kim Schmitz does is not the way to follow.

Supporting anti-SOPA Blackout Day

Posted by – Tuesday 2012-01-17

I will support anti-SOPA Blackout Day. Thus, on January 18th this blog will go dark from 00h00 to 24h00 UTC… provided the WordPress plugin I have installed works fine. ;-)

Mister Burns likes SOPA!

Added on January 19, 14h21 CET

It seems that the blackout is beginning to yield actual results:

PIPA support collapses, with 13 new Senators opposed

Members of the Senate are rushing for the exits in the wake of the Internet’s unprecedented protest of the Protect IP Act (PIPA). At least 13 members of the upper chamber announced their opposition on Wednesday. In a particularly severe blow for Hollywood, at least five of the newly-opposed Senators were previously co-sponsors of the Protect IP Act. (Update: since we ran this story, the tally is up to 18 Senators, of which seven are former co-sponsors. See below.)

arstechnica.com: PIPA support collapses, with 13 new Senators opposed

Added on January 22, 02h11 CET

SOPA, PIPA postponed: Nice work, everyone

The Stop Online Piracy Act (SOPA), and the PROTECT-IP Act, known as PIPA, have both been postponed from being voted on in the House and Senate respectively.

[...]

Though both bills have been shelved, both SOPA and PIPA are far from dead. What is clear, however, is that the bills will not return in their current form.

[...]

This isn’t Washington losing. This is Washington listening to the people that it represents. The delay of any action on SOPA and PIPA is a victory for us all, from news publications to ordinary folks on the street.

Nice work, everyone.

ZDNet.com: SOPA, PIPA postponed: Nice work, everyone

Profiling application Last Level Cache cache misses under Linux using Perf Events

Posted by – Wednesday 2011-11-30

In this post we will see how to do some profiling under Ubuntu Linux using Perf Events, present in the kernel since version 2.6.31 [1, 2]. In particular, we will estimate the rate of Last Level Cache (LLC) misses that a Java application has.

There are GIS applications that are computing power hungry; among them applications processing LiDAR data are an example, because the volume of the input data is usually huge. The efficient usage of the processor caches can boost execution time. Given the high penalty processor cache misses have, identifying application areas causing too much cache misses is very important.

1. Installation of Perf Events

Fortunately, Ubuntu Linux offers Perf Events (PE) in the form of binary packages. By using the command apt-get, installation is straighforward:

$ sudo apt-get install linux-tools-common linux-tools-2.6.38-13

Two notes about installation. First, before attempting installation check that the kernel you are using is recent enough: Perf Events [note 1] is available since Linux version 2.6.31. Second, install a version of the package linux-tools matching your kernel version.

More…

Dennis Ritchie dies

Posted by – Thursday 2011-10-13

Rob Pike reports, via its Google+, that Dennis Ritchie died last weekend.

Dennis Ritchie (standing) at a PDP-11

Dennis Ritchie (standing) and Ken Thompson at a PDP-11, 1972
picture courtesy of Bell Labs

Dennis Ritchie is gone, the contributions he made to the computing world – UNIX, the C programming language – will last forever. On ZDNet.com, Rupert Goodwins writes:

“While the introduction of Intel’s 4004 microprocessor in 1971 is widely regarded as a key moment in modern computing, the contemporaneous birth of the C programming language is less well known. Yet the creation of C has as much claim, if not more, to be the true seminal moment of IT as we know it; it sits at the heart of programming — and in the hearts of programmers — as the quintessential expression of coding elegance, power, simplicity and portability.”

“Unix and C’s direct and spiritual descendants cannot be counted, but include Linux, Android, Mac OS, iOS, JavaScript, C++, the genius of the internet and a world full of developers.”

black ribbon

Requiescat in pace
, dmr.

Shapefile projection files available at SpatialReference.org

Posted by – Sunday 2011-09-11

Initially ESRI’s shapefiles were made up of three files stored in the same directory: a .shp file storing the geometries, a .shx file storing “a positional index of the feature geometry to allow seeking forwards and backwards quickly” [1], and a .dbf file [note 1] storing the attribute data.

One feature the original shapefile format lacked was metadata about the used map projection. Later, an optional extension [note 2] was introduced, the .prj files, storing the spatial reference data of the geometries in the .shp file. Joel Lawhead writes in his blog about this issue: “When ESRI created the shapefile format everyone worked with data in only one projection. [...] Not too long ago as hardware capability increased according to Moore’s Law, GIS software packages developed the ability to reproject geospatial layers on the fly. You could now load in layers in any projection and as long as you told the software what projections were involved the map would come together nicely.” [2]

Thus, sometimes the .prj file will be needed despite it is not mandatory. For instance, when publishing a shapefile with GeoServer, attaching the .prj file it is strongly recommended [3]. The .prj file contains information like an identifier of the projection system, datum, used units, spheroid… usually in Well-known Text format.

SpatialReference.org screenshot


SpatialReference.org screenshot

SpatialReference.org is a website worth mentioning. It contains a very complete list of spatial reference systems descriptions “in as many formats as possible” [4]. Among these formats there is .prj file. So if you need the .prj file and already know the used spatial reference, just go to this website, find it by using the search tool and download the .prj file.


notes

[note 1] As the extension suggests, they are dBase files. According to the Wikipedia, “An alternative format that can also be used is the xBase format”.

[note 2] Currently there are 9 extensions, some of them propietary.

references

[1] Shapefile, Wikipedia entry: http://en.wikipedia.org/wiki/Shapefile

[2] “Create a .prj Projection File for a Shapefile”: http://geospatialpython.com/2011/02/create-prj-projection-file-for.html

[3] “Working with Data, Shapefile” (GeoServer 2.1.x User Manual): http://docs.geoserver.org/stable/en/user/data/shapefile.html#adding-a-shapefile

[4] “About Spatial Reference”: http://spatialreference.org/about/