Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels: Data defined position from geometry column #11840

Closed
qgib opened this issue Jul 14, 2009 · 7 comments
Closed

Labels: Data defined position from geometry column #11840

qgib opened this issue Jul 14, 2009 · 7 comments
Labels
Feature Request Map and Legend Related to map or legend rendering

Comments

@qgib
Copy link
Contributor

qgib commented Jul 14, 2009

Author Name: Mike Taves (Mike Taves)
Original Redmine Issue: 1780

Redmine category:map_canvas
Assignee: nobody -


I would like to use a geometry (POINT) attribute to position label, using the example postgres schema:

CREATE TABLE region
(
  gid serial NOT NULL,
  geometry geometry, -- SELECT [[AddGeometryColumn]]('public','region','geometry',26910,'POLYGON',2);
  label geometry, -- SELECT [[AddGeometryColumn]]('public','region','label',26910,'POINT',2);
  ...
);

Here, there are two geometry columns: a polygon for the shape in the map, and a point to specify and store the label location.

The present versions (1.0.1 to 1.2.0 unstable) support X/Y coordinates from two numeric columns. (This is found in Layer Properties > Labels > Data defined position).

The enchantment requested in this ticket is to add another pull-down for a data defined position, which would be a geometry column. This seems more natural than defining two numeric columns for X and Y coordinates.

I suggest first keeping it simple, supporting only POINT geometries. However, I can also envision enabling MULTIPOINT (for multiple places of the same label), and perhapps [MULTI]LINESTRING for text along a path (creeks, rivers) if the text fits the length. Furthermore, the centroid can easily be extracted from all other geometry types ([MULTI]POLYGONs, COLLECTIONs, etc.) to represent the coordinate for the label (i.e., this is the "else"/"default" case for other geometry types).

@qgib
Copy link
Contributor Author

qgib commented Dec 16, 2011

Author Name: Giovanni Manghi (@gioman)


  • fixed_version_id was changed from Version 1.7.0 to Version 1.7.4

@qgib
Copy link
Contributor Author

qgib commented Apr 15, 2012

Author Name: Giovanni Manghi (@gioman)


  • fixed_version_id was changed from Version 1.7.4 to Version 2.0.0

@qgib
Copy link
Contributor Author

qgib commented Oct 6, 2012

Author Name: Pirmin Kalberer (Pirmin Kalberer)


  • fixed_version_id was changed from Version 2.0.0 to Future Release - Nice to have

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0
  • pull_request_patch_supplied was configured as 0

@qgib
Copy link
Contributor Author

qgib commented May 1, 2017

Author Name: Regis Haubourg (@haubourg)


A QEP is opened for a related requirement here [[https://github.com/qgis/QGIS-Enhancement-Proposals/issues/46]]

QGIS 3 API is currently gaining the ability to handle multiple geometries, so we can consider we are getting closer


  • description was changed from I would like to use a geometry (POINT) attribute to position label, using the example postgres schema:
CREATE TABLE region
(
  gid serial NOT NULL,
  geometry geometry, -- SELECT [[AddGeometryColumn]]('public','region','geometry',26910,'POLYGON',2);
  label geometry, -- SELECT [[AddGeometryColumn]]('public','region','label',26910,'POINT',2);
  ...
);

Here, there are two geometry columns: a polygon for the shape in the map, and a point to specify and store the label location.

The present versions (1.0.1 to 1.2.0 unstable) support X/Y coordinates from two numeric columns. (This is found in Layer Properties > Labels > Data defined position).

The enchantment requested in this ticket is to add another pull-down for a data defined position, which would be a geometry column. This seems more natural than defining two numeric columns for X and Y coordinates.

I suggest first keeping it simple, supporting only POINT geometries. However, I can also envision enabling MULTIPOINT (for multiple places of the same label), and perhapps [MULTI]LINESTRING for text along a path (creeks, rivers) if the text fits the length. Furthermore, the centroid can easily be extracted from all other geometry types ([MULTI]POLYGONs, COLLECTIONs, etc.) to represent the coordinate for the label (i.e., this is the "else"/"default" case for other geometry types). to I would like to use a geometry (POINT) attribute to position label, using the example postgres schema:

CREATE TABLE region
(
  gid serial NOT NULL,
  geometry geometry, -- SELECT [[AddGeometryColumn]]('public','region','geometry',26910,'POLYGON',2);
  label geometry, -- SELECT [[AddGeometryColumn]]('public','region','label',26910,'POINT',2);
  ...
);

Here, there are two geometry columns: a polygon for the shape in the map, and a point to specify and store the label location.

The present versions (1.0.1 to 1.2.0 unstable) support X/Y coordinates from two numeric columns. (This is found in Layer Properties > Labels > Data defined position).

The enchantment requested in this ticket is to add another pull-down for a data defined position, which would be a geometry column. This seems more natural than defining two numeric columns for X and Y coordinates.

I suggest first keeping it simple, supporting only POINT geometries. However, I can also envision enabling MULTIPOINT (for multiple places of the same label), and perhapps [MULTI]LINESTRING for text along a path (creeks, rivers) if the text fits the length. Furthermore, the centroid can easily be extracted from all other geometry types ([MULTI]POLYGONs, COLLECTIONs, etc.) to represent the coordinate for the label (i.e., this is the "else"/"default" case for other geometry types).

  • priority_id was changed from Low to Normal
  • status_id was changed from Open to In Progress

@qgib
Copy link
Contributor Author

qgib commented Feb 24, 2018

Author Name: Alessandro Sarretta (@alesarrett)


It seems to me that the way the new QGIS 3.0 handles labels already covers this issue.

@qgib
Copy link
Contributor Author

qgib commented Feb 25, 2018

Author Name: Regis Haubourg (@haubourg)


Alessandro Sarretta wrote:

It seems to me that the way the new QGIS 3.0 handles labels already covers this issue.

I think we can close that yes. QGIS 3 still uses XY data defined columns however, but it is almost transparent to users with the auxiliary data storage.

Anyway we still have opened QEP in that area to be able to use a "path" for custom labeling. That would mean being able to move a label and have a custom geometry to be able to draw curved labels anywhere for instance


  • resolution was changed from to fixed/implemented
  • status_id was changed from In Progress to Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Map and Legend Related to map or legend rendering
Projects
None yet
Development

No branches or pull requests

1 participant