Tag Info

New answers tagged

3

In the looong list of types there is GPValueTable which has an example here: def getParameterInfo(self): param0 = arcpy.Parameter( displayName='Input Features', name='in_features', datatype='GPValueTable', parameterType='Required', direction='Input') param0.columns = [['Feature Layer', 'Features'], ['Long', ...


1

Theres a bunch of things I'd suggest changing. I'm not being picky, I'm listing them all because if you get past the problem you're having, you don't want to get stuck in another section of code. 1) Why are you loading your input into a featureset? I can't think of why this is necessary. Just pass whatever value you're getting directly into buffer. Input = ...


0

It may not be the cause but its good practise to check out the spatial extension and then check it back in at the end of your code. So after the line from arcpy.sa import * put arcpy.CheckOutExtension("Spatial") then at the end of your code use: arcpy.CheckInExtension("Spatial") If you look closely at the error message its trying to create an output ...


0

I see this as two questions: 1) How to find, merge and dissolve features that meet your date requirements and 2) How to preserve the attributes of the search date feature. I will address question 1 in detail. There are several ways to approach this: using Select Layer By Attributes (Data Management) or with a SearchCursor. I often prefer to use the ...


2

See this prior answer. Each version of ArcGIS uses a specific version and architecture of Python and is hard-linked against it. Forcing an ArcObjects application to use an incompatible Python version will likely lead to a crash.


0

I was able to get the Results Window to show up again by deleting the following files: normal.gxt (%AppData%\Roaming\ESRI\Desktop10.1\ArcCatalog) normal.mxt (%AppData&\Roaming\ESRI\Desktop10.1\ArcMap\Templates) normal.mxd (%AppData&\Roaming\ESRI\Desktop10.1\ArcMap\Templates) Booting up ArcMap recreates the new files setting . I'm under the ...


0

Adapting my answer to this question: First make ~/.qgis2/python/mytools.py : from qgis.core import (QgsFeature, QgsGeometry, QgsVectorLayer, QgsMapLayerRegistry, QgsField) from PyQt4.QtCore import QVariant from qgis.utils import iface import math def redistribute_geometry_vertices(geom,dist): ...


1

Use the arcpy.Describe method on the featureset parameter and get the file property. import arcpy notRequiredFeatureSet = arcpy.GetParameter(0) arcpy.AddMessage('AOI is: ' + arcpy.Describe(notRequiredFeatureSet).file) if a Feature set was added: Executing: Script "C:\Program Files\ArcGIS\Desktop10.2\ArcGlobeData\continent.shp" Start Time: Wed ...


1

So, many thanks to all who commented on this. I will go ahead and answer this based on the discussion from those comments and my personal experience. As mentioned by @blah238 and @Branco, there is a JSON property on a featureSet that can be checked, however, when running the script from within ArcMap and using a featureClass as input, checking for that ...


0

Algorithm to get desired result: Take the Line in focus Add some buffer (0.0000005) at Right (or Left) side of the Line geometry. Check whether buffer geometry is ‘Inside’ the Polygon geometry or ‘Overlap’ with Polygon geometry.


1

Since the version 2.x, PyQGIS has an has an interpolate function similar to that of Shapely : for distance in xrange(0,lenght_line,20): point = line.interpolate(distance) look at How to create points in a specified distance along the line in QGIS?


0

I'd make this a comment but wanted to post the below code that may help with the understanding of how to use a field info object, or at least add an example (from here: https://geonet.esri.com/message/287684#287684). The key happened to be (and obviously at that thread we were all struggling with it) the field info is modified as an object in memory and ...


1

Those are actually two different things. Geoprocessing tools don't honor the split policies of feature classes or tables as noted on most of help pages for the tools - this one for example (look for the yellow triangle exclamation point). Those are the policies set using domains, and where that third option of Default comes in. As far as I know, this ...


1

I've come across DataMatch by Data Ladder, which is an excellent fuzzy matching and address standardization/address parsing tool used across business and would work really well for this situation. They offer a complimentary trial for new users. In fact, an independent verified evaluation was done of the software comparing it to major software tools by IBM ...


5

In your case (jpg rasters and exact same extent for all rasters) the Warp From File tool is just fine. If you haven't saved a link file yet you should do this first: Georeference one raster in ArcMap, click the View Link Table button and save the links to a text file using the Save button: Then there are different options: Batch: You can use the Warp ...


0

The order of parameters is incorrect. Have a look at the Project tool help page, your parameter order must be the same as this. Also what is "GCD_WGC_1984"? To my knowledge that's not a coordinate system, I'm guessing you meant GCS_WGS_1984? But that's academic as your parameters are out of order!


0

I've seen this issue in one of my applications that has considerable Geoprocessing requirements. In my case I saw very similar symptoms running it with 4Gb RAM on several machines. I then tested on several machines with 12Gb RAM and it ran cleanly on them. My advice is, try to test it on a machine with more RAM before spending more effort trying to debug. ...


0

I recently dealt with a similar problem; I wanted to pass an SDE layer as .near_features and it only worked when I passed the layer's path string. Talked to the Esri Support and they came back a few days later and said it was a bug. Bug number: #NIM102924 Synopsis: Generate Near table geoprocessing tool s "Near Features" parameter doesn't accept ...


0

The answer seems to be that the Overlay tool in the Linear Referencing toolbox does not like GUID data type fields as the Route ID field. The solution was to transfer the Route ID field which is a guid to a string field. All is working with the Route ID field as a string data type.


0

This should go as a comment. But is too long. Thanks much Gene! There are both LineString and MultiLineString features. So this code for line in shape(elem['geometry']) shows TypeError: 'LineString' object is not iterable when feature is MultiLineString. So the final code that works is as below. with fiona.open(source_path) as source: with ...


0

Is the DEM in geographic coordinates? If there is projection-on-the-fly going on based on geoprocessing settings, those settings are not seen if running the python process standalone. Note, you only need to set overwriteOutput once and it remains in effect, you can move it out the loop (though it's not a performance thing, just style!)


2

A MultiLineString is a list of lines: from shapely.geometry import MultiLineString, mapping, shape coords = [((0, 0), (1, 1)), ((-1, 0), (1, 0))] lines = MultiLineString(coords) print lines MULTILINESTRING ((0 0, 1 1), (-1 0, 1 0)) for line in lines: print line LINESTRING (0 0, 1 1) LINESTRING (-1 0, 1 0) # convert to GeoJSON format: print ...


0

There is an ArcgisToolbox built for Arcgis 10.1 freely available here Seems it is developed for the multispectral raster classification or multi band raster classification.. I've just tried for some single band raster, just to check and actually got an error related to file mosaic'ing.. and renameing file (248 line). If you just change the name if should ...



Top 50 recent answers are included