2

So honestly I have no idea what I'm doing, I'm a total beginner with GIS and I'm just following directions for an assignment given by my teacher.

I am trying to use Grid Statistics For Polygons -tool to do create statistics(?) of a raster layer

Maybe this image will give a better idea of what I'm doing: example

And the log:

processing.runalg(
    "saga:gridstatisticsforpolygons", 
    "C:/Users/Name/Pictures/オマタ/H‌​17/Viheralueet.tif", 
    "C:/Users/Name/Pictures/オマタ/H17/Bufferi50.shp",
    False, False, False, False, True, False, False, False, 0,
    "C:/Users/Name/Pictures/Viherbufferi.shp")

I can't open the file the tool creates once I've clicked 'Run'. I'm not sure, but is the tool supposed to create a .shp -formatted file? Because the only file the tool creates is Viherbufferi.prj and I'm not able to do anything with it. According to the directions I'm supposed to be able to open the file as a new layer.

I hope someone understood my explanation!

  • 1
    Welcome to GIS SE. It's never good to have no idea. Pls try to read a little more about the basic GIS concepts (eg. QGIS manual). The *.prj file is just the projection file of a Shape (*.shp), if there is non something different went wrong. – wittich Dec 4 '15 at 16:49
  • Okay, I'll try to read the manual. And yes, there's no .shp-file. Do you have any idea what could have gone wrong? – newbie Dec 4 '15 at 17:59
  • Nope, to be honest I don't even find the Grid statistics for polygons tool in GIS 2.8. – wittich Dec 4 '15 at 18:08
  • Do you have any log output? – wittich Dec 4 '15 at 18:12
  • 2
    It's a SAGA tool and works for me. Could be issues with the special characters in your user folder. Try to move all files to C:/temp or similar. – underdark Dec 4 '15 at 19:40
1

Learning from discussion between OP and @underdark.

We'd better double-check a list to make sure QGIS-SAGA can understand the filepath to target dataset.

  • The filepath does not include special (non-ascii) characters.
  • The filepath does not include spaces.
| improve this answer | |

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.