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

Geometry viewer always transforms to Earth-specific projection #6190

Closed
rustprooflabs opened this issue Jun 30, 2019 · 4 comments

Comments

@rustprooflabs
Copy link

commented Jun 30, 2019

System information:

  • Operating system (distribution) and version: Windows 10 Pro 64-bit
  • DBeaver version: 6.1.1
  • Java version: 11.0.3
  • Additional extensions:

Connection specification:

  • Database name and version: PostgreSQL 11.4, PostGIS 2.5
  • Driver name
  • Do you use tunnels or proxies (SSH, SOCKS, etc)?

Describe the problem you're observing:

The amazing geometry viewer (original issue) appears to auto-transform all PostGIS data to 4326 without a way to disable the functionality. It was suggested (Twitter) to change the SRID to hide the map but that truly does only hide the map. It does not disable the transformation of the data before being visually represented. It seems that adding a check on the SRID to see if it is valid before making the change might solve this issue. Having an option to disable the overlay manually would also provide a real solution.

This issue makes the geometry viewer feature unusuable for use cases not bound to Earth. A few examples of non-Earth use cases of PostGIS:

Steps to reproduce:

In an empty database, create the PostGIS extension and a points table with 100 points from (1, 1) to (100, 100). While this intentionally exceeds the max North value on Earth (90 degrees), it
is valid data in non-Earth scenarios.

CREATE EXTENSION IF NOT EXISTS postgis;

DROP TABLE IF EXISTS points;
CREATE TABLE points AS 
SELECT ST_MakePoint(x, x) AS geom FROM generate_series(1, 100) x;

Verify the geometry data does not have an SRID set:

SELECT DISTINCT ST_SRID(geom) FROM points;

Name   |Value|
-------|-----|
st_srid|0    |

My expectation for a visualization of this data is a straight line as seen in this screenshot from QGIS:

image

Following the suggestion to change the SRID, I found that does hide the map under the data but the visualization is obviously still bound by Earth's projection. The curve of the northern ranges into the flat line is the indicator there.

image

I would expect data without a valid SRID to not be transformed to any projection. I like the auto-transfrom when you know the source but in an unknown that seems to be a risky guess.

@rustprooflabs

This comment has been minimized.

Copy link
Author

commented Jun 30, 2019

I see it is being set to the default value here.

    if (srid == 0) {
        srid = GisConstants.DEFAULT_SRID;
    }

Maybe a switch to disable that action?

@serge-rider serge-rider added this to the 6.1.2 milestone Jun 30, 2019

@serge-rider

This comment has been minimized.

Copy link
Member

commented Jun 30, 2019

Agreed. This looks more like a bug in one of latest versions.
We definitely have to have support for non-Earth based projections,

We could use:

  1. Leaflet L.CRS.Simple layer (flat surface projection)
  2. https://github.com/kartena/Proj4Leaflet (support of different CRSes on JS-side)

@serge-rider serge-rider added the ts: s label Jun 30, 2019

@tati-kru tati-kru added this to In Progress in DBeaver project Jul 3, 2019

@tati-kru tati-kru moved this from In Progress to Backlog in DBeaver project Jul 3, 2019

@serge-rider serge-rider modified the milestones: 6.1.2, 6.1.3 Jul 6, 2019

@serge-rider serge-rider moved this from Backlog to In Progress in DBeaver project Jul 17, 2019

@tati-kru tati-kru modified the milestones: 6.1.3, 6.1.4 Jul 22, 2019

serge-rider added a commit that referenced this issue Jul 26, 2019

@serge-rider

This comment has been minimized.

Copy link
Member

commented Jul 26, 2019

Fixed. For now we'll use Simple projection.
Any unrecognized or projection or 0 will be treated as Simple projection. It can be changed in GIS viewer manually.

@serge-rider serge-rider moved this from In Progress to Ready for QA in DBeaver project Jul 26, 2019

@uslss uslss self-assigned this Jul 28, 2019

@uslss

This comment has been minimized.

Copy link
Collaborator

commented Jul 28, 2019

verified.
Created issue #6362

@uslss uslss closed this Jul 28, 2019

DBeaver project automation moved this from Ready for QA to Done Jul 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.