Tag Info

New answers tagged

0

I found the issue! It was because the workspace was in uppercase in GeoServer. I convert to lowercase when I set the parameter in the protocol object and now it works. I don't know the reason, may be this is a bug?


0

Currently there is no way to get a reference to a source from a feature. You can implement a piece of code that checks if a given source contains a feature.


0

Just remembered about the styling options. I can set the default fillOpacity to 0 in the styleMap


4

If both features share the same geometries, you can use the Delete duplicate geometries tool from the Processing Toolbox: Another method is to use the Dissolve tool (Vector > Geoprocessing Tools > Dissolve). However, you would need to make sure that each feature has a unique attribute. If any features share the same attribute (which your "double features" ...


3

Your are not modifying vector, but features "copies" get with getFeatures. You need to get the feature.id() and updateGeometry using dataProvider of the vector or directly using methods of the vector layer (inside an editing session) you can find reference of the methods in: for QgsVectorDataProvider: virtual bool changeGeometryValues (QgsGeometryMap ...


1

Answering your two questions: You can change your feature values from the layer object, no need to access the dataProvider(). Yes, you can use the iterator in a for loop. Check the code below: layers = QgsMapLayerRegistry.instance().mapLayersByName('my_line') layer = layers[0] it = layer.getFeatures() layer.startEditing() for feat in it: ...


0

This works without needing to remove the layer and recreate a new one as described above: geojson_layer.eachLayer(function (layer) { if(layer.feature.properties.NAME == 'feature 1') { layer.setStyle({fillColor :'blue'}) } }); It seems to be quite a bit more efficient than removing and recreating the geoJson layer. From the docs, geoJson ...


2

For an FME solution, you might want to try searching for near-parallel lines and then merging attributes (FeatureMerger) if they are suitably "parallel". There are a few potential ways to do detect parallelism in FME listed here (none require perfectly parallel): https://safecommunity.force.com/CommunityAnswers?id=906a0000000d7pBAAQ The upside of an FME ...


2

What about "size" * 16 in the field calculator expression?


3

There is no silver bullet for this kind of task and there is a risk that some of the work you would need to do manually, particularly verifying the correct lines's attributes were transferred as required. I would try multiple things and see how it goes: Make a backup of your datasets. Make sure you have custom unique ID field for each line segment in the ...


1

1) Enable vertex snapping on the feature 2) Use the Node Tool and drag the vertexes from the right polygon to the one on the left (the snapping will allow you to place them exactly on top of each other) 3) From the Advanced Digitizing tools use the Merge Selected Features tool (note that you have to select both features first!) EDIT: Screenshots of the ...



Top 50 recent answers are included