Hot answers tagged

6

You can do this with an expression for the size in the labelling dialog. First click the expression button at the far right of the size setting - here its yellow because its active (at first the button will look like the others): Then set it to something like this, depending on what size you want and the name of the attribute of your towns - here I want ...


4

You can use Rule-based labelling to specify the parameters of individual or groups of points. You can do this by right-clicking the point layer > Properties > Labels. Then select the options as shown in the image: Now you can add rules to specify how 'Merzifon' should be displayed by editing the properties such as size and colour: Then repeat by adding ...


4

You don't mention Python, arcpy, or any coding in your tags, so I would assume that you're limited to working in ArcMap; is that correct? I have a Python/ArcPy function that creates Thiessen polygons on the vertices of each polygon, which mostly yields the results that you're looking for. The steps are basically: 1) Delete all extraneous fields (as step 3 ...


3

Use the MMQGIS plugin to Combine -> Merge Layers, selecting your two polyline layers A and B as the inputs, and save the output as Layer C. Then use Vector -> Geometry Tools -> Lines to Polygons on Layer C and you will have your inner boundaries as polygons.


3

You could use the Join attributes by table tool from the Processing Toolbox which allows you to combine the attributes of 2 layers at a time using common field. So first you could do Layer1 and Layer2, then the output of this with Layer3 etc. Or you can use the Merge Shapefiles to One tool from the toolbar (Vector > Data Management Tools > Merge Shapefiles ...


2

You may use plugin spatialJoin, available from the official plugin repo. I named the point layer "Islands" and the polygons "Coast". The points are WITHIN the grid cells. The result are points having the attributes of the grid cell they are within (prefixed with "spj_"). Now the polygons. I suggest to convert them to centroids (Processing -> QGIS ...


2

I want to step back to your original intend of combining rasters. When you have both rasters loaded, then open Raster -> Raster Calculator from the menu. In the next dialog you will see a list of currently available raster dataset. You can define an algebraic formula by simple clicking of raster bands from the upper left list, and operators. In the example ...


2

Have you tried this? A QGIS plugin to count polylines / polygons vertices and add a new column storing the number of vertices per feature. This could help sorting poor quality / good quality lines from your approach. EDIT : if you prefer doing so in PostGIS directly, try st_NPoints function. The following query calculates the number of vertices in a new ...


2

This should normally work out of the box. Make sure that the imported GPX file layer is EPSG:4326 (lat/lon degrees). You can save it to the shapefile in any CRS you want. Please do not use Set Layer CRS in this step. For the Openstreetmap background, you can use the Openlayers plugin or the new QuickMap Services plugin. Openlayers requires the project CRS ...


2

This is only half an answer as the following code can be used to import waypoints, routes and tracks but not route_points or track_points (these seem to be replaced by the tracks layer). import os path = "path/to/gpx/folder" names = ["waypoint", "route", "track", "route_point", "track_point"] for dirpath, subdirs, files in os.walk(path): for f in ...


2

I solve the similar problem this way: from qgis.core import * from qgis.gui import * layer = QgsVectorLayer(self.shpFilePath, "Track", "ogr") crs = layer.crs() crs.createFromId(4326) layer.setCrs(crs) QgsMapLayerRegistry.instance().addMapLayer(layer)


2

There's been somewhat of a development in QGIS since I asked this question back in 04/2014 so will post an answer to close off this question. The following code does what I had wanted (practically similar to the "Hex grid from layer bounds" script but this wasn't available at the time): ##Create Grid=name ##layer=vector ##cellsize=number 1000 ##grid=output ...


2

In QGIS merge the two polyline layers into one polyline shape file. Use the GRASS plug-in to create polygons from borders, unfortunately GRASS plug-in is not available in QGIS 2.8, so upgrade to QGIS 2.12 or use standalone GRASS (I give the GRASS command name in brackets): Create a new GRASS location Import the shape file into GRASS(v.in.ogr) Convert ...


2

The example code above should work (coincidently with or without the 'grid.updateFeature(feature)'). The problem was in my actual code I was trying to pass Numpy datatypes and rather than throwing an TypeError, changeAttributeValue() just silently failed. Always remember to check your variable types when debugging!


2

I have found a way to do this. Changes to the feature geometry (e.g. removing overlaps) and attributes are made to committed new features, only after the committedFeaturesAdded signal has fired. Signals from the EditBuffer can be used to trigger messages but not database changes. Where modifications fail, it is easier to delete the user feature and add a ...


1

One way would be to serve the layer from GeoServer in GeoJSON format, and on the client side digest the layer with Mapbox-GL.js, then let MapboxGL convert & render the layer as a vector tile. This is not a recommended approach for very layer vector layers, but I have had success with layers with under 10 million vertices. Check out: ...


1

Thinking of a way to visualise this. I'm going by gut-feel here, so please forgive the vagueness :) I'll assume that both tracks use the same CRS. I assume that more detailed track is the 'baseline', and you want to measure how far away the other track is. You could use PostGIS to connect each vertex on the baseline to the closest point on the less ...



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