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

Kristian Evers kreve at sdfe.dk
Wed Dec 19 06:27:47 PST 2018


And as ever Even delivers in faster-than-the-speed-of-light mode: https://github.com/OSGeo/proj.4/pull/1203

This is a fairly invasive pull request so I would like to ask interested parties (i.e. PSC members) to take a look at it and voice their opinions on the matters raised in the comments.

/Kristian

Fra: PROJ <proj-bounces at lists.osgeo.org> På vegne af Kurt Schwehr
Sendt: 18. december 2018 21:12
Til: Even Rouault <even.rouault at spatialys.com>
Cc: proj at lists.osgeo.org
Emne: Re: [PROJ] What's the difference between PJ and PJ_OBJ?

I was going to suggest getting everything to build as C++ in the lib.  Thanks Kristian for beating me to the suggestion and to Even for all the hard work!!!

On Tue, Dec 18, 2018 at 10:57 AM Even Rouault <even.rouault at spatialys.com<mailto:even.rouault at spatialys.com>> wrote:
> 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
_______________________________________________
PROJ mailing list
PROJ at lists.osgeo.org<mailto:PROJ at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/proj


--
--
http://schwehr.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20181219/6cc82ab1/attachment.html>


More information about the PROJ mailing list