[Proj] Import Proj native library in C#

zagot maurelio at live.it
Sat Jul 16 05:36:58 PDT 2011


Someone can help me to define this C struct in C#?

#if !defined(PROJECTS_H)
    typedef struct { double u, v; } projUV;
    typedef void *projPJ;
    #define projXY projUV
    #define projLP projUV
#else
    typedef PJ *projPJ;
#   define projXY   XY
#   define projLP       LP
#endif

typedef struct PJconsts {
    XY  (*fwd)(LP, struct PJconsts *);
    LP  (*inv)(XY, struct PJconsts *);
    void (*spc)(LP, struct PJconsts *, struct FACTORS *);
    void (*pfree)(struct PJconsts *);
    const char *descr;
    paralist *params;   /* parameter list */
    int over;   /* over-range flag */
    int geoc;   /* geocentric latitude flag */
        int is_latlong; /* proj=latlong ... not really a projection at all
*/
        int is_geocent; /* proj=geocent ... not really a projection at all
*/
    double
        a,  /* major axis or radius if es==0 */
                a_orig, /* major axis before any +proj related adjustment */
        es, /* e ^ 2 */
                es_orig, /* es before any +proj related adjustment */
        e,  /* eccentricity */
        ra, /* 1/A */
        one_es, /* 1 - e^2 */
        rone_es, /* 1/one_es */
        lam0, phi0, /* central longitude, latitude */
        x0, y0, /* easting and northing */
        k0, /* general scaling factor */
        to_meter, fr_meter; /* cartesian scaling */

        int     datum_type; /* PJD_UNKNOWN/3PARAM/7PARAM/GRIDSHIFT/WGS84 */
        double  datum_params[7];
        double  from_greenwich; /* prime meridian offset (in radians) */
        double  long_wrap_center; /* 0.0 for -180 to 180, actually in
radians*/

} PJ;

Thanks in advance, G.


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Import-Proj-native-library-in-C-tp6589496p6589496.html
Sent from the PROJ.4 mailing list archive at Nabble.com.



More information about the Proj mailing list