Tag Info

Hot answers tagged

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 ...


7

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 ...


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 ...


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. :)


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

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 ...


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

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 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

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

Create the grid layer and then clip it with the polygon? Vector -> Geoprocessing Tools -> Clip. It would probably be best to create your grid with lines, rather than polygons. N.


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


3

It won't look terribly realistic without taking into account roads. I suggest you'll need to work out a few classes of population density / urbanization, and build separate models for how you'd populate each one. A very simplistic low-population suburban model may look like: Split road lines into the segments that exist between intersection nodes ...


3

This problem has many different solutions: it needs further restrictions. After all, by choosing any value within the range of elevations in the dataset, the contour for that value will be "flat" (and horizontal). This probably is not the sought-for answer, but it is an answer and it's perfectly valid. Moreover, among all possible answers, the contour ...


3

OK, take 2... If you're looking for a region of specific size and area: As before, classify your cells by the slope. Then do a Region Group on the raster. The count value will give you area values for the raster. Then if you need regions of a certain width (ie, not something long and thin) run Zonal Geometry with the Thickness option, which will give you ...


3

Your best bet would be to first calculate slope, as om_henners has mentioned, then use a focal operator to collapse the result down to the scale you're interested in. I'd recommend using FocalMean, where the neighborhood size matches the scale of 'flat' areas you're interested in. So for example, if you had a raster of 10m resolution, a 5x5 neighborhood ...


3

Try using degrib, which is a product of National Weather Service's Meteorological Development Lab (NWS MDL). It can convert GRIB1 and GRIB2 to several different formats. It won't be able to convert GRIB1 directly to GRIB2, but you should be able to convert GRIB1 to CSV or another format. The tutorial page is the best source for usage information (follow ...


3

GIS file formats contain georeferencing information. This ties image pixel coordinates to grid references in a projection system, in this case British National Grid. There are lots of ways this information can be stored depending on image format. A basic tool to get you started is gdalinfo which will query the extents of the image in British National ...


3

What you want is a spatial join. It allows you to combine information from different tables by using spatial relationships as the join key, in this case, the river basin and gridded points. What it will do is transfer attributes from your river sub-basin to your points. That way, your points would now have a sub-basin attribute. You'd know which sub-basin it ...


3

if I remember correctly, you can use Feature To Point (Data Management) for getting centroids of your polygons. import arcpy arcpy.FeatureToPoint_management(inFeat, outFeat, "CENTROID") i hope it helps you....


3

Well, what you want is a basic so called "Spatial Join", which matches two shapefiles to each other and allocates the sum (count number) to the resulting attribute-table. If you search for "Spatial Join in R" you'll find numerous examples even here on GIS.Stackexchange. I quickly googled and found for example this code posted on a mailing list. If you want ...


2

The uncompressed AVI output was quite jerky There's a very good chance this has nothing to do with the quality of the video itself but that it is uncompressed. Uncompressed video is very large and I'd guess your computer simply isn't capable of reading it from the drive fast enough to be able to render it properly. A simple 1280*720 requires about 530 ...


2

What you need is a raster format, a raster being a grid of data. There are lots of raster formats which could do it but Mike Toews' suggestion of Esri ASCII Grid format is the right one. To extend on his answer the Pro's and Con's: Pro's: Plain Text; easily parsable; read by lots of software. Con's: None of the "advanced" features: No Indexing, no built-in ...


2

Voronoi polygons might work but you definitely don't want Delaunay triangulation for this task. However, if you know the grid to be regular, you can just use the Create Fishnet tool from the Data Management Tool box (under Feature Class tools). The Fishnet tool has a lot of options that with a little understanding of your point dataset, will enable you to ...


2

You can create Voronoids with ArcGIS with a ArcInfo license: Voronoi diagram and Delaunay triangulation To create a grid I'm not sure however. In theory any grid-creation tool should be able to do it because you don't actually need the points as they're uniform. If you know the distances between the points it should be easy to just enter the correct ...


2

This can be accomplished in the same way we would lay out a grid of squares in the plane: Lay off a baseline in any direction. Mark it off in equal increments (of 20 km). Call these points p(0,0), p(0,1), ..., p(0,n), in order. It does not have to be geodesically straight, but it should be close to straight. Starting with the first marked point p(0,0), ...


2

Use "gdal_translate" see http://www.gdal.org/gdal_translate.html gdal_translate -of <output-format>... <infile> <outfile> should do the job for you. gdal_translate --formats will give the formats; GRIB is input-only; there are lots of GIS formats available as outputs. See http://www.gdal.org/index.html for GDAL, generally. It is a ...


2

What QGIS is referring to in terms of the layer boundary is actually the envelope or bounding box of the geometry. I've documented a solution which is probably the closest you will get to automating this is (short of filing a bug / feature request). The process works based on the ratio between area of the two objects: the feature geometry and it's bounding ...


2

from your question I am assuming that you want to create a raster grid. There are several ways to do this with a spreadsheet, I recommend using QGIS, convert the spreadsheet to a point shapefile: http://qgis.spatialthoughts.com/2012/01/importing-spreadsheets-or-csv-files-to.html To convert the points to raster use the QGIS "convert vector to raster" too ...



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