> Ideally, I think it would be nice to start with the Geometry2D package and
> extend it to 3D and 4D (does anyone need 1D points, or more than 4D?).
I think 1D should be included too: for instance, I may want to start a
project by solving an equation in 1D and then move on to higher
dimensions. Hmm, maybe this even applies to 0D.
> Second, regarding Points:
>
> 1) immutable or mutable types for points? Both?
> 2) for immutable, based on ImmutableArrays?
> 3) for mutable, parameterize based on size (and back by an array)?
>
> I'm inclined toward Points backed by ImmutableArrays, but are there valid
> uses for mutable points?
Is it possible to make the Points type such that an array of them is as
performant as an array of just their coordinates? I think that this
would be the case when using individual fields for each coordinate. But
is it also the case when using an ImmutableArray as storage, or does
that result in an array of pointers?
> =================
>
> Third, how should different coordinate systems be handled?
>
> 1) parameterize the point type by the coordinate system
> 2) handle different coordinate systems in separate packages, with common
> definitions in (a) base package(s)
>
> Coordinate systems to consider:
>
> * Cartesian
> * Spherical
> * Geographic
> * Homogeneous (* I need this *)
> * ...others?
Probably coordinate systems should be separate packages, as that is
quite a complicated issue. But it could/should still feature as a type
parameter.
Concerning geographic coordinates, here is a wrapper to GDAL:
https://github.com/wkearn/GDAL.jl
One part of GDAL does geographic coordinate transformations:
http://www.gdal.org/osr_tutorial.html
> =================
>
> Peder mentioned boost, which seems to have a well thought out system. It
> is however, slightly complicated. In Julia terms, boost geometry points
> are parameterized by 1) dimension, 2) type, and 3) coordinate system, with
> mechanisms expanding this to other geometric constructs.
>
> On one hand, this is nice and self contained. On another hand, if I'm
> working in a particular coordinate system, I may not always care about
> other coordinate systems, and so the extra parameterizations might be
> annoyances (or just plain scary), and I won't want to use the system.
>
> So another question is whether and/or how to cater to both the casual Point
> user in Cartesian space who doesn't want complicated types, and, well,
> someone who needs more complicated types.
Shouldn't it be possible to hide this complexity in case of Cartesian
coordinates with suitable typealiases and show functions?