New answers tagged

0

The asker provided this answer within their question, so it has been cut/paste to here: I figured out what the problem was. I was letting it run as a background program so it had no idea about the current workspace.


0

One idea: 1.Collect the bounding coordinates using this.location.href and splitting (startExtent in code below). 2.Generate the map extent as min and max values taken from the list of values after splitting. Generate a polygon using points also generated from the list of values. Make a new map with basemap and apply the map extent generated in 2. On ...


0

Just a brainstorm idea I came up with this morning: You can use these tools to determine the bounding box and extent for your study areas: Minimum Bounding Geometry: creates a new feature class with the the feature captured into individual rectangles which. Add Geometry Attributes: Adds and populates x-min,y-min,y-max,y-max fields to the new feature ...


2

The parameterType property is read-only; take a look at the Python toolbox help page here. In other words, you cannot make a parameter required or optional on-the-fly; the closest you could get is to enable/disable the parameter with the .enabled property. Other things: use GPBoolean instead of Boolean - refer to this page for data types; ...


2

You don't need a script to do get your input's basename and reuse it in parameters' names. Add the 'Parse Path' tool to your model and connect it to your input raster. Chose 'NAME' for the 'Parse Type' parameter: Then, in the parameters of the Extract by Mask tool, reuse this name variable (here called by its default name, 'Value') in the path of the mask ...


2

Instead of using the Field Calculator tool, a possible workaround is to create a custom script which allows the user to choose an attribute field and update it with a value they enter. To do this, go to Processing Toolbox > Scripts > Tools > Create new script and copy the following: ##Update field by number=name ##Layer=vector ##Fields=Field Layer ...



Top 50 recent answers are included