Bug report #88
Unable to show labels on PostGIS layer.
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | Gavin Macaulay - | ||
Category: | Data Provider | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | Debian | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 10147 |
Description
I'm unable to show labels on a PostGIS layer.
Here's the sql script with sample data.
SET client_encoding = 'UTF8'; CREATE SCHEMA geospatial; DROP TABLE geospatial.bug; CREATE TABLE geospatial.bug ( gid serial NOT NULL, street character varying(69), fromleft integer, toleft integer, fromright integer, toright integer, predir character varying(2), pretype character varying(10), streetname character varying(45), suftype character varying(10), sufdir character varying(2), carto smallint, left_mun character varying(70), right_mun character varying(70), left_maf character varying(70), right_maf character varying(70), left_fsa character varying(3), right_fsa character varying(3), left_prv character varying(2), right_prv character varying(2), uniqueid integer, oneway smallint, rte_hirchy smallint, rsh_trffc smallint, median smallint, road_dir character varying(2), fromnode integer, tonode integer, spdlmt_km smallint, spd_mi smallint, rdlen_mi double precision, spd_km smallint, rdlen_m double precision, trvltim double precision, rdlen_mi_e double precision, rdlen_m_e double precision, trvltim_e double precision, the_geom public.geometry, PRIMARY KEY (gid), CONSTRAINT enforce_dims_the_geom CHECK ((public.ndims(the_geom) = 2)), CONSTRAINT enforce_geotype_the_geom CHECK (((public.geometrytype(the_geom) = 'MULTILINESTRING'::text) OR (the_geom IS NULL))), CONSTRAINT enforce_srid_the_geom CHECK ((public.srid(the_geom) = 2144)) ); INSERT INTO geospatial.bug VALUES (1, 'ROUTE 112', 2791, 2865, 2790, 2874, NULL, 'RTE', '112', NULL, NULL, 2, 'SHEFFORD', 'SHEFFORD', 'SHEFFORD', 'SHEFFORD', 'J2M', 'J2M', 'QC', 'QC', 3774135, 0, 6, 0, 0, 'FT', 998432, 976949, 0, 50, 1.1779999999999999, 80, 1895.04, 1.421, 1.1779999999999999, 1895.3389999999999, 1.4219999999999999, '0105000020600800000100000001020000000A00000073F40F55F67F02416E1FC19D67295341784C391636720241F778F0805D29534106A258BF3E700241796C0B235E2953417C86FE98B36D0241AA390E86612953416218679B0E680241EAEAC4936D295341AF490F3F6E640241ECF68AB472295341C273D3D1CB5F0241B07DACC776295341BAED6D17194B024141F9094B8C295341810D13361C48024121969EA18E295341CF8CFF12284502411C87B7B691295341');
Here's how I setuped the table:
SELECT [[AddGeometryColumn]]('geospatial','bug','the_geom',2144,'MULTILINESTRING',2);
History
#1 Updated by Gavin Macaulay - over 18 years ago
Qgis crashes for me when trying to display labels using the above table/data.
#2 Updated by Gavin Macaulay - over 18 years ago
- Resolution set to fixed
- Status changed from Open to Closed
Fixed in svn 72d25769 (SVN r5395).
The problem was that qgis wasn't doing labels for any of the multi geometries (e.g., multipoints, multilinestrings, and multipolygons).
Now, when doing labels for multi-geometries, qgis draws a label for each of the geometries in a multi-geometry.
#3 Updated by Anonymous over 15 years ago
Milestone Version 0.8 deleted