2

My problem is related with Global DEM to Slope calculation. The slope tool works when raster is projected or the map is projected where the raster is added. And also, if the raster and map both are not projected, slope tool runs well but may be the result is not perfect.

Problem is when I run the slope tool from my c# code and pass the raster layer to slope tool. Only when the raster is projected, the tool runs well otherwise reports a crash. In fact when the map is projected, tool reports a crash.

There I could not find a way that I pass the map projection system to the tool. At the same time, when I pass a Z-factor value, why does it matter if the raster data is projected or not?

  • Your last question is answered at gis.stackexchange.com/questions/14750/…: projection distortions vary from point to point and with aspect; both cause there to be absolute and relative errors in all slopes (which therefore cannot be cured by applying a constant z factor); not using a projection is the same as using a very bad projection (the Plate Carree), which on global DEMs gives highly inaccurate slopes. – whuber Jun 26 '13 at 4:27
  • Actually, my question was, as the map is projected, the tool runs perfectly. So, when I am running the tool from my arcObject solution, I want to pass the map projection system related all information to the tool that tool can run perfectly. I don't want to project the data under the layer. – Emi Jul 1 '13 at 2:21
1
+50

Arc requires all layers to be in the same projection for geoprocessing. If one layer is out, results can be unpredictable.

If your layer is projectionless (i.e. if you check the source and spatial information is "not set" or similar) you need to use the define projection tool DataManagement>Projections and transformations>define projection

If your layer already has a coordinate system set but it is different to that of your map and other layers you need to reproject it. This is in datamanagement>Projections and Transformations> and then choose either feature or raster > project

You may need to use a transformation if the underlying datum is different.

If you are looking to explicitly set the output projection you can do so in environments. Don't forget that the environment setting are hierachical. Environments set in Catalog are at the top, individual tools at the bottom.

  • Actually, my question was, as the map is projected, the tool runs perfectly. So, when I am running the tool from my arcObject solution, I want to pass the map projection system related all information to the tool that tool can run perfectly. I don't want to project the data under the layer. – Emi Jul 1 '13 at 2:22
  • @Emi. So if I understand correctly you are trying to take existing map projection and apply it to your tool. In this case you will need to use the environment settings from the object SDK: help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/… I don't really understand your comment of "I don't want to project the data under the layer". Whether you would like to project it or not, all layers within a map document (.mxd) have to be in the same projection for reliable geoprocessing results. – Oliver Burdekin Jul 1 '13 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.