Tag Info

New answers tagged

2

There's a few problems in your script, but that's ok, you have to start somewhere. Firstly, your teacher is right, desc.extent is an object, from the Dataset properties and you can read more about the Extent Object. You don't just convert it to a string. Secondly, variables are used as such and don't get quoted "inRaster" is a string inRaster but inRaster ...


0

You are misunderstanding how Clip operates. From your question you are attempting to clip a line layer with another line layer. Per the help file (see the second to last graphic), if both inputs are lines the output is all lines that exist in both layers, aka are coincident - essentially an Intersect. If you want to clip the roads layer using the NMW ...


0

As a work-around, you can use the Split Raster (Data Management) tool to do this. Here is a basic example, although you can adjust the parameters to include overlapping tiles, etc. import arcpy, os outws = r'C:\temp\split_raster' raster = r'C:\temp\split_raster\yourRaster.tif' fishnet = r'C:\temp\split_raster\fishnet.shp' arcpy.SplitRaster_management ...


0

Ok, just a shot in the dark, but instead of for feat in fishnet: #etc try looping with this: cnt = int(arcpy.GetCount_management("fishnetlayer").getOutput(0)) for i in range(cnt): arcpy.SelectLayerByAttribute_management("fishnetlayer", "NEW_SELECTION", '"FID" = ' + str(i)) #etc That should work because I believe that shapefiles always have ...


1

The problem is not with the projection, probably, but with the clipper. When you clip a raster pixel size changes, by default. For example, clipping ASTER GDEM are ESPG:2039 changes the cell size from 30, -30 to 30.0735,-30.0976. In order to overcome such an issue, you should use the "clip raster by extent" or "clip raster by mask" geo-algorithm from the ...


0

What I had found was the line features that failed were zig-zagged between two different features in my clip feature. When I merged all my clip features together I no longer get the error and it clips as expected. Not sure why having multiple features in my clip feature would cause this, but merging them together resolved the problem.


2

Iterating is a little tricky for the first time user who has done VB or C, there is no for i = 1 to n iteration in python (yet). To iterate from one number to another you have to make a range (list) of integers then step through it with for value in list: Use this as an example to adjust your code, I've written the whole thing to give you some context: ...


1

You will want to use clipping_geometry = True as in the following example. import arcpy shp = r'C:\temp\myshp.shp' raster = r'C:\temp\someRaster.tif' arcpy.Clip_management (raster, in_template_dataset = shp, out_raster = r'C:\temp\outRaster.tif', clipping_geometry = True)


0

The local Esri support have now logged an enhancement request to have this software behaviour from ArcMap be present in ArcGIS Pro: ENH-000086073: Creating a "Buffer" option for editing individual features in one feature class.


2

Alright. QGis requieres several python packages such as NumPy and Matplotlib. I did not have these packages prior to installing QGis thus I downloaded them and installed them on my machine (very to recommend since the "from hand" installation is kind of hard). However, I forgot about these packages and wanted to install them again - This time not from the ...


1

Within QGIS 2.8 you can choose the following setting:



Top 50 recent answers are included