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

Field Calc: ST_MakeEnvelope in the Geometry Group #51106

Open
pigreco opened this issue Dec 4, 2022 · 2 comments
Open

Field Calc: ST_MakeEnvelope in the Geometry Group #51106

pigreco opened this issue Dec 4, 2022 · 2 comments
Labels
Expressions Related to the QGIS expression engine or specific expression functions Feature Request

Comments

@pigreco
Copy link
Contributor

pigreco commented Dec 4, 2022

Feature description

it would be useful to have in QGIS core the same function as PostGIS (ST_MakeEnvelope), in order to quickly create a bounding box using the coordinates copied from the status bar, in particular in the extension function:

image

make_envelope(756594,4068816,777241,4081345, replace(@project_crs ,'EPSG:',''))

a thousand thanks

Additional context

Currently to create a bbox I use the following expression:

 bounds(
 make_line(  
 make_point (756594, 4068816),
 make_point (777241, 4081345))
 )

the new function would avoid calling other functions like make_point and make_line
@pigreco pigreco added Feature Request Expressions Related to the QGIS expression engine or specific expression functions labels Dec 4, 2022
@roya0045
Copy link
Contributor

roya0045 commented Dec 4, 2022

make_square is close enough, imo.

@pigreco
Copy link
Contributor Author

pigreco commented Dec 4, 2022

make_square is close enough, imo.

The make_square always draws a square and so here's what happens:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expressions Related to the QGIS expression engine or specific expression functions Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants