Tag Info

Hot answers tagged

16

I see MerseyViking has recommended a quadtree. I was going to suggest the same thing and in order to explain it, here's the code and an example. The code is written in R but ought to port easily to, say, Python. The idea is remarkably simple: split the points approximately in half in the x-direction, then recursively split the two halves along the ...


12

No, the two terms aren't equivalent: 1) Not all raster data is gridded -- not even all Earth observation imagery raster data. 2) And while gridded data is usually stored in a raster file format, not all gridded data represents a straightforward rectangular raster data structure. To illustrate this: "Gridded" presumes that data in question represents ...


8

The data as downloaded contain some frank locational errors, so the first thing to do is limit the coordinates to reasonable values: data.df <- read.csv("f:/temp/All_Africa_1997-2011.csv", header=TRUE, sep=",",row.names=NULL) data.df <- subset(data.df, subset=(LONGITUDE >= -180 & LATITUDE >= -90)) Computing grid cell coordinates and ...


8

Here is an example using a SpatialGrid object: ### read shapefile library("rgdal") shp <- readOGR("nybb_13a", "nybb") proj4string(shp) # units us-ft # [1] "+proj=lcc +lat_1=40.66666666666666 +lat_2=41.03333333333333 # +lat_0=40.16666666666666 +lon_0=-74 +x_0=300000 +y_0=0 +datum=NAD83 # +units=us-ft +no_defs +ellps=GRS80 +towgs84=0,0,0" ### define ...


7

There is possibility to do it in Print Composer now. Also it is possible to simply manually create vector layer with grid in QGIS (Vector->Research Tools->Vector Grid) - the only way if more grids are needed in one frame. In Composer Manager select map frame and go to Item Properties / Grid


7

It looks like you're using a geographic coordinate system instead of a projected coordinate system. Because NAD83 (HARN) uses degrees as the units, when you type in 500 in the grid spacing, it's using a spacing of 500 degrees, which is huge. You'll need to reproject the data to a more suitable projected coordinate system which uses metres such as UTM Zone ...


7

Using ArcGIS, one way to go about this is to create a 1 X 1 KM Fishnet grid followed by using the Split tool. The general workflow/model looks like this:


6

You're right ... it is pretty easy! The "raster" package has some pretty straightforward ways of dealing with creating and manipulating rasters. library(maptools) library(raster) # Load your point shapefile (with IP values in an IP field): pts <- readShapePoints("pts.shp") # Create a raster, give it the same extent as the points # and define rows and ...


6

See if this algorithm gives enough anonymity for your data sample: start with a regular grid if polygon has less than threshold, merge with neighbor alternating (E, S, W, N) spiraling clockwise. if polygon has less than threshold, go to 2, else go to next polygon For example, if the minimum threshold is 3:


6

This is quite simple you can use gdaltindex to build this grid. In QGIS go to Raster -> Misc. -> Tile index. Give the path to the raster-files, set the name and directory for the resulting shape. I prefer absolute paths for catalogue purposes. Then hit ok. :)


6

The problem is that the names sometimes change depending on the software. Below you find the definitions from ESRI. RASTER = A spatial data model that defines space as an array of equally sized cells arranged in rows and columns, and composed of single or multiple bands. Each cell contains an attribute value and location coordinates. Unlike a vector ...


5

The 'National Grid Shape file' can be downloaded at: https://github.com/charlesroper/OSGB_Grids Using this for a OS grid at a specific resolution would take some aggregation based on the TILE field, or by using the SCALE field.


5

The PRISM Climate Group's precipitation raster below is at an 800 m scale. They also have 2 km and 4 km climate products. Climate source uses both 400 m and 2 km grids for their precipitation products. A description of the PRISM methods can be found here. A study area, for example, in the Rocky Mountains would benefit from a greater resolution, while a ...


5

I have written an R function that performs a robust regression (least absolute deviation method) against a DEM to up-sample climate variables. It works quite well for smaller areas where the gradient in the [X,Y] domain does not effect the estimates and is quite superior to resampling and interpolation techniques. It is a loose implementation of Nick ...


5

Not built in , AFAIK. The way I do this is by creating a polygon shape file "grid" and then reprojecting it. So you could: enable On-the-fly reprojection Set the CRS to Lat/Lon Use the Vector->Research Tools->Vector Grid to create a polygon grid at whatever interval is appropriate Display the polygons with no fill, to show only the grid lines. Return to ...


5

Imagine as if you were somewhere on Earth (easy to imagine I guess), and you have one world map on one hand and a compass on the other. GRID NORTH: the map you are holding has probably some horizontal and vertical lines. The direction of every vertical line indicates the grid north. So, for every point on the map, the vertical line that passes through that ...


5

It is very complicated and that's why there are specialized applications as gOcad, for example. I use GRASS GIS because I can build volumes (3D voxels) from surfaces/grids (Help with 3D), even if the surfaces are not "perfect": Application with two layers from El modelado geólogico para un geológo sin recursos o entusiasta: GRASS GIS (y Paraview) (in ...


5

Shp+shx is connected with dbf only by row number. If the order of features in shp remains the same you can just change dbf to a new version. But if shape number 1 gets written as the last feature in shp and #2 becomes #1 you will have all attributes wrong. Very dangerous. But perhaps, if the data provider writes an stable ID as an attribute in a trustworthy ...


4

For raster formats, I think the Esri ASCII Grid format is most the commonly supported format across GIS software. Since it is ASCII, it is portable to read anywhere, even in a text editor. Many closed and open-source software (particularly recently developed) generally use GDAL, which has a native AAIGrid driver. The two drawbacks are the file size (but it ...


4

I don't think a new release or service pack will resolve the issue, though you could always add it to ideas.arcgis.com and see what happens. Perhaps an alternative approach might work for you though: Add two grids, one with north-south only lines/labels and the other with east-west only and make each in a different style/font/colour. This will address the ...


4

you can use wgrib2 to convert your data to csv. wgrib2: -csv (comma separated values) The -csv option writes the grid values to a specified file as a comma separated values (text) which can be imported into a spread sheet. This function is similar to -text with a different output. ...


4

I just ended up creating my own tools to do this. I used the Clipper library (http://www.angusj.com/delphi/clipper.php) along with OGR to divide my data set up. Something to note is performing intersections naively with this lib takes very long, so I instead used a quadtree approach... ie, divide into four grid cells, divide each of those into four more, ...


4

It definitely sounds like you have geometry issues. It is unlikely that will be able yield clean results from a dirty input file regardless of the software used, unless you first address your geometry problems. Once you get your geometry issues sorted out, you could try the following if you are still having issues: 1) Make sure that your grid dataset has ...


4

This question comes up often. Every GIS seems to have an add-on to solve it, but they tend to be limited in what they can do. (E.g., many will only create square grids of points parallel to the coordinate axes.) I would like, therefore, to describe a simple general way to create regular grids of 2D points, suitable for use in any GIS. Surprisingly, most ...


4

Similarly to Paulo's interesting solution, how about using a quad tree subdivision algorithm? Set the depth you would like the quadtree to go to. You could also have a minimum or maximum number of points per cell so some nodes would be deeper/smaller than others. Subdivide your world, discarding empty nodes. Rinse and repeat until the criteria are met.


4

The MMQGIS plugin has a Create Grid Layer Tool. You can use that to create a vector grid layer and then intersect it with your city boundaries polygon.


4

First create a polygon grid using the Vector Grid Tool (Vector\Research Tools) You can specify the polygon dimensions in the settings Second run a spatial query to intersect your point dataset with the grid cells Save selection as a new layer


4

The easiest way to calculate shape length is to import your polylines into a file geodatabase. Once you import your shapefile as a featureclass, length is automatically calculated for every feature. If you are interested in calculating shape length within a grid, first run Intersect which will split the polylines into segments within grid. Then Dissolve ...


4

The most popular problem with the vector grid tool is the preset of 0,0001000000 for x and y value. If your CRS is in degrees, it will create a grid with 0.0001° spacing. That's most probably not what you want. For CRS in meters, you would get a 0.1mm spacing. So set the value to 0.1° (or 1000 metres), and see if you like the result.



Only top voted, non community-wiki answers of a minimum length are eligible