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 documentation matching template (version 3) #415

Merged
merged 3 commits into from Sep 28, 2016

Conversation

julien2512
Copy link
Contributor

@julien2512 julien2512 commented Sep 15, 2016

Here is the third version, matching the template proposal.

As I got a better understanding of proj4 implementation, I think there might be a mistake in eqc implementation.

In the description of wikipedia, nor wolfram, there is only one parameter \phi_ts. Evenden do not use any.
But in proj4, we got two : \phi_ts and \phi_0.

That's why I tryed to document it on this pull request.
Although, I can't find how this value is valuated in proj4, and I find no documentation (wikipedia, evenden, wolfram, epsg) talking about a parameter phi_0 different than phi_ts.

May be phi_0 value is simply always 0 in proj4, and just leave in the code as a reminder ?

Copy link
Contributor

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

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

Mostly minor tweaks to stuff.

@@ -4,7 +4,95 @@
Equidistant Cylindrical (Plate Caree)
********************************************************************************

The simplist of all projections. Standard parallels (0° when omitted) may be specified that determine latitude of true scale (k=h=1).
Copy link
Contributor

Choose a reason for hiding this comment

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

simplest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

+---------------------+----------------------------------------------------------+
| `+lat_0` | Center of the map |
+---------------------+----------------------------------------------------------+

.. image:: ./images/eqc.png
:scale: 50%
:alt: Equidistant Cylindrical (Plate Caree)
Copy link
Contributor

@QuLogic QuLogic Sep 15, 2016

Choose a reason for hiding this comment

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

Carree, or even more correct, Carrée, especially because that's used later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Even better !
done.

+---------------------------------------------------------+--------------------------+
| Projection Name | (lat ts=) :math:`\phi_0` |
+---------------------------------------------------------+--------------------------+
| Plain/Plane Chart | 0◦ |
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the "White Bullet" symbol, not the degree sign, cf. ◦ vs. °.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was from the old doc !
done.

+---------------------------------------------------------+--------------------------+
| Plate Carrée | 0◦ |
+---------------------------------------------------------+--------------------------+
| Ronald Miller—minimum overall scale distortion | 37°30' |
Copy link
Contributor

@QuLogic QuLogic Sep 15, 2016

Choose a reason for hiding this comment

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

The "apostrophe" should be a "prime", cf. ' vs. ′ (though I can't really see a difference with my default font here, so it's rather minor, and probably not a big deal.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Really ? I hope parsers will recognise both.
done.

@@ -4,7 +4,95 @@
Equidistant Cylindrical (Plate Caree)
Copy link
Contributor

Choose a reason for hiding this comment

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

Carree or Carrée

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a point here. The plate carrée is just one case of equidistant cylindrical, isn't it ? So why using it on the title ...

done.

Copy link
Member

@kbevers kbevers left a comment

Choose a reason for hiding this comment

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

Good work @julien2512. Thanks for doing this.

I've pointed out a few things I'd like to see adressed before I merge this. On top of this I think that @QuLogic has some valid points as well.

Regarding the phi_0 variable. It is the latitude of origin and can be set with +lat_0.

+---------------------+----------------------------------------------------------+
| **Defined area** | Global, but best used near the equator |
+---------------------+----------------------------------------------------------+
| **Implemented by** | Marinus of Tyre |
Copy link
Member

Choose a reason for hiding this comment

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

This was meant to be a credit to the author of the code implementation. I believe this one was written by Gerald I. Evenden.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

Example using latitude of true scale::

$ echo 2 1 | proj +proj=eqc +a=6400000 +lat_1=0.5 +lat_2=2
223402.14 111701.07
Copy link
Member

Choose a reason for hiding this comment

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

Could you come up with a better example? This is the auto-generated test-case from the code. +lat_1 and +lat_2 has no effect on this particular projection. How about an example or two that uses the parameters mentioned in the table above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright.

#######################

The formulas describing the Equidistant Cylindrical projection are all taken from proj4 sources.

Copy link
Member

Choose a reason for hiding this comment

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

This section would be more clear if some of the variables are defined here. Like phi_ts is the latitude of true scale and can be set with +lat_ts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tryed something with the parameters.
You may have a look on it ?
I feel it is important to evaluate the quality before stepping to an other projection doc.

@julien2512
Copy link
Contributor Author

@kbevers

Regarding the phi_0 variable. It is the latitude of origin and can be set with +lat_0.

Can you help me to know where the lat_0 is taking a value in proj4 ? It can make me ask many less questions !

@kbevers
Copy link
Member

kbevers commented Sep 16, 2016

Can you help me to know where the lat_0 is taking a value in proj4 ? It can make me ask many less questions !

Sure. It's done when calling pj_init. So when you initialize a projection.

@julien2512
Copy link
Contributor Author

Thank you, I found :
PIN->phi0 = pj_param(ctx, start, "rlat_0").f;

@julien2512
Copy link
Contributor Author

@QuLogic thank you for your help.

:math:`lat_ts` is the latitude of true scale, that mean the standard parallels where the scale of the projection is true.
:math:`lat_0` is the latitude of origin that match the center of the map.

:math:`phi_{ts}` is the latitude of true scale, that mean the standard parallels where the scale of the projection is true. It can be set with "lat_ts".
Copy link
Member

@kbevers kbevers Sep 16, 2016

Choose a reason for hiding this comment

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

I think there's a backslash missing here. Same for the line below.

@julien2512
Copy link
Contributor Author

julien2512 commented Sep 17, 2016

This is working for me without backslashes. Is there a better way to format
these lines ?

Le 16 sept. 2016 23:27, "Kristian Evers" notifications@github.com a
écrit :

@kbevers commented on this pull request.

In docs/source/projections/eqc.rst
#415 (review):

@@ -71,8 +71,10 @@ Mathematical definition
#######################

The formulas describing the Equidistant Cylindrical projection are all taken from proj4 sources.
-:math:lat_ts is the latitude of true scale, that mean the standard parallels where the scale of the projection is true.
-:math:lat_0 is the latitude of origin that match the center of the map.
+
+:math:phi_{ts} is the latitude of true scale, that mean the standard parallels where the scale of the projection is true. It can be set with "lat_ts".

I think there's backslash missing here. Same for the line below.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#415 (review), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAzLSQ-ruW5kSydrgrG3SYCDFZUQ7dTJks5qqwmugaJpZM4J-bev
.

@kbevers
Copy link
Member

kbevers commented Sep 18, 2016

Really? Do you build the docs with sphinx?

@julien2512
Copy link
Contributor Author

Of course !
Eventhough, I am open to your proposal.

@kbevers
Copy link
Member

kbevers commented Sep 22, 2016

Great. I'll merge your PR once you change it.

@kbevers kbevers merged commit 0e01585 into OSGeo:master Sep 28, 2016
@kbevers
Copy link
Member

kbevers commented Sep 28, 2016

Thanks for writing this, Julien. It is very much appreciated!

@julien2512
Copy link
Contributor Author

Let's start other ones !

@julien2512
Copy link
Contributor Author

It will be Cassini.

@Andre-J
Copy link

Andre-J commented Apr 8, 2018

There is a bug in the example:
Example using Plate Carrée projection with true scale at latitude 30° and central meridian 90°W:
$ echo -88 30 | proj +proj=eqc +lat_ts=30 +lat_0=90w

Central meridian should be lon_0, which is not included in the formulas, but changing values for lon_0 different from zero resolves to different results. Seems that Proj can do more than Snyder wrote in his formulas. Maybe this should be pointed out on the manpage.

@kbevers
Copy link
Member

kbevers commented Apr 9, 2018

Good catch. Indeed it should be +lon_0. Fixed in 89af275

Seems that Proj can do more than Snyder wrote in his formulas. Maybe this should be pointed out on the manpage.

The +lon_0 adjust the longitude before it reaches the projection fwd/inv functions, as seen here: https://github.com/OSGeo/proj.4/blob/84c2fed374da46ba0ca3cae1125350b1aa3f73fd/src/pj_fwd.c#L86

I agree that this should be documented better. It's on my list for the next large overhaul of the docs.

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

4 participants