Calculate the geodetic length of a lwgeom on the unit sphere.
The result will have to by multiplied by the real radius to get the real length.
Definition at line 3145 of file lwgeodetic.c.
3146{
3148 uint32_t i = 0;
3149 double length = 0.0;
3150
3151 assert(geom);
3152
3153
3155 return 0.0;
3156
3158
3160 return 0.0;
3161
3164
3166 {
3168 for ( i = 0; i < poly->
nrings; i++ )
3169 {
3171 }
3172 return length;
3173 }
3174
3177
3179 {
3181
3182 for ( i = 0; i < col->
ngeoms; i++ )
3183 {
3185 }
3186 return length;
3187 }
3188
3189 lwerror(
"unsupported type passed to lwgeom_length_sphere");
3190 return 0.0;
3191}
int lwtype_is_collection(uint8_t type)
Determine whether a type number is a collection or not.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
double ptarray_length_spheroid(const POINTARRAY *pa, const SPHEROID *s)
double lwgeom_length_spheroid(const LWGEOM *geom, const SPHEROID *s)
Calculate the geodetic length of a lwgeom on the unit sphere.
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
References LWCOLLECTION::geoms, LINETYPE, lwerror(), lwgeom_is_empty(), lwgeom_length_spheroid(), lwtype_is_collection(), MULTIPOINTTYPE, LWCOLLECTION::ngeoms, LWPOLY::nrings, POINTTYPE, POLYGONTYPE, ptarray_length_spheroid(), LWPOLY::rings, s, TRIANGLETYPE, and LWGEOM::type.
Referenced by geography_length(), geography_perimeter(), LWGEOM_length2d_ellipsoid(), LWGEOM_length_ellipsoid_linestring(), and lwgeom_length_spheroid().