Skip to content

plotKML::plotKML creates multiple errors in Google Earth (Ubuntu 14.10)

5 messages · Edzer Pebesma, Michael Sumner, Tomislav Hengl +1 more

#
Hi there,

I am trying to use the R package *plotKML* to plot a
sp::SpatialPolygonDataframe in *GoogleEarth*. I am using Ubuntu 14.10.
Unfortunately, I facing various errors here...

Here my reproducable example in R:

############################################
    library("plotKML")
    library("CARBayes")
    library("sp")
    data(spatialhousedata)
    names(spatialhousedata at data)
    proj4string(spatialhousedata) <- CRS("+proj=utm
                +zone=33 +ellps=GRS80 +units=m +no_defs")
    plotKML(spatialhousedata, var.name="price")
############################################

First, R spits out a lot of error lines:

#############################################
    Plotting the first variable on the list
    KML file opened for writing...
    Reprojecting to +proj=longlat +datum=WGS84 ...
    Writing to KML...
    Closing  spatialhousedata.kml
    [0319/101818:ERROR:net_util.cc(2195)] Not implemented reached in
bool net::HaveOnlyLoopbackAddresses()
    [0319/101819:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP
handler.
    [0319/101819:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP
handler.
    [0319/101819:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP
handler.
    [0319/101819:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP
handler.
...
...
...
#############################################

Then *GoogleEarth* opens and welcomes me with this error message
(which I translated from German):

----------------------------
*Polygons bound to the ground are not supported*

Polygons bound to the ground can only be displayed as boundaries on
your computer. Your graphics does not support this function.
----------------------------

Then it finally plots only the boundaries of *spatialhousedata* instead
of the coloured polygons (choropleth map) of spatialhousedata at data$price.

Here is my graphics info from Ubuntu:

-----------------------------
    me at me-ThinkPad-T420:~$  sudo lshw -c video

      *-display
           Beschreibung: VGA compatible controller
           Produkt: 2nd Generation Core Processor
                    Family Integrated Graphics Controller
           Hersteller: Intel Corporation
           Physische ID: 2
           Bus-Informationen: pci at 0000:00:02.0
           Version: 09
           Breite: 64 bits
           Takt: 33MHz
           F?higkeiten: msi pm vga_controller bus_master cap_list rom
           Konfiguration: driver=i915 latency=0
           Ressourcen: irq:42 memory:f0000000-f03fffff
                       memory:e0000000-efffffff ioport:5000(Gr??e=64)
------------------------------

And this is the version info from Google Earth:

-----------------------------
    Google Earth: 7.1.2.2041
    Build-Date: 10/7/2013
    Build-Time: 12:17:00 nachmittags
    Renderer: OpenGL
    OS: Linux (3.13.0.0)
    Graphics Driver: Intel Open Source Technology Center
-----------------------------

*Any ideas how to solve this?*

Best,

Guido
#
I can reproduce this under ubuntu 14.04 LTS. In my understanding, the
ubuntu (or linux) google-earth is by far not as good as it is under
windows or Mac OS-X, and this has been so for a long time. The only
solution I can think of is to work towards a solution without
google-earth, or make the switch to windows or mac.

Or is the story different with google-earth pro, which is now free?
On 03/19/2015 06:56 PM, Guido Schulz wrote:

  
    
#
Cesium looks like a good alternative to GE, fwiw.

Cheers, Mike

On Fri, 20 Mar 2015 08:39 Edzer Pebesma <edzer.pebesma at uni-muenster.de>
wrote:

  
  
#
I've tried this code on my Win7 machine and it works fine:

...
 > plotKML(spatialhousedata["price"])
Plotting the first variable on the list
KML file opened for writing...
Reprojecting to +proj=longlat +datum=WGS84 ...
Writing to KML...
Closing  spatialhousedata__price__.kml

Note that you can best plot the target column by subsetting it e.g. 
'spatialhousedata["price"]' ('var.name' argument is only used for soil 
profiles; see http://plotkml.r-forge.r-project.org/plotKML.html). If you 
need more graphical control, try using:

 > kml(spatialhousedata, colour=price, colour_scale=SAGA_pal[[1]])

To solve the error messages you get from Google Earth under Ubuntu you 
need to write to Google Earth developers (plotKML is completely 
independent from Google Earth of course).

HTH,

T. (Tom) Hengl
Researcher @ ISRIC - World Soil Information
Team member Africa Soil Information Services http://africasoils.net
Url: http://www.wageningenur.nl/en/Persons/dr.-T-Tom-Hengl.htm
Network: http://profiles.google.com/tom.hengl
Publications: http://scholar.google.com/citations?user=2oYU7S8AAAAJ
On 19-3-2015 18:56, Guido Schulz wrote:
#
I briefly tried cesium, but I couldn't manage to open a local KML file
with it. But it is supposed to work somehow...

Google Earth Pro has only the Linux binaries for download at the moment,
but I might give it a try...

In the end, I really might have to install Windows 7 for a dual boot...

Best,

G


Am 19.03.2015 um 23:04 schrieb Michael Sumner: