5

Using the spatial reference +proj=isea and comparing with others, in separate tables to avoid confusion in the QGIS renderization. But no visualization... is a QGIS bug? For example:

CREATE TABLE test1_b AS    -- Pure WGS84
  SELECT 1 AS gid,
         ST_SetSRID(ST_GeomFromGeoHash('d2g6b'), 4326) AS geom
;
CREATE TABLE test1_c AS    -- Same but Shere instead ellipsoid
  SELECT 1 AS gid,
       ST_Transform(
          ST_SetSRID(ST_GeomFromGeoHash('d2g6c'),4326),
          '+proj=lonlat +ellps=sphere'
       ) AS geom
;
CREATE TABLE test1_f AS   -- ISEA, that is also Shere
  SELECT 1 AS gid, 
        ST_Transform(
           ST_SetSRID(ST_GeomFromGeoHash('d2g6f'),4326),
           '+proj=isea'
        ) AS geom
;

QGIS v3 only shows test1_b and test1_c:

enter image description here


Notes

  • Geohashes d2g6b, d2g6c and d2g6f are horizontal neighbors. As showed before, the ISEA projection use ellps=sphere, and as showed by illustration (d2g6c box), QGIS can plot ellps=sphere... I supposed that QGIS can plot d2g6c also, using similar infrastructure.

  • Supposing that d2g6f is a small box contained into an ISEA's icosahedron face... So, no risc of "coordinate jump".

  • In the related questions, "How to use ISEA projection?" and "DGGS projections with PostGIS or pgLatLon", no clues about visualization.

  • Double transform also not works, is not valid to transform ISEA back to any simple SRID.

  • Dump to text seems good: select st_astext(geom) from test1_f results the WKT below

 POLYGON((
  -9457665.085273389 722136.153457215,
  -9460296.69550779  726590.233366592,
  -9456290.810885958 728872.6605645764,
  -9453658.792895738 724419.0107246666,
  -9457665.085273389 722136.153457215
))

(edit)

Seems that "no inverse no visualization"

As Even Rouault commented here,

the reason is much likely that only the forward method
(geographic coordinates → projected coordinates) is implemented,
whereas QGIS also requires the inverse method to be implemented.

2 Answers 2

1

Maybe it is only a missing parameter, needed to tell PostGIS that you want it to use use a sphererical projection.

In your SQL, please try using:

'+proj=isea +ellps=sphere'

instead of the mere

'+proj=isea'

that is:

CREATE TABLE test1_f AS   -- ISEA, that is also Shere
  SELECT 1 AS gid, 
        ST_Transform(
           ST_SetSRID(ST_GeomFromGeoHash('d2g6f'),4326),
           '+proj=isea +ellps=sphere'
        ) AS geom
;
4
  • Hi, it is not working for QGIS, no image... Can you post an evidence image? Commented Feb 11, 2022 at 11:52
  • Do you have the chance to share the input dataset? or at least of a dataset of the same type, which is not working as expected? Commented Feb 11, 2022 at 13:10
  • Hi @RafDouglas, can you see it on the screen? Can you see your test1_f table? If you see, use the "print screen" key of your computer to copy/paste your evidence image here at your answer. Seems that you not see (!), or not see in the correct place... Check my new note at the end of the question, "no inverse → no visualization". Commented Feb 13, 2022 at 17:18
  • 1
    This was a big, fixed. github.com/OSGeo/PROJ/issues/3047 Commented Aug 29 at 6:26
1

We can try again using fresh QGIS, with the new implementation of PROJ, version 9.5 or later. It say "Available forms: Forward and inverse, spherical".

The inverse was a years-old issue, finally implemented by Jerome St-Louis in this pull request of Aug 2024.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.