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.

Have you experienced converting a polygon from raster? The raster dataset is a satellite image created from zonal statistics? The problem is when I was converting the raster to polygon errors came out as:

ERROR 000863: The input is not within the defined domain.
ERROR 000308: Invalid field type

I do not know how to get around these errors.

share|improve this question
    
@user2543, what software are you performing the conversion with? –  artwork21 Jun 22 '11 at 2:36
    
I am using ArcGIS 9.3. –  user2543 Jun 22 '11 at 2:41
    
There are several strange aspects to this question: (1) zonal stats does not create an image; (2) one usually does not directly convert images to rasters; (3) whether image or zonal summary, it's probably not a categorical raster (which is the only kind its makes sense to convert directly to raster). Descriptions of exactly what you're doing and what you want to do will help people find appropriate responses. –  whuber Jun 22 '11 at 3:03
    
Okay, I have a satellite image containing information about moisture availability. I want these images be converted into polygon (geographical boundaries) with the same information contained in the images. –  user2543 Jun 22 '11 at 3:11
    
@user Are you saying you want to convert each pixel in the image into a square (having an attribute equal to the pixel's value)? –  whuber Jun 22 '11 at 3:22
show 1 more comment

4 Answers 4

up vote 1 down vote accepted

With ArcGIS 9.3 and the Spatial Analyst Extension

GridShape

Converts a raster to a polygon (Type 5) shapefile.

http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=gridshape

Update: ArcObjects Code:

' Converts raster data to polygon feature data (FeatureClass or FeatureDataset).
' Member of esriGeoAnalyst.IConversionOp
'
' Function RasterDataToPolygonFeatureData(ByVal dataset As esriGeoDatabase.IGeoDataset, _
'    ByVal pWorkspace As esriGeoDatabase.IWorkspace, ByVal name As String, _
'    ByVal weeding As Boolean) As esriGeoDatabase.IGeoDataset

Dim pConversionOp As IConversionOp
Set pConversionOp = New RasterConversionOp

' Get the raster
Dim pRas01 As IRaster
Set pRas01 = getRasterFromFileFunction("c:\data\myRaster")

Dim pFClassOut As IGeoDataset
Dim pWSF As IWorkspaceFactory
Set pWSF = New ShapefileWorkspaceFactory
Dim pWS As IWorkspace
Set pWS = pWSF.OpenFromFile("c:\data", 0)
Dim sOutFCname As String
sOutFCname = "myShapeFile.shp"

Set pFClassOut = pConversionOp.RasterDataToPolygonFeatureData(pRas01, pWks, sOutFCname, True)
share|improve this answer
    
thank you for the suggestion, mapperz. but how do you use that? I'm afraid I'm a newbie in using map syntax. –  user2543 Jun 22 '11 at 3:06
    
updated the post with ArcObjects code. I am not a programmer! –  Mapperz Jun 22 '11 at 14:10
add comment

According to the comments below the question, you want to (a) classify the image into a small number of discrete categories and then (b) convert it into a polygon representation ("vectorize" it).

There are many ways to do (a). Good choices in this application are either (a.i) drive the calculations with a reclassification table via the reclassify tools or (a.ii) do a mathematical calculation. For instance, if the moisture availability is an index varying from 0 to 1 and you want to classify it into equal intervals [0,0.25], (0.25, 0.50], (0.50, 0.75], and (0.75, 1.00] then compute

Int([Original grid] * 4)

Once this operation is performed, the conversion tool you are using should do fine. It works by finding contiguous patches of cells all sharing the same value and converting those to polygons.

share|improve this answer
add comment

Your image values may be a float data type, which according to this forum post below needs to be converted to integer before converting to polygon.

http://forums.arcgis.com/threads/4435-Raster-to-Polygon-Error-ArcGIS9.3-value-not-within-the-defined-domain

share|improve this answer
    
Hi Artwork21, I've already read that thread and tried the suggested solutions but my primary concern is when I am converting a raster to integer, the values turn 0. Do you have any other idea? Thanks again in advance. –  user2543 Jun 22 '11 at 2:51
    
@user2543, where did you get the image from, and what is the image type (tif, img, jpg...etc)? –  artwork21 Jun 22 '11 at 2:57
    
it's in .img format –  user2543 Jun 22 '11 at 3:05
add comment

It will depend on the type of information you have in the satellite image i.e. RGB (Red Green Blue) values or GRID type (value as in DEM).

If you try to convert, to integer, a raster image in RGB format is very possible to get the value 0.

However, if you convert the values ​​by classifying them into a series of numerical codes representing a scale of humidity values​​, you get a raster grid that could be easily vectored.

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.