New answers tagged

4

The qml file style file you get when exporting layer styles is different from the one you get in the "Style manager" when you export. The second format is the accepted one in "Create categorized renderer from style" What is missing is a script to get "Style manager" compatible file from an existing layer style. I've made a ...


0

I'm not aware of a plugin that does this (it's a fairly specific workflow), but it can certainly be achieved with a simple Python script, run from the Python console. Firstly create your text file and save it somewhere. It should have the following structure. *It should go without saying that this is just an example. All lines in the txt file must exactly ...


0

One approach to do it. Check if in memory layer, run processing script to save your "in memory" layer, change memory layer datasource and save your project. In your case, you need to adapt my code to reuse infos like datasource path and layer name after your writeAsVectorFormat export project = QgsProject.instance() project_dir_path = project....


0

As the error message said, the parameters are not valid. And as @Vince commented, the particular parameter that is invalid is the first one, the layer. To see what parameters are valid, check the documentation at: https://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/select-layer-by-location.htm The first parameter should be a feature ...


2

I usually have this problem when input and output path are the same. The error caused by the temp.shp file already exists in the output directory while the processing algorithm is saving the result. You should use a different directory or file name. According to the note in QGIS source code, it comes from OGR. My guess is that while the output file is being ...


2

You can do an atlas that will change styling and not change the extent of your map. Finish to add every layer you may use in your project. Verify they have all a different name. Create a new layer with no geometry named "atals_table" without fields. Open the attribute table of this layer and create the same number of features as layers you have. ...


2

On the web map roadmap, it says styling and configuring of map image layers will be available later this year. https://community.esri.com/t5/arcgis-online-documents/map-viewer-roadmap/ta-p/920839?attachment-id=62505


1

If the weighting is linear against some thresholds, then you can probably do something like this: // Binary thresholds var result = ee.Image().int() .expression("term1 * 0.3 + term2 * 0.5 + term3 * 0.1", { term1: slope.lt(3), term2: evi.gt(0.6), term3: dataset.eq(10) }) If the terms are continuous instead, then just ...


1

See: https://community.esri.com/t5/python-questions/listing-layers-in-a-group/td-p/736543 proj = arcpy.mp.ArcGISProject('CURRENT') m = proj.listMaps()[0] ml = m.listLayers() for l in ml: if l.isGroupLayer and l.name=='somegroupname': print(l) lyrs = l.listLayers() for lyr in lyrs: print(lyr)


-1

ApplySmbologyFromLayer is buggy and I haven't been able to get it to work from a Python Script e.g. https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDExOTkwNw== Keep subscribing to the bug and logging it as a bug if you have support and ESRI may get around to fixing it.


0

For those who are interested in my solution: import arcpy import ConversionUtils arcpy.env.workspace = "C:/path" arcpy.env.overwriteOutput = True in_features = ConversionUtils.gp.GetParameterAsText(0) in_features = ConversionUtils.SplitMultiInputs(in_features) in_dist = arcpy.GetParameterAsText(1) in_dist = ConversionUtils.SplitMultiInputs(in_dist)...


1

It turns out I had a wrong style template on the layer. That was causing the issue.


1

You need to explore the helpfile and read up on what is referred to as a python toolbox. This will allow you to build the tool interface that will allow your users to select multiple layers and assign buffer distances to each layer. You need to define what is called a ValueTable.


1

You can use QGIS expressions with field calculator to create a new field or updating an existing one. Use the function get_feature() to identify the feature on the other layer with the same id and the attribute () function to get the value of any attribute from this other layer. In my case, a have a polygon layer named polygon with an attibute named value ...


1

When iterating over the layers in your loop, check layer.name for a match to the target layer name, and\or use the filter parameter in ListLayers to reduce the list to layers matching your target layer name. If adding a filter to ListLayers, you can operate on the first layer returned if you are confident there is only one possible match.


2

Confirm you've checked the box on the layer to have it active in your map.


0

One way of dynamically styling vector layer would be to have some global variable and then use it within style function to select desired style. Upon global variable change, .setStyle vector layer method has to be used to update style. This could look then something like this: var selectedPropertyNo = 0; function style(feature) { var fillColor; if (...


1

According to the docs, you can set the Z Index of layers. Hopefully this does what you need. Keep safe...


Top 50 recent answers are included