Multithread support in PROJ 4.8.0

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Multithread support in PROJ 4.8.0

José Luis García Pallero
Hello:

I've seen that in version 4.8.0 has added to proj the thread safe
capability via the Ctx structs. But, is documented the usage of this
new feature? Exists any examples with OpenMP? Where?

Thanks

--
*****************************************
José Luis García Pallero
[hidden email]
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Multithread support in PROJ 4.8.0

Fischer, Robert P. (GISS-6110)[COLUMBIA UNIVERSITY]
I did not come across any documentation, this is REALLY good to know.  Especially since I was considering parallelizing my code.

I would not need an explicit example in OpenMP (I would use MPI anyway).  Rather, I would need a description of how to do things in a thread-safe manner, avoid things being shared when they shouldn't, etc.

-- Bob

________________________________________
From: [hidden email] [[hidden email]] On Behalf Of José Luis García Pallero [[hidden email]]
Sent: Tuesday, April 10, 2012 6:11 AM
To: PROJ.4 and general Projections Discussions
Subject: [Proj] Multithread support in PROJ 4.8.0

Hello:

I've seen that in version 4.8.0 has added to proj the thread safe
capability via the Ctx structs. But, is documented the usage of this
new feature? Exists any examples with OpenMP? Where?

Thanks

--
*****************************************
José Luis García Pallero
[hidden email]
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Changing Radius of the Earth?

Fischer, Robert P. (GISS-6110)[COLUMBIA UNIVERSITY]
In reply to this post by José Luis García Pallero
How do I change the radius of the (spherical) Earth in proj.4?  I'm using the proj.4 string:

    " +proj=laea +lon_0=-40.000000 +lat_0=74.000000 +x_0=1000000 +y_0=1700000 +ellps=sphere"

..and have discovered that proj.4 assumes a radius of exactly 6370997m (from pj_ellps.c):

    "sphere",   "a=6370997.0",  "b=6370997.0", "Normal Sphere (r=6370997)",

We are running code on a spherical Earth, with a radius (slightly) different from that above.  For consistency sake, proj.4 will need to use the same Earth radius as the code that calls it.  How do I set up a projection on a spherical Earth with a custom radius?

Also... if someone wanted to use proj.4 for mapping on Mars, how would they do that?

Thanks,
-- Bob
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Changing Radius of the Earth?

Frank Warmerdam
On Tue, Apr 10, 2012 at 8:16 AM, Fischer, Robert P.
(GISS-6110)[COLUMBIA UNIVERSITY] <[hidden email]> wrote:

> How do I change the radius of the (spherical) Earth in proj.4?  I'm using the proj.4 string:
>
>    " +proj=laea +lon_0=-40.000000 +lat_0=74.000000 +x_0=1000000 +y_0=1700000 +ellps=sphere"
>
> ..and have discovered that proj.4 assumes a radius of exactly 6370997m (from pj_ellps.c):
>
>    "sphere",   "a=6370997.0",  "b=6370997.0", "Normal Sphere (r=6370997)",
>
> We are running code on a spherical Earth, with a radius (slightly) different from that above.  For consistency sake, proj.4 will need to use the same Earth radius as the code that calls it.  How do I set up a projection on a spherical Earth with a custom radius?
>
> Also... if someone wanted to use proj.4 for mapping on Mars, how would they do that?

Bob,

You can supply explicit values for the semi minor and semi major axes
instead of using the symbolic "sphere" value.

eg.
" +proj=laea +lon_0=-40.000000 +lat_0=74.000000 +x_0=1000000
+y_0=1700000 +a=2000000 +b=200000"

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Software Developer
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Changing Radius of the Earth?

José Alberto Gonçalves
In reply to this post by Fischer, Robert P. (GISS-6110)[COLUMBIA UNIVERSITY]
For Mars use its ellipsoid axis:  +a=3396200 +b=3376189
or the mean sphere: +R=3389508

Data from http://www.hnsky.org/iau-iag.htm

Regards

José Gonçalves




Em 10 de abril de 2012 16:16, Fischer, Robert P. (GISS-6110)[COLUMBIA UNIVERSITY] <[hidden email]> escreveu:
How do I change the radius of the (spherical) Earth in proj.4?  I'm using the proj.4 string:

   " +proj=laea +lon_0=-40.000000 +lat_0=74.000000 +x_0=1000000 +y_0=1700000 +ellps=sphere"

..and have discovered that proj.4 assumes a radius of exactly 6370997m (from pj_ellps.c):

   "sphere",   "a=6370997.0",  "b=6370997.0", "Normal Sphere (r=6370997)",

We are running code on a spherical Earth, with a radius (slightly) different from that above.  For consistency sake, proj.4 will need to use the same Earth radius as the code that calls it.  How do I set up a projection on a spherical Earth with a custom radius?

Also... if someone wanted to use proj.4 for mapping on Mars, how would they do that?

Thanks,
-- Bob
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj


_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj
Reply | Threaded
Open this post in threaded view
|

Re: Multithread support in PROJ 4.8.0

José Luis García Pallero
In reply to this post by Fischer, Robert P. (GISS-6110)[COLUMBIA UNIVERSITY]
El día 10 de abril de 2012 13:35, Fischer, Robert P.
(GISS-6110)[COLUMBIA UNIVERSITY] <[hidden email]>
escribió:
> I did not come across any documentation, this is REALLY good to know.  Especially since I was considering parallelizing my code.
>
> I would not need an explicit example in OpenMP (I would use MPI anyway).  Rather, I would need a description of how to do things in a thread-safe manner, avoid things being shared when they shouldn't, etc.
>

Hi,

I've seen that have a file called src/multistresstest.c in the 4.8.0
distribution in which multithreaded capabilities are tested. The
program uses pthreads but I'm not understand clearly the way of use
for the projCtx object. I don't understand if each thread should
create it own ctx or if it should be created at the beginning of the
program. So in my case I'm not so sure the way of use in OpenMP
programs. Could someone post an OpenMP example?

Thanks

> -- Bob
>
> ________________________________________
> From: [hidden email] [[hidden email]] On Behalf Of José Luis García Pallero [[hidden email]]
> Sent: Tuesday, April 10, 2012 6:11 AM
> To: PROJ.4 and general Projections Discussions
> Subject: [Proj] Multithread support in PROJ 4.8.0
>
> Hello:
>
> I've seen that in version 4.8.0 has added to proj the thread safe
> capability via the Ctx structs. But, is documented the usage of this
> new feature? Exists any examples with OpenMP? Where?
>
> Thanks
>
> --
> *****************************************
> José Luis García Pallero
> [hidden email]
> (o<
> / / \
> V_/_
> Use Debian GNU/Linux and enjoy!
> *****************************************
> _______________________________________________
> Proj mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/proj
> _______________________________________________
> Proj mailing list
> [hidden email]
> http://lists.maptools.org/mailman/listinfo/proj



--
*****************************************
José Luis García Pallero
[hidden email]
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************
_______________________________________________
Proj mailing list
[hidden email]
http://lists.maptools.org/mailman/listinfo/proj