Dear Agus,

Thanks for sending me the shapefile off list. It uncovered some unicode
bugs in my code.

If you want to try some experimental code (banned even!), you can try
https://github.com/thk686/rgdal2

Here's some output:

> x = openOGR("/Users/tkeitt/Desktop/mata_atlantica/")
> x
INFO: Open of `/Users/tkeitt/Desktop/mata_atlantica/'
      using driver `ESRI Shapefile' successful.
1: mata_atlantica (3D Polygon)
> ma = x[[1]]
> ma
INFO: Open of `/Users/tkeitt/Desktop/mata_atlantica/'
      using driver `ESRI Shapefile' successful.

Layer name: mata_atlantica
Geometry: 3D Polygon
Feature Count: 895128
Extent: (-55.662438, -29.950859) - (-34.567282, -6.000000)
Layer SRS WKT:
(unknown)
CLASSE: String (254.0)
LEGENDA: String (254.0)
TIPO: String (254.0)
SG_REGIAO: String (50.0)
NM_REGIAO: String (254.0)
SG_FORMACA: String (50.0)
NM_FORMACA: String (254.0)
SG_SUBFORM: String (50.0)
NM_SUBFORM: String (254.0)
SG_COMPL: String (50.0)
NM_COMPL: String (254.0)
> getNextFeature(ma)
OGRFeature(mata_atlantica):0
  CLASSE (String) = Agropecu\xe1ria
  LEGENDA (String) = (null)
  TIPO (String) = (null)
  SG_REGIAO (String) = Ag
  NM_REGIAO (String) = Agropecu\xe1ria
  SG_FORMACA (String) = (null)
  NM_FORMACA (String) = (null)
  SG_SUBFORM (String) = (null)
  NM_SUBFORM (String) = (null)
  SG_COMPL (String) = Ag
  NM_COMPL (String) = (null)
  MULTIPOLYGON (((-36.3374813036245 -8.99999833738976,-36.33747903346337
...

> setSelectWhere(ma, "\'CLASSE\' LIKE \"%ombrofila%\"")
> getNextFeature(ma)
OGRFeature(mata_atlantica):120040
  CLASSE (String) = Floresta Ombrofila Mista Montana
  LEGENDA (String) = Mm
  TIPO (String) = RF
  SG_REGIAO (String) = M
  NM_REGIAO (String) = Floresta Ombr\xf3fila Mista
  SG_FORMACA (String) = Mm
  NM_FORMACA (String) = Montana
  SG_SUBFORM (String) = (null)
  NM_SUBFORM (String) = (null)
  SG_COMPL (String) = Mm
  NM_COMPL (String) = (null)
  POLYGON ((-54.000000230036271 -24.972296230838325,-54.00000014815258 -
...

> length(getIDs(ma))
[1] 26
> sum(unlist(lapplyGeometries(ma, function(g) area(g))))
[1] 0.0008995414

Cheers,
THK


On Thu, Apr 24, 2014 at 10:47 AM, Agus Camacho <agus.camacho@gmail.com>wrote:

> Dear Rgeos,
>
> Id like to know if there is some workaround to import  the lines contained
> by a shape file, avoiding memory problems when the only thing you need is
> the lines it contains.
>
> I mean, reading the lines of the world's coast lines can be done in a
> instant with:
>
> wcoastline <- PBSmapping::importShapefile("GSHHS_c_L1.shp")#
>
> However, reading a relatively small region, like the brazilian atlantic
> forest, seems impossible for my little laptop.  I tried all of these
> possibilities.
>
> AF=PBSmapping::importShapefile("mata_atlantica.shp")
> AF=rgdal::readOGR("dir",layer="mata_atlantica")
> AF=shapefiles::read.shp("mata_atlantica.shp")
>
> Any hint would be very welcome.
> Thanks
> Agus
>
>
>
> --
> Agustín Camacho Guerrero.
> Doutor em Zoologia.
> Laboratório de Herpetologia, Departamento de Zoologia, Instituto de
> Biociências, USP.
> Rua do Matão, trav. 14, nº 321, Cidade Universitária,
> São Paulo - SP, CEP: 05508-090, Brasil.
>
>         [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>


-- 
http://www.keittlab.org/

	[[alternative HTML version deleted]]

