Hi Erin,
did you check the book from Roger Bivand -Edzer Pebesma and Gomez-Rubėo: Applied spatial data analysis with R?
There is some short explanation of how the algorithm work and just one record of code.
If you want I think I can send you some line of codes as examples.


Giuseppe



________________________________
Da: "r-sig-geo-request@r-project.org" <r-sig-geo-request@r-project.org>
A: r-sig-geo@r-project.org
Inviato: Lunedė 17 Ottobre 2011 12:00
Oggetto: R-sig-Geo Digest, Vol 98, Issue 15

----- Messaggio inoltrato -----

Send R-sig-Geo mailing list submissions to
    r-sig-geo@r-project.org

To subscribe or unsubscribe via the World Wide Web, visit
    https://stat.ethz.ch/mailman/listinfo/r-sig-geo
or, via email, send a message with subject or body 'help' to
    r-sig-geo-request@r-project.org

You can reach the person managing the list at
    r-sig-geo-owner@r-project.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-sig-Geo digest..."

Today's Topics:

   1. errors in installing HDF5 package under windows (zhijie zhang)
   2. IDW example (Hodgess, Erin)
   3. Creating big raster from small tiles (steven mosher)
   4. Re: Creating big raster from small tiles (steven mosher)
   5. Re: Creating big raster from small tiles (Robert J. Hijmans)
   6. Re: Getting the other GIS to recognize files created by
      writeRaster() (Robert J. Hijmans)
   7. measuring angle or relative direction of 2 lines (Tracey Osborne)
   8. Re: Creating big raster from small tiles (steven mosher)
   9. Re: errors in installing HDF5 package under windows
      (Paul Hiemstra)
  10. Re: Delete points within a certain distance of each    other
      (Paul Hiemstra)
  11. Re: Delete points within a certain distance of each    other
      (Mathieu Rajerison)
  12. Re: errors in installing HDF5 package under windows
      (Paul Hiemstra)
Dear all,
  The HDF5 binary package is not available now, so i download the source
package and unzip it. When i check it before building the package, some
errors appeared, see below. I donot think it's related with the R and HDF5
versions. I guess i missed something here.
--Errors--
* installing *source* package 'hdf5' ...
cygwin warning:
  MS-DOS style path detected:
C:/PROGRA~1/R/R-213~1.2/bin/i386/HDF5~1.RCH/hdf5/libs
  Preferred POSIX equivalent is:
/cygdrive/c/PROGRA~1/R/R-213~1.2/bin/i386/HDF5~1.RCH/hdf5/libs
  CYGWIN environment variable option "nodosfilewarning" turns off this
warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
cp: cannot stat `/cygdrive/d/Backup/my
documents/hdf5-support/cyghdf5-0.dll': No such file or directory
cp: cannot stat `/cygdrive/d/Backup/my documents/hdf5-support/mgwz.dll': No
such file or directory
ERROR: configuration failed for package 'hdf5'
* removing 'C:/PROGRA~1/R/R-213~1.2/bin/i386/HDF5~1.RCH/hdf5'
---------
If anybody have some experiences on reading HDF4 and HDF5 datasets
successfully, please also give me more information on this.
  I have searched the R help, and cannot find a solution. Somebody suggest
the rgdal, which seems not to work.
  Any suggestions or help are greatly appreciated.

-- 
With Kind Regards,

oooO:::::::::
(..):::::::::
:\.(:::Oooo::
::\_)::(..)::
:::::::)./:::
::::::(_/::::
:::::::::::::
[***********************************************************************]
ZhiJie Zhang,MD,PhD
Dept.of Epidemiology, School of Public Health,Fudan University
Office:Room 443, Building 8
Office Tel./Fax.:+86-21-54237410
Address:No. 138 Yi Xue Yuan Road,Shanghai,China
Postcode:200032
Email:epistat@gmail.com
[***********************************************************************]
oooO:::::::::
(..):::::::::
:\.(:::Oooo::
::\_)::(..)::
:::::::)./:::
::::::(_/::::
:::::::::::::

    [[alternative HTML version deleted]]


Dear R Sig Geo People:

Here is probably a dumb question, so please forgive me in advance (or swear, whatever is most appropriate):  could someone recommend a good reference on IDW that has a numeric example, please?

I like to work things out on a small scale to see how they work.

thanks,
Erin


Erin M. Hodgess, PhD
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: hodgesse@uhd.edu


    [[alternative HTML version deleted]]


I have 72 "tiles" in a tif format and each tile is   30X30

>tile
class       : RasterLayer
dimensions  : 3600, 3600, 12960000  (nrow, ncol, ncell)
resolution  : 0.008333333, 0.008333333  (x, y)
extent      : 60, 90, 60, 90  (xmin, xmax, ymin, ymax)
coord. ref. : NA
values      : C:/Users/steve/....
min value   : 0
max value   : 255

What I'd like to do is find  the fastest way to bring all 72 tiles
into one big raster.

merge() seems like one good choice, where I would   merge each tile
with a blank raster that would get
filled in incrementally by each tile

> world
class       : RasterLayer
dimensions  : 21600, 43200, 933120000  (nrow, ncol, ncell)
resolution  : 0.008333333, 0.008333333  (x, y)
extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0
values      : none

world <- merge(tile, world)

and the  repeat that for the remaining 71 tiles.  I'm also think that
one could extract the values from the tile
and use setValues  but  that appears to hit the memory wall in
Windows.  The other option
I suppose is to use writeValues()  and create  a big file from the tiles.

Am I missing any obvious options?

Steve


unionExtent() looks like the best approach.


On Sun, Oct 16, 2011 at 8:54 PM, steven mosher <moshersteven@gmail.com> wrote:
>  I have 72 "tiles" in a tif format and each tile is   30X30
>
>>tile
> class       : RasterLayer
> dimensions  : 3600, 3600, 12960000  (nrow, ncol, ncell)
> resolution  : 0.008333333, 0.008333333  (x, y)
> extent      : 60, 90, 60, 90  (xmin, xmax, ymin, ymax)
> coord. ref. : NA
> values      : C:/Users/steve/....
> min value   : 0
> max value   : 255
>
> What I'd like to do is find  the fastest way to bring all 72 tiles
> into one big raster.
>
> merge() seems like one good choice, where I would   merge each tile
> with a blank raster that would get
> filled in incrementally by each tile
>
>> world
> class       : RasterLayer
> dimensions  : 21600, 43200, 933120000  (nrow, ncol, ncell)
> resolution  : 0.008333333, 0.008333333  (x, y)
> extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
> coord. ref. : +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs +towgs84=0,0,0
> values      : none
>
> world <- merge(tile, world)
>
> and the  repeat that for the remaining 71 tiles.  I'm also think that
> one could extract the values from the tile
> and use setValues  but  that appears to hit the memory wall in
> Windows.  The other option
> I suppose is to use writeValues()  and create  a big file from the tiles.
>
> Am I missing any obvious options?
>
> Steve
>


Steven,

In principle you could give merge all tiles (e.g. make a list of RasterLayer
objects and use do.call ) but merge is quite slow (something that can easily
be be improved; and I expect it will be over the coming months).

What I would do is use run gdalbuildvrt (that comes with the FWtools). This
creates a single header file that lets you access all the tiles as a single
virtual file. If you want a single file for better performance, you can use
writeRaster to save it to e.g. a single geotiff file.

Robert


On Sun, Oct 16, 2011 at 8:54 PM, steven mosher <moshersteven@gmail.com>wrote:

>  I have 72 "tiles" in a tif format and each tile is   30X30
>
> >tile
> class       : RasterLayer
> dimensions  : 3600, 3600, 12960000  (nrow, ncol, ncell)
> resolution  : 0.008333333, 0.008333333  (x, y)
> extent      : 60, 90, 60, 90  (xmin, xmax, ymin, ymax)
> coord. ref. : NA
> values      : C:/Users/steve/....
> min value   : 0
> max value   : 255
>
> What I'd like to do is find  the fastest way to bring all 72 tiles
> into one big raster.
>
> merge() seems like one good choice, where I would   merge each tile
> with a blank raster that would get
> filled in incrementally by each tile
>
> > world
> class       : RasterLayer
> dimensions  : 21600, 43200, 933120000  (nrow, ncol, ncell)
> resolution  : 0.008333333, 0.008333333  (x, y)
> extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
> coord. ref. : +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
> +towgs84=0,0,0
> values      : none
>
> world <- merge(tile, world)
>
> and the  repeat that for the remaining 71 tiles.  I'm also think that
> one could extract the values from the tile
> and use setValues  but  that appears to hit the memory wall in
> Windows.  The other option
> I suppose is to use writeValues()  and create  a big file from the tiles.
>
> Am I missing any obvious options?
>
> Steve
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

    [[alternative HTML version deleted]]


Dylan, It seems to me that this problem was fixed in ArcGIS 10. Perhaps a
good reason to upgrade? Robert

On Thu, Oct 13, 2011 at 10:57 AM, Dylan Beaudette <dylan.beaudette@gmail.com
> wrote:

> I can't believe that I am asking for advice on how to assist my
> special-needs GIS software with recognizing files created by the
> raster/rgdal packages.
>
> Recently (after some silent update by IT no doubt), I noticed that
> files created like this:
>
> writeRaster(r.mast,  filename='spatial_data/latest/mast-model',
> datatype='FLT4S', format='ENVI', overwrite=TRUE, NAflag=-999)
>
> ... aren't read-in properly by ArcGIS (9.3.1). Specifically, the
> raster statistics and the NODATA value aren't read from the file or
> from the .xml file that is automatically generated by GDAL. I have
> tried all of the different formats supported by the raster package,
> with the 'ENVI' format getting the closest to working (statistics
> almost correct but missing NODATA information). Are there any
> additional things I can do to help ArcGIS figure these files out
> without any tweaking from within the hulking beast? Ideally, I would
> like to update model estimates on a semi-regular basis and have the
> files ready for viewing by colleagues-- without manual intervention.
>
> Thanks!
>
> Dylan
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

    [[alternative HTML version deleted]]


measuring the angle between intersecting lines:  Does anyone know of any
helpful tools/methods in R for measuring the angle between two intersecting
lines in a map or an equation that would do so with the start and end
latitudes and longitudes of the two lines?  Or give directions of lines?

Cheers
Tracey

    [[alternative HTML version deleted]]


Thanks,

    I basically have to reclass()  all 72 tiles, then aggregate() them
from 30 arc seconds to 5 minutes  and eventually put them in a brick
with other rasters
so I can average across the layers.

I thought unionExtent() was going to be the ticket, but that just
effects the extent.
unionRaster() is really what would be cool for working with tiles.
I'll take a look
at the gdal stuff

Steve



On Sun, Oct 16, 2011 at 10:01 PM, Robert J. Hijmans <r.hijmans@gmail.com> wrote:
> Steven,
> In principle you could give merge all tiles (e.g. make a list of RasterLayer
> objects and use do.call ) but merge is quite slow (something that can easily
> be be improved; and I expect it will be over the coming months).
> What I would do is use run gdalbuildvrt (that comes with the FWtools). This
> creates a single header file that lets you access all the tiles as a single
> virtual file. If you want a single file for better performance, you can use
> writeRaster to save it to e.g. a single geotiff file.
>
> Robert
>
> On Sun, Oct 16, 2011 at 8:54 PM, steven mosher <moshersteven@gmail.com>
> wrote:
>>
>>  I have 72 "tiles" in a tif format and each tile is   30X30
>>
>> >tile
>> class       : RasterLayer
>> dimensions  : 3600, 3600, 12960000  (nrow, ncol, ncell)
>> resolution  : 0.008333333, 0.008333333  (x, y)
>> extent      : 60, 90, 60, 90  (xmin, xmax, ymin, ymax)
>> coord. ref. : NA
>> values      : C:/Users/steve/....
>> min value   : 0
>> max value   : 255
>>
>> What I'd like to do is find  the fastest way to bring all 72 tiles
>> into one big raster.
>>
>> merge() seems like one good choice, where I would   merge each tile
>> with a blank raster that would get
>> filled in incrementally by each tile
>>
>> > world
>> class       : RasterLayer
>> dimensions  : 21600, 43200, 933120000  (nrow, ncol, ncell)
>> resolution  : 0.008333333, 0.008333333  (x, y)
>> extent      : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
>> coord. ref. : +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
>> +towgs84=0,0,0
>> values      : none
>>
>> world <- merge(tile, world)
>>
>> and the  repeat that for the remaining 71 tiles.  I'm also think that
>> one could extract the values from the tile
>> and use setValues  but  that appears to hit the memory wall in
>> Windows.  The other option
>> I suppose is to use writeValues()  and create  a big file from the tiles.
>>
>> Am I missing any obvious options?
>>
>> Steve
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>


On 10/16/2011 02:10 PM, zhijie zhang wrote:
> cygwin warning:
>   MS-DOS style path detected:
> C:/PROGRA~1/R/R-213~1.2/bin/i386/HDF5~1.RCH/hdf5/libs
>   Preferred POSIX equivalent is:
> /cygdrive/c/PROGRA~1/R/R-213~1.2/bin/i386/HDF5~1.RCH/hdf5/libs
>   CYGWIN environment variable option "nodosfilewarning" turns off this
> warning.

Have you tried this suggestion?

Paul

-- 
Paul Hiemstra, Ph.D.
Global Climate Division
Royal Netherlands Meteorological Institute (KNMI)
Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39
P.O. Box 201 | 3730 AE | De Bilt
tel: +31 30 2206 494

http://intamap.geo.uu.nl/~paul
http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770


On 10/15/2011 02:57 PM, Sandeep Patil wrote:
> Hello all
>
> I have about 4500 spatial points which are irregularly spaced...
>
> What is want to do is to replace points that are clustered very near
>
> each other by one point ...i.e say the distance betweeen Point A & Point B
>
> is less than a threshold that i will define , i will delete either A or B
> and essentially
>
> do this for the complete dataset so that there is at least a minimum
> separation
>
> between every pair of points.
>
> Any idea how to proceed ?
>
> Sandeep
>
>     [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

?spDists, ?zerodist

Paul

-- 
Paul Hiemstra, Ph.D.
Global Climate Division
Royal Netherlands Meteorological Institute (KNMI)
Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39
P.O. Box 201 | 3730 AE | De Bilt
tel: +31 30 2206 494

http://intamap.geo.uu.nl/~paul
http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770


spatstat::nndist?

2011/10/17 Paul Hiemstra <paul.hiemstra@knmi.nl>

> On 10/15/2011 02:57 PM, Sandeep Patil wrote:
> > Hello all
> >
> > I have about 4500 spatial points which are irregularly spaced...
> >
> > What is want to do is to replace points that are clustered very near
> >
> > each other by one point ...i.e say the distance betweeen Point A & Point
> B
> >
> > is less than a threshold that i will define , i will delete either A or B
> > and essentially
> >
> > do this for the complete dataset so that there is at least a minimum
> > separation
> >
> > between every pair of points.
> >
> > Any idea how to proceed ?
> >
> > Sandeep
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
> ?spDists, ?zerodist
>
> Paul
>
> --
> Paul Hiemstra, Ph.D.
> Global Climate Division
> Royal Netherlands Meteorological Institute (KNMI)
> Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39
> P.O. Box 201 | 3730 AE | De Bilt
> tel: +31 30 2206 494
>
> http://intamap.geo.uu.nl/~paul
> http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

    [[alternative HTML version deleted]]


Hi,

I'm not a Windows/Cygwin user myself. So I can't really provide with
more advice than I already have.

good luck,
Paul

On 10/17/2011 09:03 AM, zhijie zhang wrote:
> Dear Paul,
>   I can understand the warnings, but donot know exactly how to fix this.
>   Could you please give me more instructions on how to fix this?
>   Thanks a lot.
>
> On Mon, Oct 17, 2011 at 3:42 PM, Paul Hiemstra <paul.hiemstra@knmi.nl
> <mailto:paul.hiemstra@knmi.nl>> wrote:
>
>     On 10/16/2011 02:10 PM, zhijie zhang wrote:
>     > cygwin warning:
>     >   MS-DOS style path detected:
>     > C:/PROGRA~1/R/R-213~1.2/bin/i386/HDF5~1.RCH/hdf5/libs
>     >   Preferred POSIX equivalent is:
>     > /cygdrive/c/PROGRA~1/R/R-213~1.2/bin/i386/HDF5~1.RCH/hdf5/libs
>     >   CYGWIN environment variable option "nodosfilewarning" turns
>     off this
>     > warning.
>
>     Have you tried this suggestion?
>
>     Paul
>
>     --
>     Paul Hiemstra, Ph.D.
>     Global Climate Division
>     Royal Netherlands Meteorological Institute (KNMI)
>     Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39
>     P.O. Box 201 | 3730 AE | De Bilt
>     tel: +31 30 2206 494
>
>    http://intamap.geo.uu.nl/~paul <http://intamap.geo.uu.nl/%7Epaul>
>    http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770
>
>
>
>
> -- 
> With Kind Regards,
>
> oooO:::::::::
> (..):::::::::                                                  
> :\.(:::Oooo::                             
> ::\_)::(..)::      
> :::::::)./:::                      
> ::::::(_/::::                                                      
> :::::::::::::
> [***********************************************************************]
> ZhiJie Zhang,MD,PhD 
> Dept.of Epidemiology, School of Public Health,Fudan University 
> Office:Room 443, Building 8
> Office Tel./Fax.:+86-21-54237410    
> Address:No. 138 Yi Xue Yuan Road,Shanghai,China  
> Postcode:200032  
> Email:epistat@gmail.com <mailto:Email%3Aepistat@gmail.com>
> [***********************************************************************]
> oooO:::::::::
> (..):::::::::                                                  
> :\.(:::Oooo::                             
> ::\_)::(..)::      
> :::::::)./:::                      
> ::::::(_/::::                                                      
> :::::::::::::


-- 
Paul Hiemstra, Ph.D.
Global Climate Division
Royal Netherlands Meteorological Institute (KNMI)
Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39
P.O. Box 201 | 3730 AE | De Bilt
tel: +31 30 2206 494

http://intamap.geo.uu.nl/~paul
http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770


    [[alternative HTML version deleted]]



_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
	[[alternative HTML version deleted]]

