[R-sig-Geo] Importing only lines from big shape file

Javier Garcia-Pintado j.garcia-pintado at reading.ac.uk
Thu Apr 24 18:02:27 CEST 2014


A possibility is, if you are interested in some specific area of the mata atlantica, to crop the file externally with OGR just for your study area, and read the cropped file into R.

Javier
---
__________
From: r-sig-geo-bounces at r-project.org [r-sig-geo-bounces at r-project.org] on behalf of Barry Rowlingson [b.rowlingson at lancaster.ac.uk]
Sent: 24 April 2014 16:58
To: Agus Camacho
Cc: r-sig-geo
Subject: Re: [R-sig-Geo] Importing only lines from big shape file

On Thu, Apr 24, 2014 at 4:47 PM, Agus Camacho <agus.camacho at 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.
>

 Ummm not sure this makes sense. You can read all the coastlines, but not
some of the coastlines?

 Are the mata_atlantica  files bigger because they are more detailed?
Sometimes global data is generalized.

 Show us the size in bytes of the files...

Barry

        [[alternative HTML version deleted]]

_______________________________________________
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