Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying use R for create a fishnet grid like in arcGIS with many cells of same size.

In the arcGIS 9.3 we have the option of create a polygon with many small square polygons (eg. 1 x 1 degree of lat and long) in the extent of our study area using the tool 'create fishnet' (http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Create_Fishnet_(Data_Management)) and after aply the tool 'Feature to Polygon' to transform the polygon lines in square polygons. Other option is use the “Hawth’s Tools” extension and acess the “Sampling Tools” -> “Create Vector Grid (line/polygon) but the extension only work properly until arcGIS 9.2.

Then I want create the fishnet grid (polygon with many regular squares) and after calculate many percentage of overlap of some polygons to each cell of the fishnet and create a matrix with each cell in lines and each polygon in the columns, like this matrix.

share|improve this question
    
What's a 'fishnet grid'? Is it lines? Or small square polygons? Or a raster? What do you want to do with it when you've got it? –  Spacedman Apr 11 '13 at 22:39
    
Sorry, I edited the post to be more clear. Thanks! –  fvfaleiro Apr 12 '13 at 13:38

2 Answers 2

If you mean by fishnet grid a regular spatial grid, there are several options available in R:

  • Simply use a matrix.
  • Use the SpatialGrid/Pixels classes from the sp package
  • Use the raster format from the raster package.

A good overview of spatial packages in R is given on the CRAN Spatial Task View.

share|improve this answer

The sp package in R might be a good place to start. A quick browse through the pdf manual shows that there are functions with names such as gridlines that might be useful to you.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.