Coder Social home page Coder Social logo

Comments (8)

rouault avatar rouault commented on August 24, 2024

When I compile and run the qgis project, I got this exception.

This exception might be emitted by PROJ with such an unsual semi-major axis, but it should be caught, at least in the C function that QGIS uses: which is it?
With only the content of this report, it is not clear if there's actually something to change in PROJ or in QGIS
Might be worth to open it rather as a QGIS issue with the description of the related QGIS scenario

from proj.

loftyscholar avatar loftyscholar commented on August 24, 2024

Thanks for your reply.
This unsual semi-major axis is located in ellipsoid table in proj.db, and its code is "107911" and its name is "Ananke_2000_IAU_IAG".

from proj.

rouault avatar rouault commented on August 24, 2024

@loftyscholar
ok, I see indeed that's an issue when trying to do something like projinfo -s "+proj=longlat +a=10000 +no_defs +type=crs" -t ESRI:104911 which should be a no-op operation, because there are several celestial bodies that match the 10000 radius. But couldn't you just avoid using a deprecated PROJ.4 string like "+proj=longlat +a=10000 +no_defs +type=crs" and use the ESRI:104911 code in QGIS. That should avoid the issue.

from proj.

rouault avatar rouault commented on August 24, 2024

or use the WKT2 representation:

GEOGCRS["GCS_Ananke_2000",
    DATUM["D_Ananke_2000",
        ELLIPSOID["Ananke_2000_IAU_IAG",10000,0,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Reference_Meridian",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    USAGE[
        SCOPE["Not known."],
        AREA["World."],
        BBOX[-90,-180,90,180]],
    ID["ESRI",104911]]

Alternatively you may define the PROJ_IGNORE_CELESTIAL_BODY=YES environment variable to avoid an error like

bin/projinfo -s  "+proj=longlat +R=10000 +no_defs +type=crs" -t ESRI:104911
createOperations() failed with: Source and target ellipsoid do not belong to the same celestial body (Non-Earth body vs Ananke). You may override this check by setting the PROJ_IGNORE_CELESTIAL_BODY environment variable to YES.

from proj.

loftyscholar avatar loftyscholar commented on August 24, 2024

deprecated
Ok, I'll have a try soon.

from proj.

rouault avatar rouault commented on August 24, 2024

Improvements in PROJ queued in #4149

With those, projinfo -s "+proj=longlat +R=10000 +no_defs +type=crs" -t ESRI:104911 now works out of the box

from proj.

loftyscholar avatar loftyscholar commented on August 24, 2024

Improvements in PROJ queued in #4149

With those, projinfo -s "+proj=longlat +R=10000 +no_defs +type=crs" -t ESRI:104911 now works out of the box

Thanks for your reply, have all the changes been commited to the proj source code? Where should I get the changes?

from proj.

rouault avatar rouault commented on August 24, 2024

have all the changes been commited to the proj source code?

This has just been committed in the master branch, and will be soon in the 9.4 branch as well. This will be in the 9.4.1 release

from proj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.