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 ...


5

You should use "Vector->Research tools->Select by Location" and check the "Use selected features only" box. You will want to include ONLY: Include input features completely within the selection features https://docs.qgis.org/2.6/en/docs/user_manual/processing_algs/qgis/vector_selection_tools/selectbylocation.html


5

The easiest way to see these updates as changes are made to the csv is to use the "Add Delimited Text Layer" button and choose "watch file" as one of the options. I noticed with the spatial index feature enabled, it doesn't update the layer extent (so the zoom to layer button doesn't do what it's supposed to) or the index as new features are added, so maybe ...


4

You can use org2ogr to convert CSV file to GIS format, e.g. Shape file. Shape files are not the best solution if you would like to write and read the same file, they will block each other. You had better to use PostGIS database. AFAIK the best solution would be: from your Raspberry send the actual coordinates to a web server where a PHP/Python/whatever ...


4

Try library(rgdal) library(ggplot2) library(rgeos) library(maptools) library(plyr) library(raster) #read in shapefile eth <- getData("GADM", country = "Ethiopia", level = 1) #fortify eth@data$id <- rownames(eth@data) eth.f <- fortify(eth, region = "id") eth.df <- join(eth.f, eth@data, by = "id") #create dummy vector x <- 6:9 #try to ...


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

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 ...


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.


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

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 ...


2

Just to add to the already given great answers, you could also use the Select by location tool from the Processing Toolbox to give you more options on how you want to select your objects:


2

There is a spatial query plugin that makes this possible. It has a 'within' operation. You can see the QGIS docs on the plugin here. Edit: to add that you'll have to add the plugin via the Plugin Manager. If you are unfamiliar with this in QGIS, here are the basic docs.


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 ...


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 ...


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: ...



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