Skip to content

Conversation

@rouault
Copy link
Member

@rouault rouault commented Nov 11, 2024

Fixes #4319

With that improvement, the runtime of the following snippet goes from
25.4 second to 0.9 second:

    for(int i = 0; i < 2000; ++i)
    {
        PJ_CONTEXT *C = proj_context_create();
        PJ *P = proj_create_crs_to_crs(C,
           "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs",
           "+proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs", NULL);
        proj_destroy(P);
        proj_context_destroy(C);
    }

@rouault rouault added this to the 9.6.0 milestone Nov 11, 2024
…ically PROJ strings) using unknown datums

Fixes OSGeo#4319

With that improvement, the runtime of the following snippet goes from
25.4 second to 0.9 second:
```c
    for(int i = 0; i < 2000; ++i)
    {
        PJ_CONTEXT *C = proj_context_create();
        PJ *P = proj_create_crs_to_crs(C,
           "+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs",
           "+proj=utm +zone=31 +ellps=GRS80 +units=m +no_defs", NULL);
        proj_destroy(P);
        proj_context_destroy(C);
    }
```
@rouault rouault merged commit 863a75e into OSGeo:master Nov 14, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

funded through GSP Work funded through the GDAL Sponsorship Program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix slowness on proj_create_crs_to_crs() on WGS 84 <--> UTM conversions

2 participants