Let's plot a parametric function $(x_s(u,v), \:y_s(u,v))$ on some $uv$ domain as shown below with an annulus as example.

    xs[u_, v_] := (1/4 - I/4)*Sqrt[Pi]*(-Erf[(1/2 + I/2)*u] + Erf[(1/2 + 
   I/2)*(u - I*v)] - Erfi[(1/2 + I/2)*u] + Erfi[(1/2 + I/2)*(u + I*v)]);

    ys[u_, v_] := (1/4 + I/4)*Sqrt[Pi]*(-Erf[(1/2 + I/2)*u] + Erf[(1/2 + 
  I/2)*(u - I*v)] + Erfi[(1/2 + I/2)*u] - Erfi[(1/2 + I/2)*(u + I*v)]); 

  ParametricPlot[{{xs[u, v], ys[u, v]}}, Element[{u, v}, Annulus[{1, 1}, {0.5, 1}]]]

Now, I wish to take as domain, instead of an annulus, some geographical region, for instance Portugal. Up to now I've learned to plot such regions using

 GeoGraphics[{Polygon[Entity["Country", "Portugal"]]}, GeoBackground -> None]

but how to convert that plot into a mathematical set where I could evaluate ParametricPlot ?

  • $\begingroup$ So, the $u$ and $v$ in your function would be latitude and longitude? $\endgroup$ May 30, 2022 at 16:25
  • $\begingroup$ @J.M. True (for simplicity). Also, I would place the object on the first quadrant to have $u>0$ and $v>0$. $\endgroup$ May 30, 2022 at 16:31
  • 1
    $\begingroup$ You have a first example in the book : Dauphiné A. Geographical Models with Mathematica, ISTE Press Elsevier, 2017, pages 231-232 $\endgroup$
    – Dauphine
    May 30, 2022 at 17:28
  • $\begingroup$ @Dauphine Nice. I'm gonna take a look. Thanks. $\endgroup$ May 30, 2022 at 17:51
  • 1
    $\begingroup$ @Dauphine I checked it and that's not exactly what I'm looking for. That's simply a superposition, what I need to do is to take the domain and map it through a function. $\endgroup$ May 30, 2022 at 19:20

1 Answer 1


Here is a possible method:

Get the polygon you want to handle as a geo region:

georegion = Entity["Country", "Portugal"]["Polygon"]

You need to choose a geo projection to give meaning to the {u, v} pairs. If you need them to be {lon, lat} then choose "Equirectangular", but perhaps you need to start with "Mercator" coordinates, or "Mollweide" coordinates. Let us choose "Mercator". Discretize the result:

region = DiscretizeRegion[GeoGridPosition[georegion, "Mercator"]]

Now you can perform a computation (I use something simpler than your function):

map = ParametricPlot[{{u - v + 40, u + v}}, Element[{u, v}, region], PlotStyle -> Green]

Show both maps together (note that I use the same projection, for consistency of interpretation):

Show[GeoGraphics[{Red, EdgeForm[Red], georegion}, GeoProjection -> "Mercator", GeoBackground -> "VectorMonochrome"], map, PlotRange -> All]

enter image description here

  • $\begingroup$ Great !! That's a simple, nice solution. Thank you so much. $\endgroup$ May 31, 2022 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.