Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 413635 | Differences between
and this patch

Collapse All | Expand All

(-)ogdi-dfsg/configure (-7 / +7 lines)
Lines 3939-3945 Link Here
3939
fi
3939
fi
3940
3940
3941
3941
3942
for ac_header in projects.h
3942
for ac_header in proj_api.h
3943
do
3943
do
3944
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3944
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3945
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
3945
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Lines 4085-4092 Link Here
4085
   { (exit 1); exit 1; }; }
4085
   { (exit 1); exit 1; }; }
4086
  fi
4086
  fi
4087
  if test "$ac_cv_header_projects_h" = no ; then
4087
  if test "$ac_cv_header_projects_h" = no ; then
4088
    { { echo "$as_me:$LINENO: error: Unable to find external PROJ.4 projects.h file, give path or use default internal library." >&5
4088
    { { echo "$as_me:$LINENO: error: Unable to find external PROJ.4 proj_api.h file, give path or use default internal library." >&5
4089
echo "$as_me: error: Unable to find external PROJ.4 projects.h file, give path or use default internal library." >&2;}
4089
echo "$as_me: error: Unable to find external PROJ.4 proj_api.h file, give path or use default internal library." >&2;}
4090
   { (exit 1); exit 1; }; }
4090
   { (exit 1); exit 1; }; }
4091
  fi
4091
  fi
4092
4092
Lines 4095-4106 Link Here
4095
4095
4096
elif test "$with_proj" != "no" -a "$with_proj" != "" ; then
4096
elif test "$with_proj" != "no" -a "$with_proj" != "" ; then
4097
4097
4098
  if test -r $with_proj/include/projects.h ; then
4098
  if test -r $with_proj/include/proj_api.h ; then
4099
    echo "checking for $with_proj/include/projects.h ... found"
4099
    echo "checking for $with_proj/include/proj_api.h ... found"
4100
    PROJ_INCLUDE=-I$with_proj/include
4100
    PROJ_INCLUDE=-I$with_proj/include
4101
  else
4101
  else
4102
    { { echo "$as_me:$LINENO: error: Unable to find $with_proj/include/projects.h" >&5
4102
    { { echo "$as_me:$LINENO: error: Unable to find $with_proj/include/proj_api.h" >&5
4103
echo "$as_me: error: Unable to find $with_proj/include/projects.h" >&2;}
4103
echo "$as_me: error: Unable to find $with_proj/include/proj_api.h" >&2;}
4104
   { (exit 1); exit 1; }; }
4104
   { (exit 1); exit 1; }; }
4105
  fi
4105
  fi
4106
4106
(-)ogdi-dfsg/configure.in (-5 / +5 lines)
Lines 81-93 Link Here
81
if test "$with_proj" = "yes" ; then
81
if test "$with_proj" = "yes" ; then
82
82
83
  AC_CHECK_LIB(proj,pj_init,PROJ_SETTING=external,PROJ_SETTING=missing,)
83
  AC_CHECK_LIB(proj,pj_init,PROJ_SETTING=external,PROJ_SETTING=missing,)
84
  AC_CHECK_HEADERS(projects.h)
84
  AC_CHECK_HEADERS(proj_api.h)
85
85
86
  if test $PROJ_SETTING = missing ; then
86
  if test $PROJ_SETTING = missing ; then
87
    AC_MSG_ERROR([Unable to find external PROJ.4 library, give path or use default internal library.])
87
    AC_MSG_ERROR([Unable to find external PROJ.4 library, give path or use default internal library.])
88
  fi
88
  fi
89
  if test "$ac_cv_header_projects_h" = no ; then
89
  if test "$ac_cv_header_projects_h" = no ; then
90
    AC_MSG_ERROR([Unable to find external PROJ.4 projects.h file, give path or use default internal library.])
90
    AC_MSG_ERROR([Unable to find external PROJ.4 proj_api.h file, give path or use default internal library.])
91
  fi
91
  fi
92
92
93
  PROJ_SETTING=external
93
  PROJ_SETTING=external
Lines 95-105 Link Here
95
95
96
elif test "$with_proj" != "no" -a "$with_proj" != "" ; then
96
elif test "$with_proj" != "no" -a "$with_proj" != "" ; then
97
  
97
  
98
  if test -r $with_proj/include/projects.h ; then
98
  if test -r $with_proj/include/projapi.h ; then
99
    echo "checking for $with_proj/include/projects.h ... found"
99
    echo "checking for $with_proj/include/proj_api.h ... found"
100
    PROJ_INCLUDE=-I$with_proj/include
100
    PROJ_INCLUDE=-I$with_proj/include
101
  else
101
  else
102
    AC_MSG_ERROR([Unable to find $with_proj/include/projects.h])
102
    AC_MSG_ERROR([Unable to find $with_proj/include/proj_api.h])
103
  fi
103
  fi
104
104
105
  if test -r $with_proj/lib/libproj.so ; then
105
  if test -r $with_proj/lib/libproj.so ; then
(-)ogdi-dfsg/ogdi/c-api/client.c (-9 / +9 lines)
Lines 1576-1582 Link Here
1576
  char *error_message;
1576
  char *error_message;
1577
  ecs_CtlPoints *cpts;
1577
  ecs_CtlPoints *cpts;
1578
  ecs_Result *res;
1578
  ecs_Result *res;
1579
  PJ *tempproj;
1579
  projPJ tempproj;
1580
1580
1581
  if (multiblock != 0) {
1581
  if (multiblock != 0) {
1582
    res = &cln_dummy_result;
1582
    res = &cln_dummy_result;
Lines 1598-1604 Link Here
1598
  /* Check if the projection is valid */
1598
  /* Check if the projection is valid */
1599
1599
1600
  if (strncmp(projection,PROJ_LONGLAT,13) != 0) {
1600
  if (strncmp(projection,PROJ_LONGLAT,13) != 0) {
1601
    tempproj = (PJ *) cln_ProjInit(projection);
1601
    tempproj = (projPJ) cln_ProjInit(projection);
1602
    if(tempproj == NULL) {
1602
    if(tempproj == NULL) {
1603
      res = &cln_dummy_result;
1603
      res = &cln_dummy_result;
1604
      ecs_SetError(res,1,"This projection string is invalid");
1604
      ecs_SetError(res,1,"This projection string is invalid");
Lines 1775-1781 Link Here
1775
  ecs_Result *res;
1775
  ecs_Result *res;
1776
  register ecs_Client *cln;
1776
  register ecs_Client *cln;
1777
  char *server_proj;
1777
  char *server_proj;
1778
  PJ *oldtarget,*oldsource;
1778
  projPJ oldtarget,oldsource;
1779
  ecs_Region oldreg;
1779
  ecs_Region oldreg;
1780
  int oldisprojequal;
1780
  int oldisprojequal;
1781
  int oldisTargetLL;
1781
  int oldisTargetLL;
Lines 1874-1880 Link Here
1874
1874
1875
  if (strncmp(projection,PROJ_LONGLAT,13) != 0) {
1875
  if (strncmp(projection,PROJ_LONGLAT,13) != 0) {
1876
    cln->isTargetLL = FALSE;
1876
    cln->isTargetLL = FALSE;
1877
    cln->target = (PJ *) cln_ProjInit(projection);
1877
    cln->target = (projPJ) cln_ProjInit(projection);
1878
    if(cln->target == NULL) {
1878
    if(cln->target == NULL) {
1879
      goto setprojerror;
1879
      goto setprojerror;
1880
    }
1880
    }
Lines 1920-1926 Link Here
1920
1920
1921
  if (strncmp(server_proj,PROJ_LONGLAT,13) != 0) {
1921
  if (strncmp(server_proj,PROJ_LONGLAT,13) != 0) {
1922
    cln->isSourceLL = FALSE;
1922
    cln->isSourceLL = FALSE;
1923
    cln->source = (PJ *) cln_ProjInit(server_proj);
1923
    cln->source = (projPJ) cln_ProjInit(server_proj);
1924
    if(cln->source == NULL) {
1924
    if(cln->source == NULL) {
1925
      goto setprojerror;
1925
      goto setprojerror;
1926
    }
1926
    }
Lines 2328-2340 Link Here
2328
 *	char *d: Projection name
2328
 *	char *d: Projection name
2329
 *
2329
 *
2330
 *  OUT
2330
 *  OUT
2331
 *	return PJ *: New projection structure. If NULL, the operation
2331
 *	return projPJ: New projection structure. If NULL, the operation
2332
 *	is a failure.
2332
 *	is a failure.
2333
 *
2333
 *
2334
 *----------------------------------------------------------------------
2334
 *----------------------------------------------------------------------
2335
 */
2335
 */
2336
2336
2337
PJ *cln_ProjInit(d)
2337
projPJ cln_ProjInit(d)
2338
     char *d;
2338
     char *d;
2339
{
2339
{
2340
  int i,n;
2340
  int i,n;
Lines 2343-2349 Link Here
2343
  char *l;
2343
  char *l;
2344
  int longueur;
2344
  int longueur;
2345
  char *c;
2345
  char *c;
2346
  PJ *retour;
2346
  projPJ retour;
2347
  
2347
  
2348
  if ((c = (char *) malloc(strlen(d)+3)) == NULL) {
2348
  if ((c = (char *) malloc(strlen(d)+3)) == NULL) {
2349
    return NULL;
2349
    return NULL;
Lines 2378-2384 Link Here
2378
    n++;
2378
    n++;
2379
  }
2379
  }
2380
2380
2381
  retour = (PJ *) pj_init(n, (char **) tableau);
2381
  retour = (projPJ) pj_init(n, (char **) tableau);
2382
  free(c);
2382
  free(c);
2383
  free(tableau);
2383
  free(tableau);
2384
2384
(-)ogdi-dfsg/ogdi/c-api/ecsgeo.c (-1 / +1 lines)
Lines 310-316 Link Here
310
     char *projection;
310
     char *projection;
311
     double X1,Y1,X2,Y2;
311
     double X1,Y1,X2,Y2;
312
{
312
{
313
  PJ *proj;
313
  projPJ proj;
314
  char **argv;
314
  char **argv;
315
  int argc;
315
  int argc;
316
  double lon1,lat1,lon2,lat2;
316
  double lon1,lat1,lon2,lat2;
(-)ogdi-dfsg/ogdi/datum_driver/usa/dtusa.c (-2 / +7 lines)
Lines 26-32 Link Here
26
  ********************************************************************/
26
  ********************************************************************/
27
27
28
#include "ecs.h"
28
#include "ecs.h"
29
#include "projects.h"
29
#include "proj_api.h"
30
31
/* Definition from Proj.4 */
32
projUV nad_cvt(projUV, int, struct CTABLE *);
33
struct CTABLE *nad_init(projCtx ctx, char *);
34
void nad_free(struct CTABLE *);
30
35
31
typedef struct {
36
typedef struct {
32
  struct CTABLE *dtptr;
37
  struct CTABLE *dtptr;
Lines 124-130 Link Here
124
    strcat(pathfile,"/");  
129
    strcat(pathfile,"/");  
125
    strcat(pathfile,table);  
130
    strcat(pathfile,table);  
126
131
127
    ptr->dtptr = nad_init(pathfile);
132
    ptr->dtptr = nad_init(pj_get_default_ctx(), pathfile);
128
    if (ptr->dtptr == NULL) {
133
    if (ptr->dtptr == NULL) {
129
      ptr->count--;
134
      ptr->count--;
130
      return FALSE;
135
      return FALSE;
(-)ogdi-dfsg/ogdi/include/ecs_util.h (-11 / +6 lines)
Lines 105-116 Link Here
105
#include <sys/types.h>
105
#include <sys/types.h>
106
#include <sys/stat.h>
106
#include <sys/stat.h>
107
107
108
#include "projects.h"
108
#include "proj_api.h"
109
110
/* Ensure we are compatible with PROJ.4.4.x and PROJ.4.3.x */
111
#ifndef USE_PROJUV
112
#  define projUV UV
113
#endif
114
109
115
#include "ecs.h"
110
#include "ecs.h"
116
111
Lines 1054-1061 Link Here
1054
     ecs_Family currentSelectionFamily: Current layer selection type
1049
     ecs_Family currentSelectionFamily: Current layer selection type
1055
     char *tclprocname: attribute callback procedure for tcl
1050
     char *tclprocname: attribute callback procedure for tcl
1056
     char *target_proj: Projection descriptor
1051
     char *target_proj: Projection descriptor
1057
     PJ *target: target (c interface) projection descriptors
1052
     projPJ target: target (c interface) projection descriptors
1058
     PJ *source: source (driver) projection descriptors
1053
     projPJ source: source (driver) projection descriptors
1059
     ecs_Datum targetdatum: target datum information
1054
     ecs_Datum targetdatum: target datum information
1060
     ecs_Datum sourcedatum: source datum information
1055
     ecs_Datum sourcedatum: source datum information
1061
     void *dthandle: Handle to the datum driver
1056
     void *dthandle: Handle to the datum driver
Lines 1092-1099 Link Here
1092
  ecs_Family currentSelectionFamily; /* Current layer selection type */
1088
  ecs_Family currentSelectionFamily; /* Current layer selection type */
1093
  char *tclprocname;      /* attribute callback procedure for tcl */
1089
  char *tclprocname;      /* attribute callback procedure for tcl */
1094
  char *target_proj;
1090
  char *target_proj;
1095
  PJ *target;             /* source and target projection descriptors */
1091
  projPJ target;             /* source and target projection descriptors */
1096
  PJ *source;
1092
  projPJ source;
1097
  int isSourceLL;         /* flags to avoid unnecessary computation */
1093
  int isSourceLL;         /* flags to avoid unnecessary computation */
1098
  int isTargetLL;
1094
  int isTargetLL;
1099
  int isProjEqual;
1095
  int isProjEqual;
Lines 1165-1171 Link Here
1165
1161
1166
/* Projection conversion functions */
1162
/* Projection conversion functions */
1167
1163
1168
PJ *cln_ProjInit                     _ANSI_ARGS_((char *d));
1164
projPJ cln_ProjInit                     _ANSI_ARGS_((char *d));
1169
int cln_CompareProjections           _ANSI_ARGS_((int ClientID));
1165
int cln_CompareProjections           _ANSI_ARGS_((int ClientID));
1170
int cln_UpdateMaxRegion              _ANSI_ARGS_((int ClientID, double x, double y, ecs_Region *gr, int sens, int first));
1166
int cln_UpdateMaxRegion              _ANSI_ARGS_((int ClientID, double x, double y, ecs_Region *gr, int sens, int first));
1171
int cln_ConvRegion                   _ANSI_ARGS_((int ClientID, ecs_Region *gr, int sens));
1167
int cln_ConvRegion                   _ANSI_ARGS_((int ClientID, ecs_Region *gr, int sens));
(-)ogdi-dfsg/contrib/ogdi_import/ogdi_import.c (-6 / +1 lines)
Lines 63-74 Link Here
63
#include "ecs.h"
63
#include "ecs.h"
64
#include "shapefil.h"
64
#include "shapefil.h"
65
#include <assert.h>
65
#include <assert.h>
66
#include "projects.h"
66
#include "proj_api.h"
67
68
#ifndef PJ_VERSION
69
#define projPJ PJ*
70
#define projUV UV
71
#endif
72
67
73
static int	ClientID = -1;
68
static int	ClientID = -1;
74
static int      bNoDict = FALSE;
69
static int      bNoDict = FALSE;
(-)ogdi-dfsg/contrib/ogdi_info/ogdi_info.c (-3 / +3 lines)
Lines 63-69 Link Here
63
 */
63
 */
64
64
65
#include "ecs.h"
65
#include "ecs.h"
66
#include "projects.h"
66
#include "proj_api.h"
67
67
68
static int	ClientID = -1;
68
static int	ClientID = -1;
69
static int      bNoDict = FALSE;
69
static int      bNoDict = FALSE;
Lines 214-220 Link Here
214
/*                          DumpGlobalRegion()                          */
214
/*                          DumpGlobalRegion()                          */
215
/************************************************************************/
215
/************************************************************************/
216
216
217
static int DumpGlobalRegion( ecs_Region * region, PJ * proj_defn )
217
static int DumpGlobalRegion( ecs_Region * region, projPJ proj_defn )
218
218
219
{
219
{
220
    ecs_Result	*result;
220
    ecs_Result	*result;
Lines 398-404 Link Here
398
398
399
{
399
{
400
    ecs_Result *result;
400
    ecs_Result *result;
401
    PJ	       *proj_defn = NULL;
401
    projPJ     proj_defn = NULL;
402
402
403
/* -------------------------------------------------------------------- */
403
/* -------------------------------------------------------------------- */
404
/*      Close old client if there is one active.                        */
404
/*      Close old client if there is one active.                        */

Return to bug 413635