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

[DBManager] allow to add generic geom #61

Merged
merged 352 commits into from
Oct 13, 2024

Conversation

olivierdalang
Copy link

Hi !

Here's my initial work on this fix.

a

I used a similar approach that what's used in the browser and the add layer dialog : additionnly to the actual table, "fake" tables are shown for each wkbtype. This works well and doesn't require too many changes, as we can just add the WkbType in the item's mime data, and everything works (drag&drop, add layer context menu...).

It's not really ideal in terms of UX, as it's a bit confusing to see what is actually one table displayed several times. But I thought this is acceptable since it's already like this in the browser and in the add layer dialog.

Currently, the three POINT, LINESTRING and POLYGON types "fake" layers are added for each generic geometry layer, even if these geometries are absent from the table. In the browser and add dialog, it only shows the types that actually exist in the table. One one side, it's nicer, but also makes it less practical if you work with a table that's currently empty (and will be populated later on).

Ideally, I'd like to reuse the logic from QgsPostgresConn::getTableInfo, but that may be difficult to do in the DBManager as it seems it doesn't use qgis database providers at all, esp. if we want to support other provider as well.

What do you think, does the approach make sense ?
Is the UX ok for you, or did you have a better idea ?

nyalldawson and others added 30 commits May 20, 2019 16:39
…ayer

vector file, but then chooses not to actually add any layers from the file
[server] Support FILTER values with colons
Fixes qgis#20848

Test added for internal functions because the main functionality
is in app.

Partially reverts 006b130
See: qgis@006b130
Instead of only showing the raw values, show also the represented values in the expression builder in the list values preview.
This helps people to choose from readable values (whereas still the raw values get inserted on double click).
on pre proj6 builds, so keep compatibility with that under proj6
[RPM] Fix a dependency on older Fedora releases
Fixes qgis#22071 - Relation reference widget wrong feature when "on map identification"
if crs cannot be represented as auth/id combo
nyalldawson and others added 29 commits June 3, 2019 16:46
for transforms, even if grids are not available.

And then use custom handlers or message log to warn users that
better operations are possible, just not available on their system.

Also use similar approach to raise errors when either no operation
is possible between two coordinate systems, or only ONE is yet
it is not available on the current system (e.g. due to missing
grid file)

Sponsored by ICSM
- A coordinate transform cannot be created, e.g. due to not making
sense (transforming earth coords to mars coords)
- A coordinate transform cannot be created due to a missing grid
file (along with links to download the grid if available)
- A coordinate transform was created, BUT a better one is possible,
it just is missing some prerequisite on the user's system (again,
with links to download if available)

Sponsored by ICSM
base them on normalized operations

QGIS doesn't need (or want) to care about strictly following
projection definitions here, we ALWAYS want X/Y to be X/Y
Require at least 6.1.0. We need proj_normalize_for_visualization,
and the workarounds for building without it are too extensive,
too fragile, and result in too much spaghetti code.

Gotta make the hard call here ;)
preset non-default coordinate operations set between a crs pair,
which use grids that are not available on the local system
[processing] fix NDVI calculation formula in builtin raster calculator
It's rather jarring that the move label and rotate label tools
don't follow the rest of the application in using click-click
to move and rotate and rotate labels, and instead use the older
click-and-drag behaviour. This commit reworks the tools to use
click to start, click to end behaviour instead.

It also makes them respect the same conventions as the move
and rotate features tools, where a right click cancels the
move/rotate, and same with pressing "esc" mid-operation.
…resented_values

[Expression builder] show represented values in preview
UI is similar to the browser, where generic geometry tables
are display several times, one for each type.
@m-kuhn m-kuhn merged commit 83c8b5b into m-kuhn:master Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.