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 converting polygon shapefiles to rasters. With arcpy I am using the function FeatureToRaster_conversion.

gp.FeatureToRaster_conversion(InFeatures, InField, OutRaster, InCellSize)

This function gives control of the cell size but nothing concerning the rotation.

I would like the output raster with a given orientation other than North. Say for example having the picture at 45 degrees.

Any ideas how I can achieve this? With or without using FeatureToRaster_conversion.

share|improve this question
    
I should have mentioned it is not the entire raster that I want to rotate but the actual cells (or pixel) that compose it. As it is the function convert from polygon to cells oriented at 0 degrees. I need this conversion from polygon to cells oriented at 45 degrees. If operating manually on Arcmap it will be similar to rotate (firstly) the map than export it as raster. –  Noel Jan 16 '13 at 13:27
    
Doesn't Rotate(Data Management) does this? –  Emi Jan 17 '13 at 10:16
    
If using 'Rotate' the entire picture will rotated around a given point (lower left corner by default). This will move spatially the features I have on the raster. This transformation is not wanted. I need to sample on my raster already oriented at 45deg the shapefile. Probably nobody looks at pixel level about raster but for my case it is important. –  Noel Jan 24 '13 at 11:52
    
Making some progress. I start to believe arcpy might not support what I need. Gdal library does support rasterising on cells of different orientation. The SetGeoTransform function has arguments for rotation. An interesting thread on the subject here: stackoverflow.com/questions/2220749/rasterizing-a-gdal-layer –  Noel Jan 24 '13 at 15:09
    
If you decide to come back to this question I recommend that you use the comments that you added onto it to revise it. –  PolyGeo Jul 5 at 19:47

3 Answers 3

You can rotate your raster using a Rotate Raster Tool. Find it in Data Management, Projections and Transformations, Raster Toolset. It works under all license levels.

share|improve this answer

Maybe you can go through Rotate (Data Management). It rotates input raster.

share|improve this answer

Don't really have a great idea as far as something in the API, but as far as a strategy you can find something that allows you to set the lat/lon values and simply calculate how to change them to satisfy a 45 degree rotation. If you switch those values you would get 180 degrees so find less than half of those values I would imagine.

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.