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

EQC projection doc #412

Closed
wants to merge 3 commits into from
Closed

Conversation

julien2512
Copy link
Contributor

Here is my second test, I think it will be accepted.
The references I used for are :
https://github.com/OSGeo/proj.4/blob/master/docs/old/libproj.pdf
ftp://ftp.ams.org/pub/tex/doc/amsmath/amsldoc.pdf
make html ;)

Tell me if it's ok, then I will make more.

I have a first question : in proj4 source code, there an optionnal \phi_0 that do not appear in the old documentation formula, but only in the parameters.
May I fix it in the new docs ?

It leads me to a second question about the png generated in that page.
There is "+eqc", but it does not show the parameters [+lat 0= | +lat ts=] as in the old documentation.
How can I improve it ?

@rouault
Copy link
Member

rouault commented Sep 7, 2016

Yes I think it makes sense to update the formulas to take into account phi_0.

(note: A bit out of scope of this PR, but would probably be good to have some generic intro page for all projections to present the naming conventions of all those common variables. I had no idea what k and h meant until I found paragraph "3.8.1 Scale factors")


.. math::

x = \lambda cos \phi_{ts}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe \cos should be possible here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not specific to @julien2512's contribution (it is greatly appreciated!), but this highlights the tricky part about this endeavor -- it is really easy to miss math symbols when porting things over.

@hobu
Copy link
Contributor

hobu commented Sep 8, 2016

@kbevers's plotting script is now merged into ./docs/plot/plot.py but it will need to be updated to a little bit to make it convenient to replace a single image.

@kbevers
Copy link
Member

kbevers commented Sep 8, 2016

but it will need to be updated to a little bit to make it convenient to replace a single image.

Yeah, I have a few ideas on how to do that. I will get to it soon(ish). Among other things I want to be able to define an area of interest. For most projections it is fine to just plot the whole world, but in some cases projections are only valid for a certain area. Eventually we will probably also want to have more than one image in the docs for a particular projection. I'll make some sort json-setup file where you can set the proj-string, area, filename, etc. The plotting script can then parse that and make better figures for the doc-pages.

@julien2512
Copy link
Contributor Author

@rouault @QuLogic done. Thank you for the feedback ! I will start other projections soon.

@kbevers Is there a way to get your settings from the rst file in a comment or something rather than an other json-setup file ? It can be more convenient !

@kbevers
Copy link
Member

kbevers commented Sep 8, 2016

I don't know. There might be some magic in sphinx that can do that. For now I would rather keep it simple and just have it in one file. Don't want to over-engineer this from the start :)

@julien2512
Copy link
Contributor Author

julien2512 commented Sep 8, 2016

Yes you are right, it is better to make it works !
I had a look in sphinx doc, but can't really stand how to do it... I though you were an expert ! ;)

@julien2512
Copy link
Contributor Author

Dear all,

I tryed myself on tmerc projection (see the pull request).

It's harder than eqc and I ve got many asks :

  • the formula on https://github.com/OSGeo/proj.4/blob/master/docs/old/libproj.pdf do not exactly match the proj4 formula. I meant PI - 2 arctan became PI/2 - 2 arctan in proj4 sources
  • there is two totally different mercator projection (spherical and elliptical) but defined in the same class. It ends with a hard page full of maths.
  • the elliptical formula uses math functions like the isometric latitude kernel function which might be use in other projections.
  • I can't understand the first sentence : "Scaling may be specified by either the latitude of true scale (φ ts ) or setting k 0 with +k= or +k 0=.". May it be "... or setting k_0" ?

@julien2512
Copy link
Contributor Author

julien2512 commented Sep 12, 2016

@hobu You seems to have make tmerc already !
So I will try to match your template for the eqc projection ... and start an other pull request again.

@julien2512 julien2512 closed this Sep 12, 2016
@hobu hobu reopened this Sep 13, 2016
@hobu
Copy link
Contributor

hobu commented Sep 13, 2016

Please let developers close pull requests so we know if stuff has been merged or not.

the formula on https://github.com/OSGeo/proj.4/blob/master/docs/old/libproj.pdf do not exactly match the proj4 formula. I meant PI - 2 arctan became PI/2 - 2 arctan in proj4 sources

That's curious and should be investigated further.

@hobu hobu closed this Sep 13, 2016
@hobu hobu reopened this Sep 13, 2016
@kbevers
Copy link
Member

kbevers commented Sep 13, 2016

I noticed that as well when I wrote the Mercator documentation. The libproj text is wrong. Snyder's book is in agreement with the implementation in proj4. I am sure you can find other sources as well. The docs on proj4.org uses formula from Snyder.

@kbevers
Copy link
Member

kbevers commented Sep 13, 2016

http://mathworld.wolfram.com/MercatorProjection.html uses the same formula as Snyder (more or less...). Just for fun, I also derived the formula on paper and I get the same result. I am now 100% certain that the spherical inverse mercator function is correct. And the docs reflect what's in the code.

@julien2512
Copy link
Contributor Author

Thank you.
I won't close pull requests any more !
Eventhough, I need this one to be close in order to push eqc matching
the projection doc template.

On an other side, I understand the new doc will respect the proj4
implémentation, but we may loose information from the old docs. If so, I
can put it on wikipedia as I do with eqc. As an example, I have set extra
link on their page to the new doc for eqc. Is there any rule between
wikipedia and OSGeo ? (I see a page on osgeo.fr named "wikipedia links").

Le 13 sept. 2016 4:57 PM, "Kristian Evers" notifications@github.com a
écrit :

http://mathworld.wolfram.com/MercatorProjection.html uses the same formula
as Snyder (more or less...). Just for fun, I also derived the formula on
paper and I get the same result. I am now 100% certain that the spherical
inverse mercator function is correct. And the docs reflect what's in the
code.


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
#412 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAzLSV61B_Mp-WoSSXdtb7VYsfamu-ZDks5qprnOgaJpZM4J3YKa
.

@kbevers
Copy link
Member

kbevers commented Sep 13, 2016

Eventhough, I need this one to be close in order to push eqc matching
the projection doc template.

Just create a new branch, make your changes and put up another PR on the new branch.

@julien2512
Copy link
Contributor Author

julien2512 commented Sep 13, 2016

@kbevers Thank you, i will do it the day after tomorrow (edit ;) ).

@julien2512 julien2512 closed this Sep 15, 2016
@julien2512 julien2512 deleted the docs-projection branch September 15, 2016 21:56
@julien2512
Copy link
Contributor Author

@hobu I do not close it on purpose this time /) It was automatic after the branch deletion on my repo.

The new pull request is done :) !

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.

None yet

5 participants