[PROJ] using pipeline without proj.db
Even Rouault
even.rouault at spatialys.com
Mon Nov 24 08:29:14 PST 2025
Javier,
I've fixed that in https://github.com/OSGeo/PROJ/pull/4617 . I was a bit
nervous about that change since it is in the tricky area where we bind
together the C++ ISO-19111 world and the good-old-C PROJ code, but to my
surprise, it didn't break any existing test. The dbcontext here could be
used to substitute EPSG official grid names by PROJ ones, but from what
I can see, that substitution has already been done before in code
triggered by proj_create_crs_to_crs() that obviously needed the
database. So the use cases where we would need to do that again rom
pj_obj_create() are hopefully null...
Even
Le 24/11/2025 à 16:14, Javier Jimenez Shaw via PROJ a écrit :
> Hi
>
> I am trying to use PROJ in a minimalistic deploy... without proj.db
> I only need to do transformations based on a proj-pipeline.
>
> Just something like "+proj=pipeline +step +proj=axisswap +order=2,1
> +step +proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=utm
> +zone=32 +ellps=WGS84"
>
> I am calling "proj_create(ctx, str)", and I get an error message
> "Cannot find proj.db"
>
> First question: Do I need proj.db for that purpose? I would say that
> not. The transformation is already defined in the pipeline, I don't
> need anything from EPSG. But now I'm not sure.
>
> Second question: if it is not needed, is that a bug or am I doing
> something wrong?
>
>
> Looking at the code of proj_create, I see at the begining:
>
> // Only connect to proj.db if needed
> if (strstr(text, "proj=") == nullptr || strstr(text, "init=") !=
> nullptr) {
> getDBcontextNoException(ctx, __FUNCTION__);
> }
>
> That I assume is not executing getDBcontextNoException. The comment
> seems promising for my purpose, but it is failing somewhere. There is
> a similar check in the C++ code.
>
> Thanks.
> Javier.
>
> _______________________________________________
> PROJ mailing list
> PROJ at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/proj
--
http://www.spatialys.com
My software is free, but my time generally not.
More information about the PROJ
mailing list