Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version2 #3

Closed
wants to merge 16 commits into from
Closed

Version2 #3

wants to merge 16 commits into from

Conversation

andyferris
Copy link

Updated interface for Geodesy.jl. Includes new CRS and Position types, which include possibly data-rich datums to assist in transformation via geotransform().

Andy Ferris and others added 12 commits April 11, 2016 12:05
Bounds functionality seems to be generic computational geometry stuff,
not related to geodesy per se.
* Move ellipsoid stuff into new file datums.jl
* Removed XYZ type and all get* methods, since these will be replaced
  with something easier to use (hopefully!)
Progagated changes to datums through conversion. Removed default datum
choice WGS84. Note: now use lower-case wgs84, etc
Also modified macros to work in this case.
A new interface for storing and transforming points with potentially
complicated datums. CRS store the datum and co-ordinate type. Position
includes this plus the values of the coordinates. geotransform() takes a
Position and returns a new Position in the given CRS.
@andyferris
Copy link
Author

@c42f @PaulBellette @awbsmith

Andy Ferris added 2 commits April 14, 2016 08:03
Errors for Bounds and its functions, and warnings for default datum
choices (only on previously defined conversions).
@awbsmith
Copy link
Collaborator

Hey guys, I found some time to have a look at this. I really like having a CRS type, but I think the Position type should use a CRS as the template parameter. I'm worried we've shifted the CRS vs a point defined by a CRS notation problem, to a CS vs a point in a CS notation problem. I see this manifesting when we want to use an identifier for a CRS (an SRID) rather than the CRS itself. We don't want to have to know the CS and datum for it, just let libproj worry about what "stuff" the SRID actually describes behind the scenes.

Maybe a better way to express the above is looking at the data structure picture, I don't think a point should be a subtype of a coordinate system, it should be something separate.

My Julia fu is a little light understanding the CRS type; can you use a value type as the datum parameter? e.g. an ellipse instead of a tag for an ellipse? I'm not sure what that means for instantiating the datum field.

I'm also hoping that at some point an
immutable Position{CRS} ....
could be extended to:
immutable Position{CRS, T <: Real} ....
without things getting too ugly

Lastly, can we do Lon Lat order?

@andyferris
Copy link
Author

Thanks Andrew.

Regarding the (second) last point, as it is currently structured, I would have LLA{T <: Real}, etc, and that would flow through automatically to Position{LLA, Datum}, etc. In principle its a great idea, and in practice it makes things a little more wordy (think Complex{Float64} ::shudder:: ).

I am thinking hard about what you say about coordinate systems vs coordinates vs SRID, etc, and hoping something sensible can be resolved.

As a workaround, it should be easy enough to define functions that go from SRIDs to their datum and coordinate system types. That should facilitate loading from files. The datum could just be something Proj4 can interpret - even a Julia singleton. But the coordinate system has to at least know the number and types of coordinates, similarly as we need to know what to load from the file (is it a 3D position? A 2D map projection? Maybe one could imagine bundling UTM coordinates and their zone as an Int, or include a time coordinate? etc...)

Lon-Lat or Lat-Lon? I dunno... I can see pluses and minuses. Perhaps two types, LatLon and LonLat, but what is LLA?

Andy

@c42f
Copy link

c42f commented Apr 15, 2016

Let's move this discussion to JuliaGeo, it'll be lost otherwise.

I hope I'll have time to make more in depth comments over there. My main concerns at the moment are

  • Abuse of the term Datum (it's much more like a CRS)
  • Strange inversion of high and low level APIs - I feel like dealing with the everything-is-data Position types is a low level concern; at a high level it'd be nice to talk in terms of ENU, ECEF, and LLA with the details of the CRS in the background rather than front and centre.

@andyferris andyferris closed this May 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants