Hot answers tagged

4

If you don't see feature templates for a particular layer, you can add them via the Create Features window: Create Features window > Organize Templates > New Template > In the Create New Templates wizard, check the desired layers. What also works (and that I use to do because it's straightforward), is: starting the Edit session by right-clicking the ...


3

To update the labels, you'll need to update them all at once by providing a list to lyr.symbology.classLabels. if lyr.symbologyType == "UNIQUE_VALUES": vals = lyr.symbology.classLabels newLabels = [] for v in vals: if v == "a": v = 'landUse' newLabels.append(v) # push each label into the list lyr.symbology....


3

You can do it like this: # I'm assuming cat is the full path to a raster # or a raster object TempDir = os.environ.get("TEMP") # Your temp folder ColFile = os.path.join(TempDir,"TEMP_CLR_FILE.clr") with open(ColFile,'w') as ColWrite: ColWrite.write("1 255 0 0\n") # 1 = red ColWrite.write("2 0 0 255\n") # 2 = blue arcpy.AddColormap_management(cat,...


3

You can select layers by name directly with: QgsMapLayerRegistry.instance().mapLayersByName("layer_name") It returns a list of all layers that name contains "layer_name".


2

The Describe object's dataType property will return Shapefile for a shapefile, and FeatureClass for a Geodatabase Feature Class if desc.featureClass.dataType == 'Shapefile': #do something to shapefiles if desc.featureClass.dataType == 'FeatureClass': #do something to feature classes From ArcGIS Desktop Help pages for Describe A Shapefile ...


1

This link provides some good sources to get you started: https://developers.arcgis.com/javascript/3/jssamples/map_explicitlayerlist.html Dynamically create a list of all the loaded layers referencing this code snippet https://developers.arcgis.com/javascript/3/jssamples/map_dynamiclayerlist.html You may then tie the updateLayerVisibilty() method from a ...


1

You need to use the spatial query plugin. It's accessible from the vector menu. If it's not there, you have to enable it in the Plugins => Manage and install plugins. Under "Select source features from" select your parcels layer and under "Reference features" select your buildings layer. Under "Where features" select "Contains". Click "Apply" and the ...


1

Basically, you have to use signals to detect the "change layer" event and update your field combobox accordingly. Here is a simplified example (assuming you already have the run and initGui methods defined): In run(self): layers = QgsMapLayerRegistry.instance().mapLayers().values() # Create list with all layers # layers = self.iface.legendInterface()....


1

You can use a data-defined override in the properties of your marker to make the size of the marker dependent on a field, variable or expression:


1

This script includes the following lines: allLayers = arcpy.GetParameterAsText(0) # Must be a multivalue in script tool params lyrList = allLayers.split(";") PNGPath = arcpy.GetParameterAsText(1) The arcpy.GetParameterAsText() functions are asking for two parameters from a tool dialog that you need to configure separately. They indicate that the script ...


1

The answer from @GermanCarrillo worked for me and saved much time. With a text file structured like so: Time[s],Easting[m],Northing[m],Height[m],Roll[deg],Pitch[deg],Yaw[deg] 170258.002391,332731.5085,5794908.7794,46.1642,0.409501631306,-5.248541020385,0.684043081908 The code that worked for me in windows is: import os.path, glob layers=[] for file in ...



Only top voted, non community-wiki answers of a minimum length are eligible