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 am looking for a way to create a raster grid from a vector map.

I have a map consisting of shapefiles which I want to export as a raster with UTM coordinates. I was thinking of something using the identify tool in QGIS but not really sure how to apply it.

I want a file which has x,y coordinates and feature id as the variables. Does anyone have any suggestions?

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

You have arcgis as one of your tags so I will answer from that perspective.

The tool for converting shapefile features into raster is Feature To Raster.

Alternatively, you may want to consider Exporting your map using one of the supported raster formats.

share|improve this answer
    
Exporting the map won't result in FID being a variable (value). Feature to Raster will, and will work well for individual shapefiles. –  user3461 Mar 26 '13 at 11:49
    
I have access to arc as well. feature to raster doesn't work as it was only exporting a single feature not all of the features on my map. I can export the map but as I plan on using the raster in matlab coding if I can keep it as a standard (not 3d) matrix it would be a lot easier. –  Lachlan Mar 26 '13 at 12:00
    
That does not sound right @Lachlan - can you perhaps try it again and if the problem persists detail your exact steps so we can try to reproduce. Do you mean only one feature or perhaps only one feature class? –  PolyGeo Mar 26 '13 at 12:04
1  
If all shape files have the same geometry type (e.g. lines) you can use Merge tool before Feature To Raster. –  Jens Mar 26 '13 at 12:11
    
All features are polygons. There are about 5 different shapefiles. Ideally I could export the shapefiles in the same raster. another alternative would be merging the rasters after i have used polygon-raster or feature to raster. But I was hoping for a way of doing it without doing that as I have about 100 maps I need to do this for. –  Lachlan Mar 26 '13 at 22:02
show 1 more comment

Since you also have a QGIS tag how about a GDAL solution?

Within QGIS:

  • Via the menubar select ---> Raster > Conversion > Rasterize (raster to vector)
  • Then set your attribute and check the output.

Rasterize whole map within QGIS:

  • Go File -> Save as image, then choose tif. (unfortunately this does not work for map composer)

Via the command line using GDAL:

share|improve this answer
1  
This also will work only on an individual shapefile (see comments in PolyGeo's ArcGIS answer). If possible, merge the separate shapefiles into one before rasterizing. –  user3461 Mar 26 '13 at 14:06
    
gis.stackexchange.com/a/25006/2695 For info how to do this with GDAL. –  Jay Laura Mar 26 '13 at 17:00
    
@SS_Rebelious, does the rasterization of the map preserve the FID for each shapefile as the raster value? –  user3461 Mar 26 '13 at 18:37
    
@GeoKevin, no, but in future this topic may be discovered by someone that would not need it and maybe topicstarter will find this functionality useful too. –  SS_Rebelious Mar 26 '13 at 19:03
    
Then perhaps the edit should have been posted as a separate answer, instead of edited into an answer? –  user3461 Mar 27 '13 at 1:55
add comment

Within Grass use:

v.to.rast input=name [layer=integer] [type=string[,string,...]] output=name use=string [column=name] [rgbcolumn=name] [labelcolumn=name] [value=float] [rows=integer] [--overwrite] [--verbose] [--quiet] 

You can specify the layer you want to rasterize with layer="...", val=attr and column="...". Have a look at:

http://grass.osgeo.org/grass64/manuals/v.to.rast.html

share|improve this answer
add comment

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.