[R-sig-Geo] Issues with a GDB file in R?

Aguirre Perez, Roman ra454 at exeter.ac.uk
Wed May 2 19:34:41 CEST 2018


Hi everyone,

I’ve been struggling with a ESRI Geodatabase file (clc12_Version_18_5.gdb) which is a layer of land cover classes available on

https://land.copernicus.eu/pan-european/corine-land-cover/clc-2012?tab=download

whose size is 2.61 GB once unzipped.

My ultimate task is to overlay it with the last NUTS3 administrative boundaries shapefile (2013) available on

http://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units

in order to compute the area covered by each class within each NUTS3 region.

Despite the ease of friendly software for performing this task, haven’t been capable of doing it - GRASS didn’t load the file as the log reports problems with the polygons, QGIS shows a warning regarding a specific object and ArcGIS got frozen. I guess it’s because the PC I used doesn’t have enough capacity. Unfortunately, I don’t have access to a more powerful one.

Anyway, I decided to try with R -after all, I’ll perform my analysis with it. So I started exploring this GDB with rgdal:

ogrInfo(dsn="clc12_Version_18_5.gdb",layer="clc12_Version_18_5")

Source: "/Users/Roman/Desktop/clc12gdb/clc12_Version_18_5.gdb",
layer: "clc12_Version_18_5"
Driver: OpenFileGDB;
number of rows: 2370829
Feature type: wkbPolygon with 3 dimensions
Extent: (-2693292 -3086662) - (10037210 5440568)
Null geometry IDs: 2156240
CRS: +proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs
Number of fields: 6
name                      type  length  typeName
1 code_12              4       3           String
2 ID                         4       18         String
3 Remark               4       20         String
4 Area_Ha             2       0           Real
5 Shape_Length   2       0           Real
6 Shape_Area       2       0           Real

Then I tried to load it typing

clc<-readOGR(dsn="clc12_Version_18_5.gdb",layer="clc12_Version_18_5")

After 3-5 minutes, it appears the following text:

OGR data source with driver: OpenFileGDB
Source: "/Users/Roman/Desktop/clc12shp/clc12_Version_18_5.gdb", layer: "clc12_Version_18_5"
with 2370829 features
It has 6 fields

Unfortunately, after trying 5 times (each one took around 8 hours) I couldn’t get anything but the following messages:

Warning messages:
1: In readOGR(dsn = "clc12_Version_18_5.gdb", layer = "clc12_Version_18_5") :
Dropping null geometries: 2156240
2: In readOGR(dsn = "clc12_Version_18_5.gdb", layer = "clc12_Version_18_5") :
Z-dimension discarded

Could anyone advise me how to tackle it? I also would appreciate suggestions on how to work with geodatabases - it’s my first time I work with these kind of files so I don’t even know their structure.

By the way, these are my computer and software specifications:

MacBook Pro 2012
Processor 2.6 GHz Intel Core i7
Memory 16 GB DDR3
R 3.5.0
RStudio 1.1.447


Best,
Roman.

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list