[R-sig-Geo] plotKML::plotKML creates multiple errors in Google Earth (Ubuntu 14.10)

Tomislav Hengl hengl at spatial-analyst.net
Fri Mar 20 12:22:41 CET 2015


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:
> 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
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



More information about the R-sig-Geo mailing list