0
votes
0answers
17 views

insertVertex giving false in pyQGIS

I have this code from my plugin which work in Qgis 1.8 and I am trying to make it work in 2.0. I want to insert a coordinate x and y into a polyline after the last entry. points = geom.asPolyline() ...
0
votes
1answer
46 views

How to disable “Simplify geometry” via Python?

After I've loaded a layer from a table in my db I'd like to disable the 'Simplify geometry' (found in Layers/Properties/Rendering) programatically using Python. I've tried several versions of ...
1
vote
2answers
64 views

How can i change the geometry of an existing layer?

I work with Qgis, v. 2.0.1. I have a point layer in which I have structures that could be represented as lines or polygons, but at the moment they are represented as a group of points. I know I can ...
2
votes
1answer
80 views

QGIS 2.2 rendering problems

i have a problem with some geometry. When i run the check geometry validity i get an error coming back that the rings are not closed, so recangular forms that i have surveyed are showing up as ...
2
votes
1answer
116 views

How to draw polygons from the python console?

I've been visiting and revisiting the page on geometry handling in the PyQGIS Cookbook: https://www.qgis.org/en/docs/pyqgis_developer_cookbook/geometry.html but can't seem to figure out how to get the ...
3
votes
1answer
96 views

Get geometry column back when counting points in polygon using PostGIS

I have two PostGIS tables: earthquakes and borders, which contain point data on earthquake locations, and polygons of countries in the world respectively. I want to try and count the earthquakes ...
1
vote
1answer
51 views

Mismatch in area calculation using Field Calculator vs Group Stats in QGIS 2.0

I have two polygon files (A being my area of interest and B being a categorised land cover layer). Both layers were in the same projection (projected and not geographic). Using QGIS 2.0, I used the ...
0
votes
1answer
58 views

Missing a Geom field in PostGis

I am working in a Database preaparation for that I exported a shapefile from Qgis to PostGis.The Problem is this: In Qgis I can see a Polygon feature but when the same polygon feature is exported to ...
6
votes
3answers
689 views

How to fill a hole in a multi-polygon layer on QGIS 2?

I need to fill a hole in a multi-polygon layer on QGIS 2.0. I've set the snapping option for the layer as follows : mode: to vertex and segment tolerance 4 pixels avoid intersection "enabled" ...
1
vote
0answers
110 views

Problem import shapefile in PostGIS database

I am having a Polygon shape-file. When I try to import this shape-file in PostGIS some of the attributes in Geom Field is found empty. But in attribute table when I select that polygon It is visible ...
2
votes
1answer
98 views

How to convert a line to points?

I'm working with QGIS and I want to convert a line into many points, does someone know how? Thanks.
2
votes
2answers
136 views

How can I create a multipoint geometry in QGIS?

I've got a Spatialite layer in QGIS with geometry type MULTIPOINT. Now I'd like to add some data in this table in the 'usual' way, so by doing multiple clicks in the map (e.g. left-click, left-click, ...
1
vote
1answer
211 views

How to perform a cascaded combine from python script in QGIS?

I'm working with a large dataset, and I need to be able to combine up to 400,000 polygons. I have been using the QgsGeometry::combine(QgsGeometry* geometry) function and simply looping over all ...
0
votes
0answers
61 views

Invalid multipolygon resulting from union of valid multipolygons

I'm using python (2.7) and ogr (1.9.2) to merge a bunch of multipolygons together. On their own, all the multipolygons are valid. After I iterate over them using ogr's Union function, I end up with ...
1
vote
1answer
225 views

Combining polygon geometries with python and QGIS segfaults

I am trying to combine polygons, using Qgis 1.8, and every time I run this script in the python console, I get a segmentation fault. Here is the script: from PyQt4.QtCore import * iface = ...
0
votes
1answer
123 views

QGIS Python - Convert geometry from Postgres to QgsPoint()

I have made a query in Postgres to get some points to use with python. This points are in geometry data. How can I convert that geometry in decimals to use QgsPoint() in python? Thank you
0
votes
2answers
232 views

Calculating area gets a different result

I've calculated the area of polygons with QGIS by using ctr-i - geometry - $area. I've set it on real. The results seem fine, but I've noticed they differ from the area given when I use the ...
0
votes
0answers
50 views

How to populate polygon extents to an attribute table in QGIS

Is there a way to calculate the XMIN, YMIN, XMAX and YMAX of a polygon and write it to a field in an attribute table? The Geometry functions available in the Field Calculator are for points. ...
3
votes
1answer
529 views

Join attributes by location

I am trying to join multiple records that occupy the same location (polygon centroid) and have tried using the join by location plug-in but have found this does not work for me in this case as I have ...
4
votes
1answer
720 views

postgis error: when adding features geometry has z dimension but column does not

I have to define a geometry column in PostGIS for 2D points, but when I try to import points from DXF to postgres I get the following message: "postgis error: when adding features geometry has z ...
2
votes
2answers
425 views

How to densify a polyline according to a specific length? [duplicate]

Possible Duplicate: Add vertices to lines I am using QGis 1.8.0 I would like to densify a polilyne according to a particular length of segment (ex. 200 m). I know it is possible with other ...
2
votes
3answers
2k views

Convert coordinates to geometry (polygon) using QGIS

I have an Excel sheet with grid data including geographical coordinates. I know that the coordinates represent areas, i.e., a multi(polygon). However, the data lacks geometry information. I'm looking ...
5
votes
1answer
753 views

fTools-Error: “…invalid geometry…”

I want to intersect contours with polygon like in the image below. But i got this error: Warnings: GEOS geoprocessing error: One or more input features have invalid geometry. Some output geometries ...
22
votes
3answers
5k views

Visualising WKT geometry string in QGIS

A very simple question: Is there a simple tool in QGIS to graphically visualise geometry formatted as text? Example geometry: "POLYGON((571178 6337246,571178 6402217,598061 6402217,598061 ...