Tag Info

New answers tagged

1

Export Data Change Message GP tool could be used which creates a delta file with changes to synchronize (number of records could be obtained from the result).


1

I can think of a few ways to accomplish this, if you want to automate the process you would use a similar approach to this example in the ArcGIS help LegendElement example 4: The following script updates all layers in the legend to use a custom legend item style item called MyNewStyle. import arcpy mxd = ...


0

If the legend is dynamic, you may use the Layer (arcpy.mapping) class, using a combination of the isRasterLayer property and VISIBLE parameter to turn on or off raster layers, which should hide or show that item in the legend.


2

Have you looked at the arcpy.mapping LegendElement? Not sure that will do what you want, but is one way of manipulating legend elements.


2

If you don't have .lyr files or an existing mxd referencing the data, I think what you're trying to do should be impossible with Python. A better approach would be to create (manually) a template mxd with a geotiff and an ascii file in it, then (with Python): copy the template mxd (with saveACopy) and replace the data sources of both layers with e.g. ...


3

With ArcGIS 10.1, the Python Win 32 extension is not included within the software installation exactable. Note: The PythonWin32 extension setup requires an existing installation of Python 2.7 which is installed after installing ArcGIS Desktop, ArcGIS Engine and ArcGIS Server setups. ArcGIS no longer installs PythonWin because the recommended ...


2

There is only one way to efficiently do this that I know of. Load the replica database fields into a dictionary using a searchcursor with the GlobalID as the dictionary key, then loop through a searchcursor on the origin database and attempt to retrieve the GlobalID dictionary key that matches each record. Set up four counters: count, added, deleted, and ...


1

You start your question by saying: I am learning Python, so here is a real newbie question! and then describe your install of two Python IDEs (PyScripter and PythonWin) in addition to another IDE (IDLE) that installs as part of the Python that gets installed by ArcGIS for Desktop. When learning any new software my recommendation is to keep your ...


2

I think a similar problem was asked here where it is mentioned that the cookbook should be updated. From the link given, you should replace setProjectionsEnabled with setEllipsoidalMode.


0

There is no prebuilt class to do the magic the field calculator does (I am planning on adding it at some stage) however it's quite simple: expression = QgsExpression("1 + 1") # This allows field lookup index = layer.fieldNameIndex("UpdateField") expression.prepareFields(layer.pendingFields()) layer.startEditing() for feature in layer.getFeatures(): ...


0

I tried the option 'coordinate system', 'coordinate system folder', 'spatial reference' separately. Nothing works actually. 'Execute Error' is always shown in dialogue box.


1

You need to apply a shear to your affine transformation matrix used for SetGeoTransform. One package that is intended to work with these is affine. For example: from affine import Affine xmin = 1; xres = 2; ymax = 3; yres = 4 # dummy values # construct geotransform matrix geotransform = Affine( xres, 0, xmin, 0, -yres, ymax) # or import from ...



Top 50 recent answers are included