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 currently allow users to add a shape file in. From the shape file, allow the user to generate a new layer base on the polygons from the shape file's polygon they imported.

Generating the new polygon and putting them into my own layer is no longer a problem, however, I see the Area/Area_Length attribute to be different between my new and old polygon.

Only difference is i project-ed the Map's spatial reference to the new polygon, instead of using the layer's spatial reference.

Do you guys know if that is the reason behind the different attributes?

Code:

foreach (IPolygon polygon in polygons)
{
   //Need to project to the map spatial reference
   polygon.Project(IMap.SpatialReference);

   //Generate a new polygon
   newPolygon = new Polygon() as IPolygon;

   ((Polygon)newPolygon).AddPointCollection((IPointCollection)polygon);

   //Add the feature
   subcatchmentFeature = new SubcatchmentFeature(newPolygon);
   AddFeature(subcatchmentFeature);
}

Thanks and Regards Kev

share|improve this question
    
Are you referring to the differences in Area/Perimeter relationships between projected and unprojected data? –  Dan Patterson May 17 '11 at 17:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.