54 LinkedList<const GEOSGeometry*> *
unmulti(
const GEOSGeometry* the_geom );
87 inline int max(
int a,
int b )
88 {
return a > b ? a : b; }
90 inline double max(
double a,
double b )
91 {
return a > b ? a : b; }
93 inline int min(
int a,
int b )
94 {
return a < b ? a : b; }
96 inline double min(
double a,
double b )
97 {
return a < b ? a : b; }
99 inline double vabs(
double x )
100 {
return x >= 0 ? x : -x; }
107 double lat = delta_deg * 0.5;
108 const static double rads = ( 4.0 * atan( 1.0 ) ) / 180.0;
109 double a = cos( lat * rads );
111 double c = 2.0 * atan2( sqrt( a ), sqrt( 1.0 - a ) );
112 const static double ra = 6378000;
113 const static double e = 0.0810820288;
114 double radius = ra * ( 1.0 - e * e ) / pow( 1.0 - e * e * sin( lat * rads ) * sin( lat * rads ), 1.5 );
115 double meters = ( delta_deg ) / 180.0 * radius * c;
134 return (( x /
double( dpi ) ) * 0.0254 ) * scale;
136 return (( x /
double( dpi ) )*12 ) * scale;
139 double iw =
degree2meter( delta_canvas_width ) * 39.3700787;
140 return ( x * delta_canvas_width * scale ) / ( iw * dpi );
143 fprintf( stderr,
"Target unit undefined\n" );
151 return ( x*dpi ) / ( 2.54*scale );
157 return ( x * delta_canvas_width ) / mw;
160 fprintf( stderr,
"Target unit undefined\n" );
168 return ( x*dpi ) / ( 12*scale );
173 double iw =
degree2meter( delta_canvas_width ) * 39.3700787;
174 return ( x * delta_canvas_width ) / iw;
177 fprintf( stderr,
"Target unit undefined\n" );
185 fprintf( stderr,
"Degree to pixel not yet implemented\n" );
188 fprintf( stderr,
"Degree to meter not yet implemented\n" );
191 fprintf( stderr,
"Degree to foot not yet implemented\n" );
194 fprintf( stderr,
"Target unit undefined\n" );
199 fprintf( stderr,
"Source unit undefined" );
204 fprintf( stderr,
"Unable to convert. Unknown units\n" );
212 *x = ( int )(((
double ) * x / scale ) * 39.3700787402 * dpi + 0.5 );
218 return (
int )(( x / scale ) * 39.3700787402 * dpi + 0.5 );
222 void sort(
double* heap,
int* x,
int* y,
int N );
232 return strcmp( a, b ) == 0;
276 void sort(
void** items,
int N,
bool ( *greater )(
void *l,
void *r ) );
278 void tabcpy(
int n,
const int*
const x,
const int*
const y,
279 const double*
const prob,
int *cx,
int *cy,
double *p );