New answers tagged

1

You may be getting this crash from one of the 3 reasons below: 1: SRID not set on Geometry Column. To check the SRID, I use the following SQL code SELECT *, GeometryColumn.STSrid FROM [DataBaseName].[dbo].[TableName] 2: Invalid Geometries in the Tables. To check the Invalid shapes, I use the following SQL SELECT * FROM [DataBaseName].[dbo].[TableName]...


0

There is an Experimental plugin for QGIS called "GeorefExport" that will allow you to export a Geospatial PDF (as well as other formats) maps from QGIS directly. From what I can tell, though, this plugin does not work from a Composer template, just the primary editor map frame.


0

In the Postgis connection settings, selecting the "Don't resolve type of unrestricted columns (GEOMETRY)" checkbox usually helps.


5

I see the same issue. Took a look at this file in InkScape, and used Shift-Ctrl-F to bring up the Fill and Stroke properties. I noticed that the fill on your green and blue areas were set to 'pattern fill', stripes 1:1. Make a note of your blue and green colours first. Next, change to use 'Flat Color' on both the coloured areas, then reselect your colours ...


1

In PostGIS, if you just want the row number you can do this: SELECT row_number() over () as gid, sbqry.geom FROM (SELECT ST_Intersection(land_parcels.geometry, flood_zone.geometry) AS geom FROM land_parcels, flood_zone WHERE ST_Intersects(land_parcels.geometry, flood_zone.geometry) AND NOT ST_Touches(land_parcels.geometry, ...


0

In the example below, the SubRegions do 'fit' into the Regions, but I convert the geometry of the SR into centroid so I'm doing more of a 'point-in-polygon' type of intersect, rather than chancing that some edges aren't exactly coincident. From there, simply intersecting the two sets of geometries and summing the 'population' field of the SR's and grouping ...


1

I’m facing the same problem. I have not found a real solution, but I found out, that in content of the build in variable __name__ changes. It is “qgis.user” one time and “startup” the other. So you can work around the problem by: import qgis if __name__=="qgis.user": qgis.utils.iface.actionShowPythonDialog().trigger() print "Welcome chump"


0

The Leaflet html file is not a GIS layer and cannot be added to QGIS via pyQGIS. The html does reference various kinds of GIS layers, e.g. geojson, wfs, wms which may be loaded to QGIS via pyQGIS. There are many examples of this on this site and on the web how to add these layers to QGIS via pyQGIS. Load a GeoJSON layer with QGIS's Python module http:...


1

This is a another method is given below: for a in iface.attributesToolBar().actions(): if a.objectName() == 'mActionDeselectAll': a.trigger() break


1

There is a plugin tool in QGIS called Mutant. Load all Rasters into a layer. Choose a point. (Make sure that in the Options Tab in Mutant the "Plot values only when mouse is clicked" is checked.) In the Mutant plugin in the Table tab there should now be a long list of values, click 'Export to CSV'. Open in Excel and manipulate the data as desired into ...


2

Not sure how to modify the interface of such scripts but you could use an example script like the following where the Enter_field parameter has a default string of ID and if a field name matches this, it prints this field name otherwise it will print the one that is selected in the Or_select_field parameter: ##Example=name ##Input_layer=vector ##...


0

It is because your field names are invalid as (at least) shapefile column names and QGis seems to expect shapefile conforming field names. These must start with a letter not a digit.


0

Within the same folder as your csv file, you can save a csvt file which will then provide the field type for each field within the CSV. To do this list the field types you want each field to adhere to in a string within a text editor (notepad works for this) with each field separated by a comma. Make sure the order within the text file is the same as the ...


0

Buffering features in wgs84 does not work with distances calculated in meters. You first have to reproject each layer to a projected crs suitable for your area. In the modeler this is possible with


3

The reason for this issue is comparitively simple. Cp. Screehshot for an idea of the spreadsheet I had to process. These beautiful colored, linebreaked nicely human readable spreadsheets are an invention of satan himself. This Spreadsheet was so full of formatting, blanks, special characters and linebreaks in column headers, cross references,... that a ...


0

I faced the same issue on QGIS 2.14.3, but the issue was because I was connected to the enterprise VPN network which has a framework preventing the download to all of these so the plugin manager window was not showing any of the important plugin in the list. Once I disconnected from the Enterprise VPN, I started to see these important plugin in the manager ...


0

Unfortunately, it appears the Offline Tool is not working correctly in version 2.14.3 however, I did a very basic test of the nightly build 2.15.0-26 and the tool performed as expected. I am hopeful that the tool will be functional in 2.16.


0

It might be easiest with a script rather than using tools. The script structure would look something like this: Open first file. Extract Date/Time information Load raster as data array Choose random point If random point has underlying attribute place in dictionary Place Date/Time and NDVI in a list within a list in dictionary Choose other random points ...


1

You can add the HDF file to QGIS via the add Raster layer button, then you will be prompted to choose which bands in the HDF file you want to load. You can then export these bands to a different format like a tiff file using the options under the Raster menu like translate (Raster > Conversion > Translate). However there will be the issue of the MODIS ...


2

Depending on what attributes you have in your states you can join them based on location using QGIS. The tool can be found at "Vector"-"Data Management"-"Join attributes based on location". Your target will be your shp1. It then should bring you all attributes from your states.


1

Yes. Insert a label, and for the label text insert an expression with the text: @project_path The @project_path variable is automatically filled with the current path of the project.


2

Your escaping isn't write quite right. It should be: (\"accdate\" >= '1990-01-01' AND \"accdate\" <= '1992-12-31') (You have some extra "s) Also note that: iter = lyr.getFeatures(request) ids = [i.id() for i in iter] lyr.setSelectedFeatures(ids) selected_feats = lyr.selectedFeatures() Is quite inefficient. Try: iter = lyr.getFeatures(request) ...


1

The QGIS 2.6 documentation does not cover the new GRASS 7 plugin. You can create a new mapset from the menu or open an existing one from the browser


0

Reading the documentation here http://www.nanaimo.ca/crimereporting/help it seems you can construct a query url as the following and this will return the GeoJSON you are looking for http://www.nanaimo.ca/crimereporting/api/incidents.geojson


1

There's no option for data defined grid parameters yet, so unfortunately this isn't possible. You should file a feature request over at hub.qgis.org.


2

The general logic for setting border color is: # black polygon with red border symbol = QgsSymbolV2.defaultSymbol(layer.geometryType()) layer_style = {} layer_style['color'] = '0, 0, 0' layer_style['size'] = '2.5' layer_style['color_border'] = '255, 0, 0' symbol_layer = QgsSimpleFillSymbolLayerV2.create(layer_style)


1

SELECT * FROM pgr_floydwarshall( 'SELECT gid AS id, source, target, meters AS cost FROM jalan') WHERE start_vid = 9 AND end_vid = 24; You were actually computing the shortest path from/to every node you have which was surely taking too much time, you need to add the where clause to you query so you can specify the origin and destination


0

if you can't enable editing then maybe your data is saved as geojson or kml, you can save it as a shapefile (shp) with QGIS and load it again this way the edits can be enabled from the tool bar ( the little pen ) and you can add the data you wanted.


1

I think ,since the solution proposed by Joseph didn't work, your problem is probably because of the type of geometry you are using. Check if your geometry type is multipolygon then change it to polygon this way your processing will work


1

Meanwhile I tested this with 2.8.7LTR, 2.8.9LTR, 2.14.3, 2.15.0 on Win7, Win10, Win2008 R2, installed via OSGeo4w Installer or standalone. In all of these cases I can only select Text, unbegrenzte Länge (text) (unlimited Text). I explicitly do NOT have the option Text (string) with the ability to set the output field length to some value. Examples: 2.8.7 ...


1

First, to filter your result, simply add your required condition to your query. So here, it's your query with the addition WHERE start_vid = 9 AND end_vid = 24. Here you can find further info on the usage of WHERE clauses. After that, just insert your result into your desired table as explained in the documentation.


1

This worked for me from A note on configuring your IDE on Windows and tere is available information for Eclipse and Pydev, I just like using Pyscripter If you used the OSGeo4W Installer, you can find this under the bin folder of your OSGeo4W install. Look for something like C:\OSGeo4W\bin\qgis-unstable.bat. For using Pyscripter IDE, here’s what you have ...


1

I found a solution without python and postgis, using the graphical modeller. Here is a summarized explanation. Step 1: extract end nodes with v.to.point give them a unique id give them a new attribute roadtype based on following expression case when highway IN ('path','footway','footpath','steps','cycleway','pedestrian','track','bridleway') ...


3

Here's a couple of methods: Select your counties again and then select from the menubar: Vector > Geoprocessing Tools > Dissolve and check the Use only selected features. Click the Edit button on your shapefile, selected your features and then from the menubar: Edit > Merge Selected Features If you still receive errors then you may ...


2

Beware that the Shapely (Python) / GEOS (C++) data model is defined in a plane. So if your points consist of GPS positions (latitude, longitude) using the shapely.geometry.LineString.interpolate(distance) method will output a GPS position at the euclidean distance along the given LineString. Shapely's interpolate() is based on GEOS' geos::linearref::...


0

Paraphrasing a comment by @SaultDon: If the buffers use ARCS/CURVES instead of regular linestrings, then be aware that the openfilegdb and esri filegdb api driver both don't support curves in geometries unfortunately. See QGIS 2.8.1 OpenFileGDB compatibility with ESRI FileGDB?


1

If you still didn't fix your problem, then maybe this might help you: Try to check if all data stores you have are valid (so their sources are available). I had data stores added via Geoserver Web Interface to which I had manually deleted source shp files from the server hdd. So the Geoserver data stores were invalid and the source destinations were ...


1

In the screenshot you posted, you have selected the option for Output field type of "Text, unbegrentze Länge (text)", which Google translates as "Text, unlimited length". Since it is unlimited, precision and field length are set to a dummy value of -1. I am also using QGIS 2.14.3 (on Linux Mint 17.2), but I do not have the option of this data type. I ...


1

You are missing the field length. I don't know why you have Text, unbegrenzte Länge (text), I only can choose Text (string) with the ability to set the output field length to 10 or 100 or else. With a given field length, it works for me. Same QGIS version, 64bit, Windows standalone and Linux Mint. UPDATE It seems to be a difference whether you add the ...


0

Just make separate copies from your project file for home and work use. Data you save will be written to the layer source files, not to the project file. Once you have finished the homework part, you can take it to work and re-add the bad layers. If you have a difficult styling on layers, you might save it separately and add it too.


0

Proj.4 knows the Icosahedral Snyder Equal Area projection +proj=isea, but not the inverse projection. For that reason, it is not usable by GDAL. I guess the Waterman Butterfly projection will fail for the same reason. Waterman butterfly projection in Mapnik lists some alternatives.


3

Using next PyQGIS code (1 hour ago this answer had QGIS tag): from math import sqrt layer = iface.activeLayer() feats = [ feat for feat in layer.getFeatures() ] n = len(feats) centroids = [ feat.geometry().centroid().asPoint() for feat in feats ] polygons = [ feat.geometry().asPolygon()[0] for feat in feats ] lengths = [] for i, pol in enumerate(...


0

My initial thought is that your project settings are not in the correct coordinate system, regardless of the layer settings. I would start a blank project and only import a single layer and that is already set at the Hartebeeshoek94 projection. I'm not sure if QGIS takes the projection of the first layer, so maybe right click the layer and choose 'Set ...


2

If I understand what you are trying to do, you don't need to dissolve, you just need to summarize by landscape zone after intersecting the two datasets. If you do this in a geodatabase the area of each polygon is calculated when the intersection is completed.


1

Can you store your labels in a separate table? Then just filter them out in FME (maybe a GeometryFilter transformer) and don't write to that table. You would need to ensure Overwrite Existing Database is set to No, but that all the tables have Drop Table set to Yes. As long as you don't write any features to the label table, it won't get dropped or ...


0

Try adjusting the breaks in the histogram once you've set a graduated colour scheme in the Layer Properties: Here is the basic symbolization: Then click the 'histogram' tab and click the 'load values' button: Now click the histogram above the 0 value on the X axis - this adds a class to your graduated scheme that will start at 0: That's the closest ...


2

It looks like you are working with MapInfo. The "Distance Calculator" (find it in tool manager) has many options and I think it can handle this task too. There is an article about it here: http://web.pb.com/mapinfopro-jul-2013/Toolbox-Distance-Calculator


2

After trying several attempts the following successfully worked: (a-b)


9

Using PostGIS, I used ST_ConvexHull to simplify the polygon for a faster result: Get the furthest Point: SELECT ST_PointN(ST_ExteriorRing(ST_ConvexHull(the_geom)),Generate_Series(1, ST_NPoints(ST_ExteriorRing(ST_ConvexHull(the_geom))))) as FarPoint FROM PolyTable; And if you are interested in creating a Circle from the centroid: SELECT ST_Buffer(Center,...


3

The widgets which you are referring to are leftovers from Qt3. QGIS at the moment is based on Qt4 (which exists since 2005 and has seen end of life in December 2015) and is soon to be updated to Qt5 (2016/2017). Ten years ago, when it was about moving applications from Qt3 to Qt4, a Qt3Support module has been introduced to ease the migration. However, ...



Top 50 recent answers are included