Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vector2Raster #8

Open
MattReimer opened this issue Aug 5, 2015 · 0 comments
Open

Vector2Raster #8

MattReimer opened this issue Aug 5, 2015 · 0 comments

Comments

@MattReimer
Copy link
Member

RasterMan needs the ability to create a raster from a polygon vector layer. The vector layer will initially be in ShapeFile format (see other card for File GDB). This routine will take one of the attribute fields in the polygon ShapeFile and make it the value of the output raster.

Proposed Interface (With Some Questions):

  • Polygon vector layer
  • Output Raster Path
  • Attribute field in the polygon feature layer that will be used for the output raster values. Option a) only allow numeric attribute fields. Option b) If the user specifies a text field, the output raster is integer format with a different value for each unique string value in the input polygon layer.
  • It's probably going to be important to be able to control whether the output is an integer or real raster. There are two typical uses... a) when there are a small number of discreet values in the polygon attribute table (e.g. survey type = LiDAR, Total Station, GPC) we want a byte raster. When there is a physical measurement in the attribute column (e.g. elevation, depth) then we want float 32.
  • Optional Feature: If the output is byte then it might be nice to produce a CSV text file containing the lookup of values (1,Total Stationn\n\r2,LiDAR\n\r3,GPS)
  • Optional Argument: RasterMeta specification. If a reference raster is provided then use its properties to define the output raster, otherwise require the user to specify the cell size (and let RasterMan figure out the divisible coordinate extent that fits the polygon layer).

Resources:

Remarks:

  • This routine will be used in:
    • GCD budget segregation
    • GCD multi-method error surface
    • Habitat input data source raster generation for CHaMP (substrate)
  • GDAL's family of vector classes uses the name "OGR".
  • Definitely check GDAL's command line polygon to raster tool to see if it does what we want. M@: Nope. Same deal as csv2raster. IT takes us most of the way and then shoots us in the foot.
  • Polygon features with Null geometry are not included in the output. M@: easy
  • Polygon features with a Null value in the specified attribute column are not included in the output. M@: easy
  • If possible, the routine should do some validation on the input polygon layer:
    • must be polygon geometry type (and not point or line). M@: easy
    • must have spatial reference. M@: shouldn't be a problem

Tests:

  • Y:\GISData\SulphurCreek\MethodMask_ForTesting.shp
  • Y:\GISData\WorkshopData\2013_KWOWorkshop\K_HybridSurveys\AZ_GrandCanyon\2004_05\R2_HybridData_2004_05.shp
  • Y:\GISData\BearValley\TutorialData2\bankfull.shp
  • Y:\GISData\OvertonNorth\2003_2007_2009_Extent.shp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants