# 3D Plot (grdview) with General perspective projection

**URL:** <https://forum.generic-mapping-tools.org/t/3d-plot-grdview-with-general-perspective-projection/3247>\
**Category:** Q&A\
**Created:** [September 2, 2022, 7:29am UTC](https://forum.generic-mapping-tools.org/t/3d-plot-grdview-with-general-perspective-projection/3247 "2022-09-02T07:29:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adakite](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/adakite/32/2475_2.png) [@adakite](https://forum.generic-mapping-tools.org/u/adakite)\
**Post date:** [September 2, 2022, 7:29am UTC](https://forum.generic-mapping-tools.org/t/3d-plot-grdview-with-general-perspective-projection/3247/1 "2022-09-02T07:29:20Z")

</div>

Hi

I am trying to make a nice 3d plot (perspective) of a topographic map using a general perspective projection (i.e., -JG). While I can get the 3d surface as expected with let say, mercator projection, the elevation is totally flat (while the perspective is fine as the Space shuttle example) with the general perspective projection. So my question is, is there any incompatibility between grdview and the general perspective projection ?

If this is a case, I could use another projection but the “perspective” effect is not possible with others, except if I miss something in the hidden option.

Any help on such task?

here is the piece of code I am using which generate the correct perspective view, but the topo is flat:  
`PROJ=-JG${longitude}/${latitude}/28c+z${altitude}+a${azimuth}+t${tilt}+w${twist}+v${Width}/${Height}`  
`gmt grdview $topofile -C -G$topofile -Qc -R168/171/-11/-5 -I+a0/270+ne0.1 $PROJ -B5g5 -V -JZ2c`

Thanks

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [September 2, 2022, 5:48pm UTC](https://forum.generic-mapping-tools.org/t/3d-plot-grdview-with-general-perspective-projection/3247/2 "2022-09-02T17:48:36Z")

</div>

It would easier to help if you provided a [MWE](https://en.wikipedia.org/wiki/Minimal_reproducible_example)

---

<div class="post-metadata">

**Author:** ![EJFielding](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/ejfielding/32/82_2.png) [@EJFielding](https://forum.generic-mapping-tools.org/u/EJFielding)\
**Post date:** [September 4, 2022, 6:03am UTC](https://forum.generic-mapping-tools.org/t/3d-plot-grdview-with-general-perspective-projection/3247/3 "2022-09-04T06:03:38Z")

</div>

It is my understanding that the “general perspective” `-JG` projection is to make a perspective view of the whole Earth. I think you have to use one of the other projections that project the curved Earth surface to a locally flat map before doing the 3D surface with topography. I have used both Mercator and UTM and they produce similar results for an area near the equator.

---

<div class="post-metadata">

**Author:** ![adakite](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/adakite/32/2475_2.png) [@adakite](https://forum.generic-mapping-tools.org/u/adakite)\
**Post date:** [September 5, 2022, 1:20pm UTC](https://forum.generic-mapping-tools.org/t/3d-plot-grdview-with-general-perspective-projection/3247/4 "2022-09-05T13:20:13Z")

</div>

Thanks for your reply.

Meanwhile, I realised that adding `-p` while keeping the “general perspective” make the elevation appearing. Nonetheless, as opposed to `grdimage` the perspective view is “orthographic” (as for other projections such as UTM/Mercator) while I was expecting a perspective effect instead when using `-Jg|G`.
