New answers tagged

0

To get the information you want, you need to use the QSettings class. This uses a hierarchical structure, like the Windows registry. If you have the latest version of QGIS, you can see this hierarchy using Settings>Options>Advanced The following code works from the Python Console. I've not tried this from a plugin or outside of QGIS, so some additional work ...


1

Working from Linux here but the program is identical. The option you're looking for is under the general options -> "Project files" tab. The option for opening projects on launch can be set to the "Welcome Page" (What you're looking for), to open up the last/specific project, or to simply show a blank canvas. It's possible that when you upgraded your ...


1

In ArcGIS you can Erase without the exorbitantly priced License by activating ETGeoWizards in a standard ArcView license. If you right-click on your toolbar you will get a list of tools, click on "ETGeoWizards" and it will activate that tool. After opening ETGeoWizards tool, on the left hand side there are a number of categories choose the "Overlay" cat. ...


0

You can add a virtual ogr layer creating an .ovf file like the following and adding it to QGIS. <OGRVRTDataSource> <OGRVRTLayer name="LAYERNAME"> <SrcDataSource>MySQL:DBNAME,user=DBUSER,password=DBPASS,host=DBHOST,tables=TABLENAME</SrcDataSource> <SrcSQL>SELECT * FROM TABLENAME</SrcSQL> ...


1

Form your images (which should be added to the question, and not posted as an answer), you seem to download bicyle stations from http://data.grandlyon.com/equipements/station-vflov-disponibilitfs-temps-rfel/ Besides kml, they offer the data in shapefile format. This is the preferred format for GIS software, and you can choose the CRS you want (EPSG:4326). ...


0

I had the same question, and after scouring all documentation and other information I could find on this, I think the answer is that specifying X and Y fields as geometry source is only supported with the Delimited Text Layer driver - although I haven't found any reference which states this explicitly. In other words, if you want to use a database such as ...


1

You could use the Join Attributes by Location tool from the toolar (Vector > Data Management Tools > Join Attributes by Location) and select your polygon layer as the Target layer and your grid layer as the Join layer. Then choose to take a summary and select any of the options (doesn't matter which if you're only interested in the count which is default): ...


3

Uncheck the "Coordinate GMS" option which I believe in English is "DMS coordinates". The csv file you linked to is not in degrees/minutues/seconds but in XY coordinates. Unchecking this option should let you import the csv as a point shapefile.


2

As @Papierwolf mentioned, there are a number of ways. One of which is to directly style your point layer using the Graduated style. I made an example where I: Selected an id column (which for me contained ascending values, 5 to 10) Set the Color ramp to YlOrRd Classified 5 classes then right-clicked each class and selected the Change size option. From ...


1

John Barca "Change St_Collect(geom) as Geometry to ST_Collect(geom) as geom" Thanks again John. Edit: This seems to make a selection and doesn't actually update the geometry to snap to the points, still closer to what I want.


0

@ gcarrillo Nice response and almost works perfectly :) When the lines are clipped some are broken into 2 (or more) segments if they pass in and out of a more complex polygon. When this occurs the correct start co-ordinates are returned but the end co-ordinates are NULL. When exported to csv they are blank. Is there a way of generating two (or more) line ...


0

Probably not the best method but something similar happened to me a while ago and the way I resolved it was to: Resave your point layer with the Save As... option, as mentioned by @SpatialSuccess Toggle the Edit button for your point layer, select all points either manually or using the Field Calculator Click the Move Feature(s), select and drag one point ...


0

It appears to be some sort of bug because after closing down and restarting QGIS the heatmap plugin now works perfectly again .


1

Found the answer by myself. It is possible by using python expression functions inside a composer label. All we have to do is: enable/disable the raster layer one page before it should be visible/hidden. Here are the expression functions: @qgsfunction(1, 'Atlas') def EnableRasterLayer(values,feature,parent): rasterLayer = values[0] layer = ...


3

This is a fairly simple task. Load both datasets into QGIS Join the two datasets using the column they both share. There are a lot of tutorials on joining on the internet. I.e.: http://maps.cga.harvard.edu/qgis/wkshop/join_csv.php or https://infogeoblog.wordpress.com/2013/02/18/joining-layers-in-qgis/ Now you just need to use the Field Calculator ...


1

All used shp-Files have the EPSG 31468. I run the model, add a field and calculate the area the sum of all records will be 10275 m² When I do the same with field calculator form the gui the sum of all records will be 10311 m². When I use a other gis I get always this result


2

When you switched the CRS did you do a 'save as' (required to reproject)? If you just changed the CRS in the layer properties you won't actually reproject and will see features moving. If this is the case, you'll need to first set the CRS back to the original in layer properties, then do the 'save as' to reproject to your desired CRS.


1

If you are creating similar maps for different regions, you could create an atlas in the print composer, and use presets to control which layers are shown for each region, if these will need to change. You can then very quickly copy & paste styles between your styled layers and the new additions. Even if you need to export the map for each region as an ...


0

Below should work. The key part is the assignment d[(mainArray == 0)] = 0 setting all the items to zero in a new array where mainArray is zero. Sounds like your rasters might be spatial so the projection setting stuff is important too. Cheers. # # ----- create output raster # outfilename = outputFolder + '/zeros.tif' driver = ...


0

You could try doing it a different way using the refFunctions plugin, which operates in the field calculator (can be slow for large layers though). The syntax would be something like max(geomintersects('roads_layer_name', 'road_code_field')).


1

WGS 84/NSIDC EASE Grid-Global seems to be a stereographic projection, which does not preserve areas. This is the reason why you can't get meaningful results. The most simple solution is to reproject your layer to a UTM projection suited to your area of interest.


2

You could use the Group Stats plugin, which works like an Excel pivot table. Set your town field as columns and the neighborhood field as rows, then calculate the Max of the population field.


1

You could duplicate the layer in the Layers panel and give the duplicate a rule based style displaying only the null values, setting the rule as, for example, "area" is null.


1

QGIS-only answer: If you are comfortable with some Python scripting, have a look at the QGIS Network analysis library. The PyQGIS Cookbook contains a snippet on Areas of availability which can serve as a starting point. Basically, you check the shortest path tree to find all vertices which are reachable with a certain maximum cost.


0

The general process you will employ whenever you are making a map, will be acquire the data (e.g. shapefile), use GIS software (QGIS). Once you have those two, you could add your shapefiles to QGIS and layer the data as you see fit to compose the map of to fulfill your need.


1

One way is to set Null values as NaN or some unused no like -9999.0 and make another class for this.


1

You could export your Excel table as HTML and load it into a HTML annotation.


2

I'd suggest creating a grid to encompass the entire boundary feature to the width and height appropriate for your analysis I would then convert the boundary to a line feature Then I would either select the grid cells that intersect the line feature, or buffer the line by a distance to grab a few more grid cells. Then save those selected grid cells to a ...


1

Check attribute names for special characters and remove them! use the table manager plugin to edit attribute names. I stumbled across the same issues when parsing files and so on. Mostly the problem was a special character like ö, ü, ä, ß and so on. Additionally check your shapefiles for attributes with special characters and eliminate them. Also check ...


3

Install the dissolve with stats plugin. Dissolve by the towns attribute, adding a stat for the max neighbourhood population. Join the data table created to your original one using the towns attribute and then query the neighbourhoods for ones where the population = the max stat in the joined table. A bit messy but should work.


1

Size by kategory: Use the buffer tool from Vektor menü to create a Polygon-Layer representing your cities The source layer is your pointlayer The buffer distance is given by your classification field or a field you calculate based off your classification.... The new Polygon-Layer will inherrit all the attributes from your pointlayer for the next step ...


2

Right Click on the layer name and then left click "Properties", then click the "Transparency" tab. In the box Headed "Transparency Pixel List" click the right hand icon marked with an arrow and a ? ("Add Values from Display"). Then click the black area on the display that you would like transparent. Then click OK. All black area with the same value will ...


1

Solved this. Using MINGW32 on Windows does the trick (not cmd). Seems the shell was missing.


2

Well the installation seemed to have simply ran into an error allowing the installation window to change to the "Finish" screen. I had to end process (end task did nothing) and reinstall. Thankfully, the .exe file immediately gave the me option to reinstall. If you run into this bug, ensure that you end process and reinstall with the .exe file that you ...


0

A Mapinfo TAB file for a raster looks like this: !table !version 300 !charset WindowsLatin1 Definition Table File "4430.tif" Type "RASTER" (647250.000,234000.000) (0,0) Label "Pt 1", (648000.000,233500.000) (3000,2000) Label "Pt 2", (648000.000,234000.000) (3000,0) Label "Pt 3", (647250.000,233500.000) (0,2000) Label "Pt 4" CoordSys NonEarth ...


0

The answer is to use .jpeg-.tab georeferenced pairs and then convert them to the tif files that will be georeferenced too because info in tab is converting and storing in tif automatically. The convertation is easy in QGIS (gdalwarp command): Raster->Projections->Warp(Reproject). Input file - .jpeg, output - .tif. Also we can reproject in batch mode to ...


1

It can be done in QGIS. It's called digitising when you're drawing over a scanned map (image, or raster in GIS terminology). Check this handy, simple yet accurate tutorial Digitizing Map Data and come back if you run into more questions.


0

I've come up with a workflow that works for me. Create UTM coordinates in Excel with x, y and z values. Save as this Excel sheet as CSV. Import the CSV into QGIS. Reproject the CSV from UTM into WGS84 (lats and longs). In the reprojected layer, add coordinates values to the attribute table. Save as the reprojected layer with the added coordinate values in ...


0

Ok, so I figured it out by myself. The warning were not the problem. SIP was installed for the wrong platform (msvc 2008). So I reinstalled SIP for msvc 2010, reinstalled PyQt and it worked.


0

During the 2015 Google Summer of Code, multi-threading support has been developed for QGIS Processing. The code is currently under review and is expected to land in the developer version in 2016. (Source: http://boundlessgeo.com/2015/12/latest-developments-in-qgis-processing/)


3

If you set the symbol size to "map unit" it should give you the option to control symbol scaling; via the little spanner to the right of the dropdown box. This should allow you to lock the size of the symbols and stop it scaling them.


1

There's also the MMQGIS plugin which, when downloaded and installed from the toolbar (Plugins > Manage and Install Plugins...), has the tool: Attributes Export to CSV File


2

Export the layer as a shapefile, find the shapefile on your PC. Copy/Rename the filename of the DBF part of the shapefile exportes to be 8 or under characters if it's not. (OLD MS DOS FILENAME ISSUE). Then, drag-drop the DBF right into Excel. Save as XLS. The copy paste method right form QGIS made text/character returns in a blob reset to the next row and ...


2

Perhaps another way is to set all your values to a text like you mentioned and then for the values you want to keep same (no data) you can use *. e.g: 1 thru 5 = 2 3 thru 8 = 10 * = *


5

You can add items from a template by creating a new print composer and selecting the option shown in the image: Then select your template and it should load up all the items you created.


1

If you have many shps, you may merge them together. If their table schema is the same you may symbolize the merged shp by categories, see steps below. Right click on layer name in the Layers panel and select Properties Select the Style tab, Categorized drop down, and select the field that has the lake name names defined in the Column drop down Then click ...


0

If you already created individual shapefiles, you could use the Merge Shapefiles to One... tool from the toolbar (Vector > Data Management Tools > Merge Shapefiles to One...) to merge all your shapefiles. If each shapefile contains a Name field, the final merged shapefile will also contain a Name field with all lakes and their associated name. You can ...


3

Just Add Features in your lake shapefile, you should be able to add as many Lakes as you want in the shapefile, add the attributes of the lakes as required (either on first creating the shapefile or later on by editing the attribute table) You can assign names to the lakes or categorize them anyway you want by adding an column in the attribute table (By ...


3

You can use the Select by location from the Selection tab in ArcMap to select the properties in the Parish, then you can use Select by Attribute to select the properties based on your previous selection.


0

I think the closest you can get is to assign a shortcut key to the Zoom to selection function. The default is Ctrl + J but you can change this to another key. Using this function will not affect the Select Feature tool:



Top 50 recent answers are included