Boost logo

Geometry :

Subject: Re: [geometry] Support for geographic coordinate system
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-11-14 06:33:17


Hi,

Menelaos Karavelas wrote:
> On 14/11/2014 01:42 πμ, Adam Wulkiewicz wrote:
>> Barend Gehrels wrote:
>>> Adam Wulkiewicz wrote On 12-11-2014 1:48:
>>>> bg::reference::sphere<>
>>>> bg::reference::spheroid<>
>>>>
>>>> Or something like that, e.g. shorter.
>>>> And then the tags could be:
>>>>
>>>> reference_spheroid_tag
>>>> reference_sphere_tag : reference_spheroid_tag
>>>>
>>>> And in the future if we e.g. had model::sphere and Sphere concept,
>>>> sphere_tag could be derived from reference_sphere_tag and used as a
>>>> ReferenceSphere too.
>>>
>>> This looks all OK to me. Explicitly adding reference makes it quite
>>> clear - we reserve a model::sphere for later then too.
>>> So this is then the ReferenceSphere Concept.
>>>
>
> I have to admit I do not particularly like the name reference for the
> reference system, as it very much reminds me of references in C++. I
> would prefer something like
> bg::reference_system::sphere<>
> bg::reference_system::spheroid<> (I really do prefer this compared to
> ellipsoid)
> or
>
> bg::geography_model::sphere<>
> bg::geography_model::spheroid<>
>
> Similarly for the tags. Among the two options I mention above I prefer
> the second, but can happily live with the first.
>

Yes, indeed the word "reference" may be confusing, though I think that
we should just choose a name describing well the content. But ok, maybe
we could pick something different. Note that the reference_system also
has the word "reference" in it.

I'd rather avoid the word geography. I know that the main purpose is to
use it on in a GIS field but it should be general-purpose name. What do
you think about:

bg::reference_model::spheroid<>
bg::ref_model::spheroid<>
bg::rmodel::spheroid<>

They also have "reference" in a name and the last "r" might be confused
with "reverse".

Since we already have bg::cs namespace, somehow related to the reference
system. We could reuse this scheme:

boost::geometry::rs::spheroid<>

but should spheroid and sphere be included in reference systems
(namespace)? They're rather models describing the ref systems. Though
it's possible that we'd need a place for more code related to reference
systems, EPSGs, SRIDs, etc. so this code could be put there. But then
I'd put the models in:

boost::geometry::rs::model::sphere<>
boost::geometry::rs::model::spheroid<>

Or just reuse the namespace cs for this:

boost::geometry::cs::model::sphere<>
boost::geometry::cs::model::spheroid<>

which would be probably the most general choice. The question is: could
additional things be put in the bg::cs namespace?

Regards,
Adam


Geometry list run by mateusz at loskot.net