Tag Info

New answers tagged

0

If you load an unreferenced raster into the georeferencer, the question for the CRS is surely useless. The referencing assings values of pixel/line to target coordinates, so the source CRS does not play any role. The target CRS however is important, it depends on the way you are doing the georeferencing. You have lat/lon grid lines imprinted on the map, ...


0

In Settings -> Options -> System of QGIS, you will be able to see the read only current environment variables of your system; precisely the folder where your temporary data are being written (see next image). You can edit the path of these folders by using the Control Panel of Windows (filtering by env at the browser); see next image.


0

I assume the GeoTiff is in WGS84 EPSG:4326 with degrees as units. As you may know, degrees of latitude and degrees of longitude have different lengths if you are away from the equator. What you expect to see is a projected CRS, like Web Mercator EPSG:3857 or the UTM zone of your part of the world. In QGIS, you can set the project CRS to change the view ...


0

I'm not sure if this helps, but I used ogr2ogr and converted from shp to shp adding the -zfield argument and was able to reference the shp into microstation as contours with elevations. ogr2ogr -f "ESRI Shapefile" {outFile.shp} {inFile.shp} -zfield {ColumnWithZValue}


0

Have you looked into the Maplex Label Engine? It's a pretty powerful labeling option that might be suited for your needs. It comes with all ArcMap versions over 10.0 IIRC.


2

In QGIS 2.10.1, the option Change angle is availabe for the Rule-based style which can be used for rotation. This can be accessed by right-clicking on an item.


2

Here's some quick-and-dirty Python code that works on a simple shapefile layer: # Get the currently selected layer inLayer = iface.activeLayer() # Get its list of fields inFields = inLayer.dataProvider().fields() # Convert its geometry type enum to a string we can pass to # QgsVectorLayer's constructor inLayerGeometryType = ...


2

I set the data frame projection to WGS84 Web Mercator (Auxiliary Sphere) as suggested by Nahas and this didn't change the end result. However looking at the previous thread supplied by Vince (QPJ files on ESRI software) the answer at the bottom suggested deleting the prj. and .qpjs files then bringing the data in. I did this, assigned projection to WGS84 ...


1

Your QGIS version (precisely the GDAL version it uses) was probably built without HDF5 support. QGIS automatically lists all subdatasets in a HDF5 and lets you chose which one you want to open when you import/open a HDF5 container. You can view all supported formats of your specific install by importing a Raster dataset (add Raster Layer) and using the ...


0

The Netcdf browser plugin you are using does not seem to work with the data, although the file ending suggests a netcdf file. See http://www.hdfgroup.org/projects/netCDF-4/ on the differences between Netcdf4 and HDF5. Possible duplicate of Getting warning when opening NetCDF file using gdal?. You need to run gdalinfo on the file to access the subdatasets ...


1

You probably do not want different symbol layers (they will be painted on top of each other). You probably want to look into QgsCategorizedSymbolRendererV2 which lets you define multiple categories with a different symbol for each. setDataDefinedProperty is for defining a style property based on a feature attribute like the color defined by a field with ...


0

The widget types Value Relation and Relation Reference have a large overlap. Certain functionality - like (chained) filtering which you are using here - is only implemented for one of the two. So yes, this is a valid/reasonable approach. There is no simple way (yet) but it wouldn't be much effort to hide this button with an option in the widget ...


0

There is a lot of help available on how to configure LAStools for QGIS. First check the original blog post about it (including all comments). If you speak Spanish then there is also this option here. And if all this does not help then search for QGIS in the LAStools user forum.


2

Actions are stored in the style of the layer. So, you have to set the action and save the style. When you import a new shape you have just to load the style and you will have your action. Because I think you are using this action for different geometry types, it could be usefull for you to create different default styles for point, line and polygon.


0

After seeing the raster image of the field, I though of this process - I used Arcgis 10.2.1. Using the dimensions provided I worked out what the lengths and spacing of my lines. The spacing of the lines included a buffer distance to incorporate for ally ways and spacing between plots. Eg a plot width of 3.8m would have .5m add to its width (.25m for ...


1

Transpose the document as the previous post stated. Use the auto increment tool in the Q processor toolbox to add a differing numeric value to each column attribute if any match. Explode the single polygon into multiple by the newly auto generated values centroid. I hope this is what you are wanting to accomplish.


1

As we are a small company, we don't have the resources to buy ESRI software, and don't have a server in the first place This is gonna sound like a sales pitch for Esri, but promise I have no affiliation with them ;) You could look at using ArcGIS Online to collaborate easily between multiple offices. The pricing model doesn't require expensive server ...


3

I've finally solved this for my purposes so here's the solution I came up with if it helps anyone: Write a python script which essentially does this: identify the unique categories in the point layer field of interest for each category, select all matching points and establish the extent of this set for each extent generate a new polygon in a blank ...


0

Create a custom CRS around the center of the desired square: +proj=tmerc +lon_0=7 +lat_0=51 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +towgs84=0,0,0,0,0,0,0 +no_defs Create a textfile with the following content for a 10*10 km square: Geom, "POLYGON((-5000 -5000, -5000 5000, 5000 5000, 5000 -5000, -5000 -5000))" Add the file as delimited text ...


3

The EPSG: 3857, WGS 84 / Pseudo Mercator in QGIS is called WGS84 Web Mercator (Auxiliary Sphere) in ArcGIS. You are simply not using the right projection.


1

Using the WMS tile service from http://lasigpublic.nerc-lancaster.ac.uk/arcgis/services/LandCoverMap/LCM2007_GB_25m_V2/MapServer/WMSServer can load the Landcover tiles in with QGIS You can save out for local files or create vector file from raster using the grass tools (r.to.vect)


1

It's quite easy to do with a small python script. You can paste the following snippet to the python console. To initialize the layer variable you can select it in the TOC and run layer = iface.activeLayer() befor running the code. layer.startEditing() for f in layer.getFeatures(): # Create X-1 new features since we already have the original for i in ...


1

The CEH data is a single band greyscale Tiff that has an Esri .lyr file associated with it to style it with the appropriate colours. This is not the most straightforward option for this dataset but it is consistent with other datasets that have multiple colour schemes. Digimap now provide a QML file along with the Layer file to make the data more ...


1

Looking at that image, my question would be - are you sure it's the islands? It could be the coastline. Fixes: Islands - if you think it's the islands, then just exclude them. I'd suggest simply calculating the areas of the features and removing any that are island sized. There appears to be a clear size difference in your features so you won't end up ...


0

Rather than deleting the islands you could run the Singlepart to Multiparts tool (Vector > Geometry Tools) on your state layer using the counties as the unique ID field. The output will then be a record for each county, if you then re-run the Mean coordinate it should then be more central as there are far fewer counties than islands. For reference The ...


1

If you want to use a solution with processing as in How to merge shape files with attributes from a python script in QGIS? (without in the solution of gcarillo): 1) The easiest solution is to is to run the wanted algorithm from the toolbox and look at the /.../.qgis2/processing/processing.log file. The last lines gives the solution: ALGORITHM|Mon Jul 27 ...


1

You can join your two layers in this way: # Get input and target layers targetLyr = iface.mapCanvas().layers()[1] # Second layer from the ToC inLyr = iface.mapCanvas().layers()[0] # First layer from the ToC # Set properties for the join targetField='myTargetField' inField='myInputField' joinObject = QgsVectorJoinInfo() joinObject.joinLayerId = inLyr.id() ...


1

SELECT category, ST_Union(geom) geom FROM s.road GROUP BY category; You might want to use ST_Dump() afterwards not to have multilinestrings in the result.


1

Here is a great resource about bivariate maps in QGIS, and it includes info about creating a legend. EDIT: You will create the legend outside of QGIS, and bring it in to the layout (whether you do the layout in QGIS Composer or another graphics program).


0

I can help with questions 1 and 2 for which I find QGIS solutions quite simple. Question 1: Use the spatial query tool (see doc here and button icon below). Question 2: Use Vector > Analysis Tools > Basic Statistics (see screenshot below). It is quite intuitive to use: select the vector layer on which you need statistics (like a column sum), then select ...


0

I'm using QGIS 2.4, but I think it's the same: click the menu PROCESSING, then TOOLBOX. In the Toolbox, type REPROJECT LAYER. Click to open the algorithm. You can select the layer you want to change the coordinate system (INPUT LAYER), and it will result in a new layer (REPROJECTED LAYER), with the new coordinate system.


0

You can get your desired data after making a free account on this website earthexplorer.usgs.gov You can download landsat7 as well as landsat8 satellite imageries from this site and can perform image classification in order to get required land cover.


2

I have never worked in QGIS. The R equivalent would be to use gUnion in the rgeos package: http://www.inside-r.org/packages/cran/rgeos/docs/gUnion Here is a reproducible example to demonstrate: library(sp) library(rgeos) #create polygon r1 <- cbind(c(641777, 642290, 642276, 641794), c(7036885, 7036743, 7036154, 7036146)) r2 <- cbind(c(642320, ...


3

You could use the raster Calculator something like (raster1>raster2>raster3)*1 OR (raster1>raster3>raster2)*1 OR (raster2>raster3>raster1)*2 OR (raster2>raster1>raster3)*2 OR (raster3>raster2>raster1)*3 OR (raster3>raster1>raster2)*3


0

The filter code you pasted appears correct, and in fact it works when I try it in QGIS 2.8.1. If this still does not work for you, it may be a bug: you can make a free account on their bug tracker and report it there: http://hub.qgis.org/issues/


0

The canvas does not communicate its state back to the widget. The layer order is managed by QgsLayerTreeMapCanvasBridge which is only exposed as of (upcoming) QGIS 2.12 and in the nightlies since now. l = iface.layerTreeCanvasBridge() l.setCustomLayerOrder(a) # a is a list of layer ids, make sure all the layers are in there l.setHasCustomLayerOrder(True)


1

QGIS now offers the current and the long-term-release version in parallel. According to https://www.qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu, the repositories are http://qgis.org/debian/ http://qgis.org/debian-ltr/ to minimize conflicts. Ubuntugis is currently a bit behind, only offering QGIS 2.8.1 Unfortunately, you still can not ...


1

To avoid "layer is not valid" errors you should carefully set your QGIS prefix path. The prefix path must be set to let QGIS know where to find resources such as data providers and the reference system database. If you look at your QGIS installation, you should be able to access lib/qgis/plugins on Unix (or just plugins on Windows), relative to the prefix ...


3

Processing provides example code for a new algorithm provider. It's located in the processing folder inside your home directory, e.g. on my machine: C:\Users\anita\.qgis2\python\plugins\processing\algs\exampleprovider Based on these example files, you can build your own plugin which can contain as many new algorithms as you want.


0

At the bottom of the toolbox, change from "simplified" to "advanced" interface to see the grouping into different algorithm providers (GDAL/OGR, GRASS, ...) The algorithms are all there, they are just not separated by provider if the simplified interface is activated.


3

You can use function editor tab in the field calculator and make your azimuth function like this: from qgis.core import * from qgis.gui import * @qgsfunction(args="auto", group='Custom') def azimuth(x1,y1,x2,y2,feature,parent): p1 = QgsPoint(x1,y1) p2 = QgsPoint(x2,y2) a = p1.azimuth(p2) if a < 0: a += 360 return a Once ...


1

I guess you are running Ubuntu 14.10 (issued October 2014, hence the name!) which is also called Utopic. So you can use either QGIS Debian repositories according to http://qgis.org/en/site/forusers/alldownloads.html#debian-ubuntu or the ubuntugis unstable repository ...


2

You can do this with two UPDATE statements, one for the distance, and the second for the line ID, with a subquery to get the values from the line table. And use the ORDER BY ST_Distance(...) LIMIT 1 construct to get only the closest line. I have a cities point layer, and a hiways line layer. Each has a primary key column 'pk'. I added to the cities two ...


2

QGIS updated to the SIP API V2 between 1.8 and 2.0. See: https://hub.qgis.org/wiki/17/Python_plugin_API_changes_from_18_to_20#Replace-QStringList-with-list It will transparently convert some types (like QString or QList) between python and Qt types. So you can just use a python list of str or unicode objects and pass it to the pyqgis and pyqt API wherever ...


1

The coordinates must be in the same crs as the layer the diagrams are attached to. Could this be your issue?


3

Why not data define the image path? Next to the image filename is a button which allows you to link the path to an attribute in your data (or set via an expression).


1

There are a couple of ways to make your contours smoother. Looking at the contours, I suspect it's because the IDW raster is low resolution. Did you use the default size (300x300) when creating this? Resize your IDW raster Probably the easiest way :- take your existing IDW raster and make it bigger with gdal warp (Raster > Projections > Warp). ...


1

Assuming you have QGIS Server appropriately installed (with a working GetCapabilities request) on Ubuntu/Debian, the main steps involved on my end to get the QGIS Web Client up and running are as follows: Install python psycopg2, python-webob, git, libapache2-mod-wsgi using terminal: "sudo apt-get install python-psycopg2 python-webob git ...


1

There is a very straightforward way to load GIS data directly into Blender with this plugin by Domlysz. The wiki shows how to install and use it. I've had the best success using projected datasets rather than lat/lon, only as I find it easier to match metres to Blender units when manipulating the data in 3D. Blender should also ignore the separate channels ...


1

As detailed in the simplesvg plugin exporting window (not in a very evident position, though), simplesvg works by dumping screen coordinates (expressed in integer pixels) from the current viewport at the moment of exporting. This means that all vertices are implicitly snapped to the pixel grid. A workaround for exporting a large area while still retaining ...



Top 50 recent answers are included