[PROJ] What's the difference between PJ and PJ_OBJ?

Even Rouault even.rouault at spatialys.com
Tue Dec 18 10:35:24 PST 2018


> Since we require compilation with a C++ compiler now it is too far-fetched
> an idea to compile everything as C++. It would be interesting to see if
> this is possible without too much extra work.
> 

I'm taking a crack at that right now. Seems doable.
What C++ doesn't like at all is the implict cast from void* to 
something_else*, that need to be explicited in C++ as static_cast<>()

Beyond those errors, a lot warnings which seem to be exclusively instances of
-Wzero-as-null-pointer-constant. clang-tidy should be able to convert those.

> I guess that modification of proj_create-functions wouldn't take too much
> work
 since most is already done in the C++ parts of the code. We still
> have to keep pj_init() and friends alive for a little while longer. Will
> that pose a problem or can all the work be delegate to
> PROJStringParser::createFromPROJString() ? 
> In case of the technical objects, could that be handled by using the
> recently proposed "noop" operation?

I think that an "invalid" operation would be a better fit for those. We don't 
want such objects to be confused with valid coordinate transformation
"noop" is a valid operation when there is nothing to do except passthrough 
coordinates. If the PJ object you got is let's say a prime meridian, it is 
better if proj_trans() returns an error rather than the input values.
(but that's just a detail)

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the PROJ mailing list