From: Daniel Baston Date: Fri, 2 Mar 2018 01:47:41 +0000 (+0000) Subject: Fix some spelling errors X-Git-Tag: 2.5.0alpha~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cdfcda1b712fbda754b369a7a10d7f1c42d6d236;p=postgis Fix some spelling errors git-svn-id: http://svn.osgeo.org/postgis/trunk@16440 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/bytebuffer.c b/liblwgeom/bytebuffer.c index 2bd1da51b..397a2109d 100644 --- a/liblwgeom/bytebuffer.c +++ b/liblwgeom/bytebuffer.c @@ -378,7 +378,7 @@ bytebuffer_getlength(const bytebuffer_t *s) /** * Returns a new bytebuffer were both ingoing bytebuffers is merged. -* Caller is responsible for freeing both incoming bytefyffers and resulting bytebuffer +* Caller is responsible for freeing both incoming bytebuffers and resulting bytebuffer */ bytebuffer_t* bytebuffer_merge(bytebuffer_t **buff_array, int nbuffers) diff --git a/liblwgeom/effectivearea.c b/liblwgeom/effectivearea.c index 93fe7d920..ac0cffdeb 100644 --- a/liblwgeom/effectivearea.c +++ b/liblwgeom/effectivearea.c @@ -100,15 +100,15 @@ static double triarea3d(const double *P1, const double *P2, const double *P3) /** -We create the minheap by ordering the minheap array by the areas in the areanode structs that the minheap keys refere to +We create the minheap by ordering the minheap array by the areas in the areanode structs that the minheap keys refer to */ static int cmpfunc (const void * a, const void * b) { double v1 = (*(areanode**)a)->area; double v2 = (*(areanode**)b)->area; - /*qsort gives unpredictable results when comaping identical values. - If two values is the same we force returning the last point in hte point array. - That way we get the same ordering on diffreent machines and pllatforms*/ + /*qsort gives unpredictable results when comparing identical values. + If two values is the same we force returning the last point in the point array. + That way we get the same ordering on different machines and platforms*/ if (v1==v2) return (*(areanode**)a)-(*(areanode**)b); else @@ -287,7 +287,7 @@ static void tune_areas(EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, dou check_order_min_area=ea->res_arealist[current]; - /*The found smallest area point is now regarded as elimnated and we have to recalculate the area the adjacent (ignoring earlier elimnated points) points gives*/ + /*The found smallest area point is now regarded as eliminated and we have to recalculate the area the adjacent (ignoring earlier eliminated points) points gives*/ /*FInd point before and after*/ before_current=ea->initial_arealist[current].prev; @@ -331,7 +331,7 @@ static void tune_areas(EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, dou ea->initial_arealist[before_current].next = ea->initial_arealist[current].next; ea->initial_arealist[after_current].prev = ea->initial_arealist[current].prev; - /*Check if we are finnished*/ + /*Check if we are finished*/ if((!set_area && ea->res_arealist[current]>trshld) || (ea->initial_arealist[0].next==(npoints-1))) go_on=0; @@ -419,7 +419,7 @@ static POINTARRAY * ptarray_set_effective_area(POINTARRAY *inpts,int avoid_colla if(set_area) { - /*Only return points with an effective area above the threashold*/ + /*Only return points with an effective area above the threshold*/ for (p=0;pinpts->npoints;p++) { if(ea->res_arealist[p]>trshld) @@ -432,7 +432,7 @@ static POINTARRAY * ptarray_set_effective_area(POINTARRAY *inpts,int avoid_colla } else { - /*Only return points with an effective area above the threashold*/ + /*Only return points with an effective area above the threshold*/ for (p=0;pinpts->npoints;p++) { if(ea->res_arealist[p]>trshld) @@ -498,7 +498,7 @@ static LWPOLY* lwpoly_set_effective_area(const LWPOLY *ipoly,int set_area, doubl if( lwpoly_add_ring(opoly,pa ) == LW_FAILURE ) return NULL; } - /*Inner rings we allow to ocollapse and then we remove them*/ + /*Inner rings we allow to collapse and then we remove them*/ avoid_collapse=0; } diff --git a/liblwgeom/effectivearea.h b/liblwgeom/effectivearea.h index b21c8bfce..01d023f9a 100644 --- a/liblwgeom/effectivearea.h +++ b/liblwgeom/effectivearea.h @@ -33,7 +33,7 @@ /** This structure is placed in an array with one member per point. -It has links into the minheap rtee and kepps track of eliminated points +It has links into the minheap rtee and keeps track of eliminated points */ typedef struct { @@ -47,7 +47,7 @@ typedef struct /** This structure holds a minheap tree that is used to keep track of what points that has the smallest effective area. -When elliminating points the neighbor points has its effective area affected and the minheap helps to resort efficient. +When eliminating points the neighbor points has its effective area affected and the minheap helps to resort efficient. */ typedef struct { @@ -59,7 +59,7 @@ typedef struct /** -Structure to hold pointarray and it's arealist +Structure to hold pointarray and its arealist */ typedef struct { diff --git a/liblwgeom/g_box.c b/liblwgeom/g_box.c index 4159da291..33914bee4 100644 --- a/liblwgeom/g_box.c +++ b/liblwgeom/g_box.c @@ -467,7 +467,7 @@ int lw_arc_calculate_gbox_cartesian_2d(const POINT2D *A1, const POINT2D *A2, con radius_A = lw_arc_center(A1, A2, A3, &C); - /* Negative radius signals straight line, p1/p2/p3 are colinear */ + /* Negative radius signals straight line, p1/p2/p3 are collinear */ if (radius_A < 0.0) { gbox->xmin = FP_MIN(A1->x, A3->x); diff --git a/liblwgeom/g_serialized.c b/liblwgeom/g_serialized.c index 1649ee1bd..4a496a798 100644 --- a/liblwgeom/g_serialized.c +++ b/liblwgeom/g_serialized.c @@ -197,7 +197,7 @@ char* gserialized_to_string(const GSERIALIZED *g) /* Unfortunately including advanced instructions is something that only helps a small sliver of users who can build their own knowing the target system they will be running on. Packagers -have to aim for the lowest common demoninator. So this is +have to aim for the lowest common denominator. So this is dead code for the forseeable future. */ #define HAVE_PDEP 0 #if HAVE_PDEP diff --git a/liblwgeom/liblwgeom.h.in b/liblwgeom/liblwgeom.h.in index 4f2092dfd..dead6b6ee 100644 --- a/liblwgeom/liblwgeom.h.in +++ b/liblwgeom/liblwgeom.h.in @@ -284,7 +284,7 @@ BOX3D; /****************************************************************** * GBOX structure. -* We include the flags (information about dimensinality), +* We include the flags (information about dimensionality), * so we don't have to constantly pass them * into functions that use the GBOX. */ @@ -364,7 +364,7 @@ POINT4D; */ typedef struct { - /* Array of POINT 2D, 3D or 4D, possibly missaligned. */ + /* Array of POINT 2D, 3D or 4D, possibly misaligned. */ uint8_t *serialized_pointlist; /* Use FLAGS_* macros to handle */ diff --git a/liblwgeom/liblwgeom_internal.h b/liblwgeom/liblwgeom_internal.h index e09b4f5a9..2853a4016 100644 --- a/liblwgeom/liblwgeom_internal.h +++ b/liblwgeom/liblwgeom_internal.h @@ -200,7 +200,7 @@ uint32_t lwcollection_count_vertices(LWCOLLECTION *col); */ /** - * @param minpts minimun number of points to retain, if possible. + * @param minpts minimum number of points to retain, if possible. */ void ptarray_simplify_in_place(POINTARRAY *pa, double epsilon, uint32_t minpts); diff --git a/liblwgeom/liblwgeom_topo.h b/liblwgeom/liblwgeom_topo.h index ceb2cda3f..390cb5b39 100644 --- a/liblwgeom/liblwgeom_topo.h +++ b/liblwgeom/liblwgeom_topo.h @@ -281,7 +281,7 @@ typedef struct LWT_BE_CALLBACKS_T { * @param fields fields to be filled in the returned structure, see * LWT_COL_EDGE_* macros * @param limit max number of edges to return, 0 for no limit, -1 - * to only check for existance if a matching row. + * to only check for existence if a matching row. * * @return an array of edges or null in the following cases: * - limit=-1 ("numelems" is set to 1 if found, 0 otherwise) @@ -439,7 +439,7 @@ typedef struct LWT_BE_CALLBACKS_T { * @param fields fields to be filled in the returned structure, see * LWT_COL_NODE_* macros * @param limit max number of nodes to return, 0 for no limit, -1 - * to only check for existance if a matching row. + * to only check for existence if a matching row. * * @return an array of nodes or null in the following cases: * - limit=-1 ("numelems" is set to 1 if found, 0 otherwise) @@ -464,7 +464,7 @@ typedef struct LWT_BE_CALLBACKS_T { * @param fields fields to be filled in the returned structure, see * LWT_COL_EDGE_* macros * @param limit max number of edges to return, 0 for no limit, -1 - * to only check for existance if a matching row. + * to only check for existence if a matching row. * * @return an array of edges or null in the following cases: * - limit=-1 ("numelems" is set to 1 if found, 0 otherwise) @@ -512,7 +512,7 @@ typedef struct LWT_BE_CALLBACKS_T { * @param upd_fields fields to be updated for the selected nodes, * see LWT_COL_NODE_* macros * @param exc_node an LWT_ISO_NODE object with exclusion fields set, - * can be NULL if no exlusion condition exists. + * can be NULL if no exclusion condition exists. * @param exc_fields fields used for excluding nodes from the update, * see LWT_COL_NODE_* macros * @@ -604,7 +604,7 @@ typedef struct LWT_BE_CALLBACKS_T { * * @return an array of signed edge identifiers (positive edges being * walked in their direction, negative ones in opposite) or - * NULL on error (@see lastErroMessage) + * NULL on error (@see lastErrorMessage) */ LWT_ELEMID* (*getRingEdges) ( const LWT_BE_TOPOLOGY* topo, @@ -622,7 +622,7 @@ typedef struct LWT_BE_CALLBACKS_T { * see LWT_COL_EDGE_* macros * * @return number of edges being updated or -1 on error - * (@see lastErroMessage) + * (@see lastErrorMessage) */ int (*updateEdgesById) ( const LWT_BE_TOPOLOGY* topo, @@ -691,7 +691,7 @@ typedef struct LWT_BE_CALLBACKS_T { * see LWT_COL_NODE_* macros * * @return number of nodes being updated or -1 on error - * (@see lastErroMessage) + * (@see lastErrorMessage) */ int (*updateNodesById) ( const LWT_BE_TOPOLOGY* topo, @@ -707,7 +707,7 @@ typedef struct LWT_BE_CALLBACKS_T { * @param numelems number of face identifiers in the ids array * * @return number of faces being deleted or -1 on error - * (@see lastErroMessage) + * (@see lastErrorMessage) */ int (*deleteFacesById) ( const LWT_BE_TOPOLOGY* topo, @@ -746,7 +746,7 @@ typedef struct LWT_BE_CALLBACKS_T { * @param numelems number of node identifiers in the ids array * * @return number of nodes being deleted or -1 on error - * (@see lastErroMessage) + * (@see lastErrorMessage) */ int (*deleteNodesById) ( const LWT_BE_TOPOLOGY* topo, @@ -1158,7 +1158,7 @@ void lwt_CreateTopoGeo(LWT_TOPOLOGY* topo, LWGEOM *geom); * @param pt the node position * @param skipChecks if non-zero skips consistency checks * (coincident nodes, crossing edges, - * actual face containement) + * actual face containment) * * @return ID of the newly added node, or -1 on error * (liblwgeom error handler will be invoked with error message) @@ -1230,7 +1230,7 @@ LWT_ELEMID lwt_AddIsoEdge(LWT_TOPOLOGY* topo, * * For ST_AddEdgeModFace * - * If the new edge splits a face, the face is shrinked and a new one + * If the new edge splits a face, the face is shrunk and a new one * is created. Unless the face being split is the Universal Face, the * new face will be on the right side of the newly added edge. * @@ -1240,7 +1240,7 @@ LWT_ELEMID lwt_AddIsoEdge(LWT_TOPOLOGY* topo, * @param geom the edge geometry * @param skipChecks if non-zero skips consistency checks * (curve being simple and valid, start/end nodes - * consistency actual face containement) + * consistency actual face containment) * * @return ID of the newly added edge or null on error * (liblwgeom error handler will be invoked with error message) @@ -1263,7 +1263,7 @@ LWT_ELEMID lwt_AddEdgeModFace(LWT_TOPOLOGY* topo, * @param geom the edge geometry * @param skipChecks if non-zero skips consistency checks * (curve being simple and valid, start/end nodes - * consistency actual face containement) + * consistency actual face containment) * @return ID of the newly added edge * */ diff --git a/liblwgeom/lwalgorithm.c b/liblwgeom/lwalgorithm.c index 29686f717..bf4c95da7 100644 --- a/liblwgeom/lwalgorithm.c +++ b/liblwgeom/lwalgorithm.c @@ -219,9 +219,9 @@ int lw_arc_side(const POINT2D *A1, const POINT2D *A2, const POINT2D *A3, const P /** * Determines the center of the circle defined by the three given points. * In the event the circle is complete, the midpoint of the segment defined -* by the first and second points is returned. If the points are colinear, +* by the first and second points is returned. If the points are collinear, * as determined by equal slopes, then NULL is returned. If the interior -* point is coincident with either end point, they are taken as colinear. +* point is coincident with either end point, they are taken as collinear. */ double lw_arc_center(const POINT2D *p1, const POINT2D *p2, const POINT2D *p3, POINT2D *result) @@ -517,7 +517,7 @@ int lwline_crossing_direction(const LWLINE *l1, const LWLINE *l2) /* ** Crossing at a co-linearity can be turned handled by extending - ** segment to next vertext and seeing if the end points straddle + ** segment to next vertex and seeing if the end points straddle ** the co-linear segment. */ if ( this_cross == SEG_COLINEAR ) diff --git a/liblwgeom/lwgeodetic.c b/liblwgeom/lwgeodetic.c index b42f590c7..b137da334 100644 --- a/liblwgeom/lwgeodetic.c +++ b/liblwgeom/lwgeodetic.c @@ -364,7 +364,7 @@ static int gbox_check_poles(GBOX *gbox) } /** -* Convert spherical coordinates to cartesion coordinates on unit sphere +* Convert spherical coordinates to cartesian coordinates on unit sphere */ void geog2cart(const GEOGRAPHIC_POINT *g, POINT3D *p) { @@ -374,7 +374,7 @@ void geog2cart(const GEOGRAPHIC_POINT *g, POINT3D *p) } /** -* Convert cartesion coordinates on unit sphere to spherical coordinates +* Convert cartesian coordinates on unit sphere to spherical coordinates */ void cart2geog(const POINT3D *p, GEOGRAPHIC_POINT *g) { @@ -383,7 +383,7 @@ void cart2geog(const POINT3D *p, GEOGRAPHIC_POINT *g) } /** -* Convert lon/lat coordinates to cartesion coordinates on unit sphere +* Convert lon/lat coordinates to cartesian coordinates on unit sphere */ void ll2cart(const POINT2D *g, POINT3D *p) { @@ -396,7 +396,7 @@ void ll2cart(const POINT2D *g, POINT3D *p) } /** -* Convert cartesion coordinates on unit sphere to lon/lat coordinates +* Convert cartesian coordinates on unit sphere to lon/lat coordinates static void cart2ll(const POINT3D *p, POINT2D *g) { g->x = longitude_degrees_normalize(180.0 * atan2(p->y, p->x) / M_PI); @@ -968,7 +968,7 @@ double sphere_direction(const GEOGRAPHIC_POINT *s, const GEOGRAPHIC_POINT *e, do #if 0 /* unused */ /** * Computes the spherical excess of a spherical triangle defined by -* the three vectices A, B, C. Computes on the unit sphere (i.e., divides +* the three vertices A, B, C. Computes on the unit sphere (i.e., divides * edge lengths by the radius, even if the radius is 1.0). The excess is * signed based on the sign of the delta longitude of A and B. * @@ -1035,7 +1035,7 @@ double z_to_latitude(double z, int top) /** * Computes the pole of the great circle disk which is the intersection of -* the great circle with the line of maximum/minimum gradiant that lies on +* the great circle with the line of maximum/minimum gradient that lies on * the great circle plane. */ int clairaut_cartesian(const POINT3D *start, const POINT3D *end, GEOGRAPHIC_POINT *g_top, GEOGRAPHIC_POINT *g_bottom) @@ -1060,7 +1060,7 @@ int clairaut_cartesian(const POINT3D *start, const POINT3D *end, GEOGRAPHIC_POIN /** * Computes the pole of the great circle disk which is the intersection of -* the great circle with the line of maximum/minimum gradiant that lies on +* the great circle with the line of maximum/minimum gradient that lies on * the great circle plane. */ int clairaut_geographic(const GEOGRAPHIC_POINT *start, const GEOGRAPHIC_POINT *end, GEOGRAPHIC_POINT *g_top, GEOGRAPHIC_POINT *g_bottom) @@ -1131,7 +1131,7 @@ int edge_intersection(const GEOGRAPHIC_EDGE *e1, const GEOGRAPHIC_EDGE *e2, GEOG LWDEBUGF(4, "parallel edges found! dot_product = %.12g", dot_product(&ea, &eb)); /* Parallel (maybe equal) edges! */ /* Hack alert, only returning ONE end of the edge right now, most do better later. */ - /* Hack alart #2, returning a value of 2 to indicate a co-linear crossing event. */ + /* Hack alert #2, returning a value of 2 to indicate a co-linear crossing event. */ if ( edge_contains_point(e1, &(e2->start)) ) { *g = e2->start; @@ -1540,7 +1540,7 @@ void gbox_pt_outside(const GBOX *gbox, POINT2D *pt_outside) static int ptarray_segmentize_sphere_edge_recursive ( - const POINT3D *p1, const POINT3D *p2, /* 3-space points we are interpolating beween */ + const POINT3D *p1, const POINT3D *p2, /* 3-space points we are interpolating between */ const POINT4D *v1, const POINT4D *v2, /* real values and z/m values */ double d, double max_seg_length, /* current segment length and segment limit */ POINTARRAY *pa) /* write out results here */ @@ -2089,7 +2089,7 @@ double lwgeom_azumith_spheroid(const LWPOINT *r, const LWPOINT *s, const SPHEROI /** * Calculate the distance between two LWGEOMs, using the coordinates are -* longitude and latitude. Return immediately when the calulated distance drops +* longitude and latitude. Return immediately when the calculated distance drops * below the tolerance (useful for dwithin calculations). * Return a negative distance for incalculable cases. */ @@ -2586,7 +2586,7 @@ int lwpoly_covers_lwline(const LWPOLY *poly, const LWLINE *line) return LW_FALSE; } - /* no abort condition found, so the poly2 should be completly inside poly1 */ + /* no abort condition found, so the poly2 should be completely inside poly1 */ return LW_TRUE; } @@ -2610,7 +2610,7 @@ int lwpoly_covers_pointarray(const LWPOLY* lwpoly, const POINTARRAY* pta) /** * Checks if any edges of lwpoly intersect with the line formed by the pointarray - * return LW_TRUE if any intersection beetween the given polygon and the line + * return LW_TRUE if any intersection between the given polygon and the line */ int lwpoly_intersects_line(const LWPOLY* lwpoly, const POINTARRAY* line) { diff --git a/liblwgeom/lwgeodetic_tree.c b/liblwgeom/lwgeodetic_tree.c index fe2c5276a..112e04896 100644 --- a/liblwgeom/lwgeodetic_tree.c +++ b/liblwgeom/lwgeodetic_tree.c @@ -322,7 +322,7 @@ circ_node_internal_new(CIRC_NODE** c, uint32_t num_nodes) LWDEBUGF(3," offset1 is %g", offset1); /* Sometimes the sphere_direction function fails... this causes the center calculation */ - /* to fail too. In that case, we're going to fall back ot a cartesian calculation, which */ + /* to fail too. In that case, we're going to fall back to a cartesian calculation, which */ /* is less exact, so we also have to pad the radius by (hack alert) an arbitrary amount */ /* which is hopefully always big enough to contain the input edges */ if ( circ_center_spherical(&c1, &(c[i]->center), dist, offset1, &new_center) == LW_FAILURE ) @@ -935,7 +935,7 @@ lwpoly_calculate_circ_tree(const LWPOLY* lwpoly) lwfree(nodes); } - /* Metatdata about polygons, we need this to apply P-i-P tests */ + /* Metadata about polygons, we need this to apply P-i-P tests */ /* selectively when doing distance calculations */ node->geom_type = lwgeom_get_type((LWGEOM*)lwpoly); lwpoly_pt_outside(lwpoly, &(node->pt_outside)); diff --git a/liblwgeom/lwgeom.c b/liblwgeom/lwgeom.c index 83a422413..da79e14ac 100644 --- a/liblwgeom/lwgeom.c +++ b/liblwgeom/lwgeom.c @@ -739,7 +739,7 @@ lwgeom_get_bbox(const LWGEOM *lwg) /** -* Calculate the gbox for this goemetry, a cartesian box or +* Calculate the gbox for this geometry, a cartesian box or * geodetic box, depending on how it is flagged. */ int lwgeom_calculate_gbox(const LWGEOM *lwgeom, GBOX *gbox) diff --git a/liblwgeom/lwgeom_api.c b/liblwgeom/lwgeom_api.c index 1e386e1cc..2506daf63 100644 --- a/liblwgeom/lwgeom_api.c +++ b/liblwgeom/lwgeom_api.c @@ -61,7 +61,7 @@ next_float_down(double d) } /* - * Returns the float thats very close to the input, but >=. + * Returns the float that's very close to the input, but >=. * handles the funny differences in float4 and float8 reps. */ inline float diff --git a/liblwgeom/lwgeom_geos_clean.c b/liblwgeom/lwgeom_geos_clean.c index 9bf1de991..53bc6b0d7 100644 --- a/liblwgeom/lwgeom_geos_clean.c +++ b/liblwgeom/lwgeom_geos_clean.c @@ -37,7 +37,7 @@ /* * Return Nth vertex in GEOSGeometry as a POINT. - * May return NULL if the geometry has NO vertexex. + * May return NULL if the geometry has NO vertex. */ GEOSGeometry* LWGEOM_GEOS_getPointN(const GEOSGeometry*, uint32_t); GEOSGeometry* @@ -388,7 +388,7 @@ LWGEOM_GEOS_makeValidPolygon(const GEOSGeometry* gin) } /* NOTE: the noding process may drop lines collapsing to points. - * We want to retrive any of those */ + * We want to retrieve any of those */ { GEOSGeometry* pi; GEOSGeometry* po; diff --git a/liblwgeom/lwgeom_sfcgal.c b/liblwgeom/lwgeom_sfcgal.c index 58ff9c8fd..ac9760016 100644 --- a/liblwgeom/lwgeom_sfcgal.c +++ b/liblwgeom/lwgeom_sfcgal.c @@ -113,7 +113,7 @@ SFCGAL_type_to_lwgeom_type(sfcgal_geometry_type_t type) * Return a PostGIS pointarray from a simple SFCGAL geometry: * POINT, LINESTRING or TRIANGLE * - * Trought an error on others types + * Throw an error on others types */ static POINTARRAY* ptarray_from_SFCGAL(const sfcgal_geometry_t* geom, int want3d) diff --git a/liblwgeom/lwgeom_topo.c b/liblwgeom/lwgeom_topo.c index ade95ee4e..a66fd77bf 100644 --- a/liblwgeom/lwgeom_topo.c +++ b/liblwgeom/lwgeom_topo.c @@ -2440,7 +2440,7 @@ _lwt_AddEdge( LWT_TOPOLOGY* topo, LWDEBUGF(1, "edge's end node is %g,%g", p2.x, p2.y); /* - * Check endpoints existance, match with Curve geometry + * Check endpoints existence, match with Curve geometry * and get face information (if any) */ @@ -3629,7 +3629,7 @@ lwt_ChangeEdgeGeom(LWT_TOPOLOGY* topo, LWT_ELEMID edge_id, LWLINE *geom) /* -- Update faces MBR of left and right faces -- TODO: think about ways to optimize this part, like see if - -- the old edge geometry partecipated in the definition + -- the old edge geometry participated in the definition -- of the current MBR (for shrinking) or the new edge MBR -- would be larger than the old face MBR... -- diff --git a/liblwgeom/lwout_x3d.c b/liblwgeom/lwout_x3d.c index 86c88fcad..bfb1bf8ec 100644 --- a/liblwgeom/lwout_x3d.c +++ b/liblwgeom/lwout_x3d.c @@ -196,7 +196,7 @@ asx3d3_mpoly_coordindex_sb(const LWMPOLY *psur, stringbuffer_t *sb) if (l < (patch->nrings - 1) ) { /** @todo TODO: Decide the best way to render holes - * Evidentally according to my X3D expert the X3D consortium doesn't really + * Evidently according to my X3D expert the X3D consortium doesn't really * support holes and it's an issue of argument among many that feel it should. He thinks CAD x3d extensions to spec might. * What he has done and others developing X3D exports to simulate a hole is to cut around it. * So if you have a donut, you would cut it into half and have 2 solid polygons. Not really sure the best way to handle this. diff --git a/liblwgeom/lwpsurface.c b/liblwgeom/lwpsurface.c index 0c0887c10..a4527c305 100644 --- a/liblwgeom/lwpsurface.c +++ b/liblwgeom/lwpsurface.c @@ -111,7 +111,7 @@ int lwpsurface_is_closed(const LWPSURFACE *psurface) /* If surface is less than 4 faces hard to be closed too */ if (psurface->ngeoms < 4) return 0; - /* Max theorical arcs number if no one is shared ... */ + /* Max theoretical arcs number if no one is shared ... */ for (i=0, narcs=0 ; i < psurface->ngeoms ; i++) { patch = (LWPOLY *) psurface->geoms[i]; diff --git a/liblwgeom/lwstroke.c b/liblwgeom/lwstroke.c index daa9d5ead..016eafda6 100644 --- a/liblwgeom/lwstroke.c +++ b/liblwgeom/lwstroke.c @@ -924,7 +924,7 @@ pta_unstroke(const POINTARRAY *points, int srid) if ( angle < 0 ) angle = 2 * M_PI + angle; num_quadrants = ( 4 * angle ) / ( 2 * M_PI ); - LWDEBUGF(4, "arc angle (%g %g, %g %g, %g %g) is %g (side is %d), quandrants:%g", first.x, first.y, center.x, center.y, b.x, b.y, angle, p2_side, num_quadrants); + LWDEBUGF(4, "arc angle (%g %g, %g %g, %g %g) is %g (side is %d), quadrants:%g", first.x, first.y, center.x, center.y, b.x, b.y, angle, p2_side, num_quadrants); } /* a1 is first point, b is last point */ if ( arc_edges < min_quad_edges * num_quadrants ) { diff --git a/liblwgeom/lwtin.c b/liblwgeom/lwtin.c index 52a7c5510..8bcc9b657 100644 --- a/liblwgeom/lwtin.c +++ b/liblwgeom/lwtin.c @@ -102,7 +102,7 @@ int lwtin_is_closed(const LWTIN *tin) /* If surface is not 3D, it's can't be closed */ if (!FLAGS_GET_Z(tin->flags)) return 0; - /* Max theorical arcs number if no one is shared ... */ + /* Max theoretical arcs number if no one is shared ... */ narcs = 3 * tin->ngeoms; arcs = lwalloc(sizeof(struct struct_tin_arcs) * narcs); diff --git a/liblwgeom/lwtriangle.c b/liblwgeom/lwtriangle.c index 842dd8a15..dfe490a11 100644 --- a/liblwgeom/lwtriangle.c +++ b/liblwgeom/lwtriangle.c @@ -146,7 +146,7 @@ lwtriangle_is_repeated_points(LWTRIANGLE *triangle) /* * Construct a triangle from a LWLINE being * the shell - * Pointarray from intput geom are cloned. + * Pointarray from input geom is cloned. * Input line must have 4 points, and be closed. */ LWTRIANGLE * diff --git a/liblwgeom/lwutil.c b/liblwgeom/lwutil.c index 93d70b785..0e7488706 100644 --- a/liblwgeom/lwutil.c +++ b/liblwgeom/lwutil.c @@ -255,7 +255,7 @@ lwfree(void *mem) * The caller should specify start or end truncation by setting the truncdirection * parameter as follows: * 0 - start truncation (i.e. characters are removed from the beginning) - * 1 - end trunctation (i.e. characters are removed from the end) + * 1 - end truncation (i.e. characters are removed from the end) */ char *lwmessage_truncate(char *str, int startpos, int endpos, int maxlength, int truncdirection) @@ -326,7 +326,7 @@ char *lwmessage_truncate(char *str, int startpos, int endpos, int maxlength, int char getMachineEndian(void) { - static int endian_check_int = 1; /* dont modify this!!! */ + static int endian_check_int = 1; /* don't modify this!!! */ return *((char *) &endian_check_int); /* 0 = big endian | xdr, * 1 = little endian | ndr diff --git a/liblwgeom/measures.c b/liblwgeom/measures.c index f28463281..424c840af 100644 --- a/liblwgeom/measures.c +++ b/liblwgeom/measures.c @@ -163,7 +163,7 @@ lw_dist2d_distancepoint(const LWGEOM *lw1, const LWGEOM *lw2,int srid,int mode) /** -Function initialazing max distance calculation +Function initializing max distance calculation */ double lwgeom_maxdistance2d(const LWGEOM *lw1, const LWGEOM *lw2) @@ -174,7 +174,7 @@ lwgeom_maxdistance2d(const LWGEOM *lw1, const LWGEOM *lw2) } /** -Function handling max distance calculations and dfyllywithin calculations. +Function handling max distance calculations and dfullywithin calculations. The difference is just the tolerance. */ double @@ -196,7 +196,7 @@ lwgeom_maxdistance2d_tolerance(const LWGEOM *lw1, const LWGEOM *lw2, double tole } /** - Function initialazing min distance calculation + Function initializing min distance calculation */ double lwgeom_mindistance2d(const LWGEOM *lw1, const LWGEOM *lw2) @@ -272,7 +272,7 @@ lw_dist2d_is_collection(const LWGEOM *g) } /** -This is a recursive function delivering every possible combinatin of subgeometries +This is a recursive function delivering every possible combination of subgeometries */ int lw_dist2d_recursive(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS *dl) { @@ -345,7 +345,7 @@ int lw_dist2d_recursive(const LWGEOM *lwg1, const LWGEOM *lwg2, DISTPTS *dl) lwgeom_add_bbox(g2); } - /*If one of geometries is empty, return. True here only means continue searching. False would have stoped the process*/ + /*If one of geometries is empty, return. True here only means continue searching. False would have stopped the process*/ if (lwgeom_is_empty(g1)||lwgeom_is_empty(g2)) return LW_TRUE; if ( (dl->mode != DIST_MAX) && @@ -841,7 +841,7 @@ Function handling polygon to polygon calculation 2 check if poly1 has first point outside poly2 and vice versa, if so, just check outer rings 3 check if first point of poly2 is in a hole of poly1. If so check outer ring of poly2 against that hole of poly1 4 check if first point of poly1 is in a hole of poly2. If so check outer ring of poly1 against that hole of poly2 -5 If we have come all the way here we know that the first point of one of them is inside the other ones outer ring and not in holes so we check wich one is inside. +5 If we have come all the way here we know that the first point of one of them is inside the other ones outer ring and not in holes so we check which one is inside. */ int lw_dist2d_poly_poly(LWPOLY *poly1, LWPOLY *poly2, DISTPTS *dl) @@ -860,7 +860,7 @@ lw_dist2d_poly_poly(LWPOLY *poly1, LWPOLY *poly2, DISTPTS *dl) /* 2 check if poly1 has first point outside poly2 and vice versa, if so, just check outer rings - here it would be possible to handle the information about wich one is inside wich one and only search for the smaller ones in the bigger ones holes.*/ + here it would be possible to handle the information about which one is inside which one and only search for the smaller ones in the bigger ones holes.*/ pt = getPoint2d_cp(poly1->rings[0], 0); if ( ptarray_contains_point(poly2->rings[0], pt) == LW_OUTSIDE ) { @@ -986,7 +986,7 @@ lw_dist2d_curvepoly_curvepoly(LWCURVEPOLY *poly1, LWCURVEPOLY *poly2, DISTPTS *d /* 2 check if poly1 has first point outside poly2 and vice versa, if so, just check outer rings - here it would be possible to handle the information about wich one is inside wich one and only search for the smaller ones in the bigger ones holes.*/ + here it would be possible to handle the information about which one is inside which one and only search for the smaller ones in the bigger ones holes.*/ pt = lw_curvering_getfirstpoint2d_cp(poly1->rings[0]); if ( lwgeom_contains_point(poly2->rings[0], pt) == LW_OUTSIDE ) { @@ -1020,7 +1020,7 @@ lw_dist2d_curvepoly_curvepoly(LWCURVEPOLY *poly1, LWCURVEPOLY *poly2, DISTPTS *d } - /*5 If we have come all the way here we know that the first point of one of them is inside the other ones outer ring and not in holes so we check wich one is inside.*/ + /*5 If we have come all the way here we know that the first point of one of them is inside the other ones outer ring and not in holes so we check which one is inside.*/ pt = lw_curvering_getfirstpoint2d_cp(poly1->rings[0]); if ( lwgeom_contains_point(poly2->rings[0], pt) != LW_OUTSIDE ) { @@ -1309,7 +1309,7 @@ lw_dist2d_seg_arc(const POINT2D *A1, const POINT2D *A2, const POINT2D *B1, const /* Calculate center and radius of the circle. */ radius_C = lw_arc_center(B1, B2, B3, &C); - /* This "arc" is actually a line (B2 is colinear with B1,B3) */ + /* This "arc" is actually a line (B2 is collinear with B1,B3) */ if ( radius_C < 0.0 ) return lw_dist2d_seg_seg(A1, A2, B1, B3, dl); @@ -1327,7 +1327,7 @@ lw_dist2d_seg_arc(const POINT2D *A1, const POINT2D *A2, const POINT2D *B1, const if ( dist_C_D < radius_C ) { double length_A; /* length of the segment A */ - POINT2D E, F; /* points of interection of edge A and circle(B) */ + POINT2D E, F; /* points of intersection of edge A and circle(B) */ double dist_D_EF; /* distance from D to E or F (same distance both ways) */ dist_D_EF = sqrt(radius_C*radius_C - dist_C_D*dist_C_D); @@ -1341,7 +1341,7 @@ lw_dist2d_seg_arc(const POINT2D *A1, const POINT2D *A2, const POINT2D *B1, const F.y = D.y + (A2->y-A1->y) * dist_D_EF / length_A; - /* If E is within A and within B then it's an interesction point */ + /* If E is within A and within B then it's an intersection point */ pt_in_arc = lw_pt_in_arc(&E, B1, B2, B3); pt_in_seg = lw_pt_in_seg(&E, A1, A2); @@ -1353,7 +1353,7 @@ lw_dist2d_seg_arc(const POINT2D *A1, const POINT2D *A2, const POINT2D *B1, const return LW_TRUE; } - /* If F is within A and within B then it's an interesction point */ + /* If F is within A and within B then it's an intersection point */ pt_in_arc = lw_pt_in_arc(&F, B1, B2, B3); pt_in_seg = lw_pt_in_seg(&F, A1, A2); @@ -1813,7 +1813,7 @@ lw_dist2d_arc_arc_concentric( const POINT2D *A1, const POINT2D *A2, /** Finds the shortest distance between two segments. -This function is changed so it is not doing any comparasion of distance +This function is changed so it is not doing any comparison of distance but just sending every possible combination further to lw_dist2d_pt_seg */ int @@ -1869,7 +1869,7 @@ lw_dist2d_seg_seg(const POINT2D *A, const POINT2D *B, const POINT2D *C, const PO { if ((lw_dist2d_pt_seg(A,C,D,dl)) && (lw_dist2d_pt_seg(B,C,D,dl))) { - dl->twisted= ((dl->twisted) * (-1)); /*here we change the order of inputted geometrys and that we notice by changing sign on dl->twisted*/ + dl->twisted= ((dl->twisted) * (-1)); /*here we change the order of inputted geometries and that we notice by changing sign on dl->twisted*/ return ((lw_dist2d_pt_seg(C,A,B,dl)) && (lw_dist2d_pt_seg(D,A,B,dl))); /*if all is successful we return true*/ } else @@ -1885,7 +1885,7 @@ lw_dist2d_seg_seg(const POINT2D *A, const POINT2D *B, const POINT2D *C, const PO { if ((lw_dist2d_pt_seg(A,C,D,dl)) && (lw_dist2d_pt_seg(B,C,D,dl))) { - dl->twisted= ((dl->twisted) * (-1)); /*here we change the order of inputted geometrys and that we notice by changing sign on dl->twisted*/ + dl->twisted= ((dl->twisted) * (-1)); /*here we change the order of inputted geometries and that we notice by changing sign on dl->twisted*/ return ((lw_dist2d_pt_seg(C,A,B,dl)) && (lw_dist2d_pt_seg(D,A,B,dl))); /*if all is successful we return true*/ } else @@ -2003,7 +2003,7 @@ lw_dist2d_fast_ptarray_ptarray(POINTARRAY *l1, POINTARRAY *l2,DISTPTS *dl, GBOX } - /*if the center-center line is horizontal the perpendicular line will be vertical. To eliminate problems with deviding by zero we are here mirroring the coordinate-system + /*if the center-center line is horizontal the perpendicular line will be vertical. To eliminate problems with dividing by zero we are here mirroring the coordinate-system and we find it's crossing the X-axes with z = x-(1/k)y */ else /*West or East*/ { @@ -2082,14 +2082,14 @@ lw_dist2d_pre_seg_seg(POINTARRAY *l1, POINTARRAY *l2,LISTSTRUCT *list1, LISTSTRU p3 = getPoint2d_cp(l2, list2[0].pnr); lw_dist2d_pt_pt(p1, p3, dl); maxmeasure = sqrt(dl->distance*dl->distance + (dl->distance*dl->distance*k*k)); - twist = dl->twisted; /*to keep the incomming order between iterations*/ + twist = dl->twisted; /*to keep the incoming order between iterations*/ for (i =(n1-1); i>=0; --i) { /*we break this iteration when we have checked every point closer to our perpendicular "checkline" than our shortest found distance*/ if (((list2[0].themeasure-list1[i].themeasure)) > maxmeasure) break; - for (r=-1; r<=1; r +=2) /*because we are not iterating in the original pointorder we have to check the segment before and after every point*/ + for (r=-1; r<=1; r +=2) /*because we are not iterating in the original point order we have to check the segment before and after every point*/ { pnr1 = list1[i].pnr; p1 = getPoint2d_cp(l1, pnr1); @@ -2195,10 +2195,10 @@ Functions in common for Brute force and new calculation /** lw_dist2d_comp from p to line A->B -This one is now sending every occation to lw_dist2d_pt_pt -Before it was handling occations where r was between 0 and 1 internally +This one is now sending every occasion to lw_dist2d_pt_pt +Before it was handling occasions where r was between 0 and 1 internally and just returning the distance without identifying the points. -To get this points it was nessecary to change and it also showed to be about 10%faster. +To get this points it was necessary to change and it also showed to be about 10%faster. */ int lw_dist2d_pt_seg(const POINT2D *p, const POINT2D *A, const POINT2D *B, DISTPTS *dl) @@ -2230,7 +2230,7 @@ lw_dist2d_pt_seg(const POINT2D *p, const POINT2D *A, const POINT2D *B, DISTPTS * /*This is for finding the maxdistance. the maxdistance have to be between two vertexes, compared to mindistance which can be between - tvo vertexes vertex.*/ + two vertexes vertex.*/ if (dl->mode == DIST_MAX) { if (r>=0.5) @@ -2271,7 +2271,7 @@ lw_dist2d_pt_seg(const POINT2D *p, const POINT2D *A, const POINT2D *B, DISTPTS * /** -Compares incomming points and +Compares incoming points and stores the points closest to each other or most far away from each other depending on dl->mode (max or min) @@ -2310,7 +2310,7 @@ End of Functions in common for Brute force and new calculation /** -The old function nessecary for ptarray_segmentize2d in ptarray.c +The old function necessary for ptarray_segmentize2d in ptarray.c */ double distance2d_pt_pt(const POINT2D *p1, const POINT2D *p2) @@ -2335,7 +2335,7 @@ distance2d_sqr_pt_pt(const POINT2D *p1, const POINT2D *p2) /** -The old function nessecary for ptarray_segmentize2d in ptarray.c +The old function necessary for ptarray_segmentize2d in ptarray.c */ double distance2d_pt_seg(const POINT2D *p, const POINT2D *A, const POINT2D *B) diff --git a/liblwgeom/measures.h b/liblwgeom/measures.h index 2bdef548f..970a7a249 100644 --- a/liblwgeom/measures.h +++ b/liblwgeom/measures.h @@ -49,7 +49,7 @@ typedef struct POINT2D p1; POINT2D p2; int mode; /*the direction of looking, if thedir = -1 then we look for maxdistance and if it is 1 then we look for mindistance*/ - int twisted; /*To preserve the order of incoming points to match the first and secon point in shortest and longest line*/ + int twisted; /*To preserve the order of incoming points to match the first and second point in shortest and longest line*/ double tolerance; /*the tolerance for dwithin and dfullywithin*/ } DISTPTS; diff --git a/liblwgeom/measures3d.c b/liblwgeom/measures3d.c index 1abbd0626..31e494478 100644 --- a/liblwgeom/measures3d.c +++ b/liblwgeom/measures3d.c @@ -65,7 +65,7 @@ get_3dcross_product(VECTOR3D *v1,VECTOR3D *v2, VECTOR3D *v) /** This function is used to create a vertical line used for cases where one if the geometries lacks z-values. The vertical line crosses the 2d point that is closest -and the z-range is from maxz to minz in the geoemtrie that has z values. +and the z-range is from maxz to minz in the geometry that has z values. */ static LWGEOM* create_v_line(const LWGEOM *lwgeom,double x, double y, int srid) @@ -120,7 +120,7 @@ lw_dist3d_distanceline(const LWGEOM *lw1, const LWGEOM *lw2, int srid, int mode) thedl.distance = initdistance; thedl.tolerance = 0.0; - /*Check if we really have 3D geoemtries*/ + /*Check if we really have 3D geometries*/ /*If not, send it to 2D-calculations which will give the same result*/ /*as an infinite z-value at one or two of the geometries*/ if(!lwgeom_has_z(lw1) || !lwgeom_has_z(lw2)) @@ -225,7 +225,7 @@ lw_dist3d_distancepoint(const LWGEOM *lw1, const LWGEOM *lw2, int srid, int mode LWDEBUG(2, "lw_dist3d_distancepoint is called"); - /*Check if we really have 3D geoemtries*/ + /*Check if we really have 3D geometries*/ /*If not, send it to 2D-calculations which will give the same result*/ /*as an infinite z-value at one or two of the geometries*/ if(!lwgeom_has_z(lw1) || !lwgeom_has_z(lw2)) @@ -459,7 +459,7 @@ int lw_dist3d_recursive(const LWGEOM *lwg1,const LWGEOM *lwg2, DISTPTS3D *dl) } - /*If one of geometries is empty, return. True here only means continue searching. False would have stoped the process*/ + /*If one of geometries is empty, return. True here only means continue searching. False would have stopped the process*/ if (lwgeom_is_empty(g1)||lwgeom_is_empty(g2)) return LW_TRUE; @@ -623,7 +623,7 @@ lw_dist3d_point_poly(LWPOINT *point, LWPOLY *poly, DISTPTS3D *dl) LWDEBUG(2, "lw_dist3d_point_poly is called"); getPoint3dz_p(point->point, 0, &p); - /*If we are lookig for max distance, longestline or dfullywithin*/ + /*If we are looking for max distance, longestline or dfullywithin*/ if (dl->mode == DIST_MAX) { LWDEBUG(3, "looking for maxdistance"); @@ -691,8 +691,8 @@ int lw_dist3d_poly_poly(LWPOLY *poly1, LWPOLY *poly2, DISTPTS3D *dl) if(!define_plane(poly2->rings[0], &plane)) return LW_FALSE; - /*What we do here is to compare the bondary of one polygon with the other polygon - and then take the second boudary comparing with the first polygon*/ + /*What we do here is to compare the boundary of one polygon with the other polygon + and then take the second boundary comparing with the first polygon*/ dl->twisted=1; if(!lw_dist3d_ptarray_poly(poly1->rings[0], poly2,&plane, dl)) return LW_FALSE; @@ -701,7 +701,7 @@ int lw_dist3d_poly_poly(LWPOLY *poly1, LWPOLY *poly2, DISTPTS3D *dl) if(!define_plane(poly1->rings[0], &plane)) return LW_FALSE; - dl->twisted=-1; /*because we swithc the order of geometries we swithch "twisted" to -1 which will give the right order of points in shortest line.*/ + dl->twisted=-1; /*because we switch the order of geometries we switch "twisted" to -1 which will give the right order of points in shortest line.*/ return lw_dist3d_ptarray_poly(poly2->rings[0], poly1,&plane, dl); } @@ -757,7 +757,7 @@ lw_dist3d_pt_seg(POINT3DZ *p, POINT3DZ *A, POINT3DZ *B, DISTPTS3D *dl) /*This is for finding the 3Dmaxdistance. the maxdistance have to be between two vertexes, compared to mindistance which can be between - tvo vertexes vertex.*/ + two vertexes vertex.*/ if (dl->mode == DIST_MAX) { if (r>=0.5) @@ -800,7 +800,7 @@ distance3d_pt_pt(const POINT3D *p1, const POINT3D *p2) /** -Compares incomming points and +Compares incoming points and stores the points closest to each other or most far away from each other depending on dl->mode (max or min) @@ -835,7 +835,7 @@ lw_dist3d_pt_pt(POINT3DZ *thep1, POINT3DZ *thep2,DISTPTS3D *dl) /** -Finds all combinationes of segments between two pointarrays +Finds all combinations of segments between two pointarrays */ int lw_dist3d_ptarray_ptarray(POINTARRAY *l1, POINTARRAY *l2,DISTPTS3D *dl) @@ -936,7 +936,7 @@ lw_dist3d_seg_seg(POINT3DZ *s1p1, POINT3DZ *s1p2, POINT3DZ *s2p1, POINT3DZ *s2p2 if (D <0.000000001) { /* the lines are almost parallel*/ - s1k = 0.0; /*If the lines are paralell we try by using the startpoint of first segment. If that gives a projected point on the second line outside segment 2 it wil be found that s2k is >1 or <0.*/ + s1k = 0.0; /*If the lines are parallel we try by using the startpoint of first segment. If that gives a projected point on the second line outside segment 2 it wil be found that s2k is >1 or <0.*/ if(b>c) /* use the largest denominator*/ { s2k=d/b; @@ -1010,8 +1010,8 @@ lw_dist3d_seg_seg(POINT3DZ *s1p1, POINT3DZ *s1p2, POINT3DZ *s2p1, POINT3DZ *s2p2 Checking if the point projected on the plane of the polygon actually is inside that polygon. If so the mindistance is between that projected point and our original point. -If not we check from original point to the bounadary. -If the projected point is inside a hole of the polygon we check the distance to the boudary of that hole. +If not we check from original point to the boundary. +If the projected point is inside a hole of the polygon we check the distance to the boundary of that hole. */ int lw_dist3d_pt_poly(POINT3DZ *p, LWPOLY *poly, PLANE3D *plane,POINT3DZ *projp, DISTPTS3D *dl) @@ -1037,7 +1037,7 @@ lw_dist3d_pt_poly(POINT3DZ *p, LWPOLY *poly, PLANE3D *plane,POINT3DZ *projp, DIS } else { - return lw_dist3d_pt_ptarray(p, poly->rings[0], dl); /*If the projected point is outside the polygon we search for the closest distance against the boundarry instead*/ + return lw_dist3d_pt_ptarray(p, poly->rings[0], dl); /*If the projected point is outside the polygon we search for the closest distance against the boundary instead*/ } return LW_TRUE; @@ -1128,7 +1128,7 @@ return LW_TRUE; /** Here we define the plane of a polygon (boundary pointarray of a polygon) -the plane is stored as a pont in plane (plane.pop) and a normal vector (plane.pv) +the plane is stored as a point in plane (plane.pop) and a normal vector (plane.pv) */ int define_plane(POINTARRAY *pa, PLANE3D *pl) @@ -1199,8 +1199,8 @@ Finds a point on a plane from where the original point is perpendicular to the p double project_point_on_plane(POINT3DZ *p, PLANE3D *pl, POINT3DZ *p0) { -/*In our plane definition we have a point on the plane and a normal vektor (pl.pv), perpendicular to the plane -this vector will be paralell to the line between our inputted point above the plane and the point we are searching for on the plane. +/*In our plane definition we have a point on the plane and a normal vector (pl.pv), perpendicular to the plane +this vector will be parallel to the line between our inputted point above the plane and the point we are searching for on the plane. So, we already have a direction from p to find p0, but we don't know the distance. */ diff --git a/liblwgeom/ptarray.c b/liblwgeom/ptarray.c index 851578be0..7110e9cd5 100644 --- a/liblwgeom/ptarray.c +++ b/liblwgeom/ptarray.c @@ -72,7 +72,7 @@ ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints) POINTARRAY *pa = lwalloc(sizeof(POINTARRAY)); pa->serialized_pointlist = NULL; - /* Set our dimsionality info on the bitmap */ + /* Set our dimensionality info on the bitmap */ pa->flags = gflags(hasz, hasm, 0); /* We will be allocating a bit of room */ @@ -123,7 +123,7 @@ ptarray_insert_point(POINTARRAY *pa, const POINT4D *p, uint32_t where) /* Error out if we have a bad situation */ if ( pa->npoints > pa->maxpoints ) { - lwerror("npoints (%d) is greated than maxpoints (%d)", pa->npoints, pa->maxpoints); + lwerror("npoints (%d) is greater than maxpoints (%d)", pa->npoints, pa->maxpoints); return LW_FAILURE; } @@ -779,7 +779,7 @@ ptarray_contains_point_partial(const POINTARRAY *pa, const POINT2D *pt, int chec /* * If the point is to the left of the line, and it's rising, * then the line is to the right of the point and - * circling counter-clockwise, so incremement. + * circling counter-clockwise, so increment. */ if ( (side < 0) && (seg1->y <= pt->y) && (pt->y < seg2->y) ) { diff --git a/liblwgeom/stringbuffer.c b/liblwgeom/stringbuffer.c index c363ba376..14ad3cc50 100644 --- a/liblwgeom/stringbuffer.c +++ b/liblwgeom/stringbuffer.c @@ -94,7 +94,7 @@ stringbuffer_clear(stringbuffer_t *s) } /** -* If necessary, expand the stringbuffer_t internal buffer to accomodate the +* If necessary, expand the stringbuffer_t internal buffer to accommodate the * specified additional size. */ static inline void diff --git a/liblwgeom/varint.c b/liblwgeom/varint.c index 78af2a465..22b8e7ef6 100644 --- a/liblwgeom/varint.c +++ b/liblwgeom/varint.c @@ -50,7 +50,7 @@ _varint_u64_encode_buf(uint64_t val, uint8_t *buf) { /* In the next line quite a lot is happening. */ /* Since there is more to read in our input value */ - /* we signal that by setting the most siginicant bit */ + /* we signal that by setting the most significant bit */ /* in our byte to 1. */ /* Then we put that byte in our buffer and move the pointer */ /* forward one step */ diff --git a/postgis/brin_2d.c b/postgis/brin_2d.c index 148951db2..6b584fdc5 100644 --- a/postgis/brin_2d.c +++ b/postgis/brin_2d.c @@ -74,7 +74,7 @@ geom2d_brin_inclusion_add_value(PG_FUNCTION_ARGS) box_key = (BOX2DF *) column->bv_values[INCLUSION_UNION]; - /* Check if the stored bouding box already contains the geometry's one */ + /* Check if the stored bounding box already contains the geometry's one */ if (box2df_contains(box_key, &box_geom)) PG_RETURN_BOOL(false); diff --git a/postgis/gserialized_gist_2d.c b/postgis/gserialized_gist_2d.c index 103d95e74..8213e7f34 100644 --- a/postgis/gserialized_gist_2d.c +++ b/postgis/gserialized_gist_2d.c @@ -1947,7 +1947,7 @@ Datum gserialized_gist_picksplit_2d(PG_FUNCTION_ARGS) * We first consider splits where b is the lower bound of an entry. * We iterate through all entries, and for each b, calculate the * smallest possible a. Then we consider splits where a is the - * uppper bound of an entry, and for each a, calculate the greatest + * upper bound of an entry, and for each a, calculate the greatest * possible b. * * In the above example, the first loop would consider splits: @@ -1998,7 +1998,7 @@ Datum gserialized_gist_picksplit_2d(PG_FUNCTION_ARGS) } /* - * Iterate over upper bound of left group finding greates possible + * Iterate over upper bound of left group finding greatest possible * lower bound of right group. */ i1 = nentries - 1; diff --git a/postgis/legacy.sql.in b/postgis/legacy.sql.in index 855b1d590..ce8f49c96 100644 --- a/postgis/legacy.sql.in +++ b/postgis/legacy.sql.in @@ -4,7 +4,7 @@ #include "legacy_minimal.sql.in" --- start functions that in theory should never have been used or internal like stuff deprecated --- these were superceded by PostGIS_AddBBOX , PostGIS_DropBBOX, PostGIS_HasBBOX in 1.5 -- +-- these were superseded by PostGIS_AddBBOX , PostGIS_DropBBOX, PostGIS_HasBBOX in 1.5 -- CREATE OR REPLACE FUNCTION addbbox(geometry) RETURNS geometry AS 'MODULE_PATHNAME','LWGEOM_addBBOX' diff --git a/postgis/lwgeom_box.c b/postgis/lwgeom_box.c index 995fbb247..92a663524 100644 --- a/postgis/lwgeom_box.c +++ b/postgis/lwgeom_box.c @@ -72,7 +72,7 @@ Datum BOX2D_in(PG_FUNCTION_ARGS) nitems = sscanf(str,"box(%lf %lf,%lf %lf)", &box.xmin, &box.ymin, &box.xmax, &box.ymax); if (nitems != 4) { - elog(ERROR,"box2d parser - couldnt parse. It should look like: BOX(xmin ymin,xmax ymax)"); + elog(ERROR,"box2d parser - couldn't parse. It should look like: BOX(xmin ymin,xmax ymax)"); PG_RETURN_NULL(); } diff --git a/postgis/lwgeom_box3d.c b/postgis/lwgeom_box3d.c index 2ec4a994e..c3891265a 100644 --- a/postgis/lwgeom_box3d.c +++ b/postgis/lwgeom_box3d.c @@ -97,7 +97,7 @@ Datum BOX3D_in(PG_FUNCTION_ARGS) if (nitems != 4) { pfree(box); - elog(ERROR,"BOX3D parser - couldnt parse. It should look like: BOX3D(xmin ymin zmin,xmax ymax zmax) or BOX3D(xmin ymin,xmax ymax)"); + elog(ERROR,"BOX3D parser - couldn't parse. It should look like: BOX3D(xmin ymin zmin,xmax ymax zmax) or BOX3D(xmin ymin,xmax ymax)"); PG_RETURN_NULL(); } } diff --git a/postgis/lwgeom_functions_analytic.c b/postgis/lwgeom_functions_analytic.c index bba67c332..5e18473f4 100644 --- a/postgis/lwgeom_functions_analytic.c +++ b/postgis/lwgeom_functions_analytic.c @@ -696,7 +696,7 @@ static int point_in_ring_rtree(RTREE_NODE *root, const POINT2D *point) /* * If the point is to the left of the line, and it's rising, * then the line is to the right of the point and - * circling counter-clockwise, so incremement. + * circling counter-clockwise, so increment. */ if (FP_CONTAINS_BOTTOM(seg1->y, point->y, seg2->y) && side>0) { @@ -775,7 +775,7 @@ static int point_in_ring(POINTARRAY *pts, const POINT2D *point) /* * If the point is to the left of the line, and it's rising, * then the line is to the right of the point and - * circling counter-clockwise, so incremement. + * circling counter-clockwise, so increment. */ if (FP_CONTAINS_BOTTOM(seg1->y, point->y, seg2->y) && side>0) { diff --git a/postgis/lwgeom_functions_lrs.c b/postgis/lwgeom_functions_lrs.c index a60e1c691..d5170c3da 100644 --- a/postgis/lwgeom_functions_lrs.c +++ b/postgis/lwgeom_functions_lrs.c @@ -685,7 +685,7 @@ lwgeom_locate_between_m(LWGEOM *lwin, double m0, double m1) return NULL; } - lwpgerror("Unkonwn geometry type (%s:%d)", __FILE__, __LINE__); + lwpgerror("Unknown geometry type (%s:%d)", __FILE__, __LINE__); return NULL; } diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c index 54c68539d..43d091c42 100644 --- a/postgis/lwgeom_geos.c +++ b/postgis/lwgeom_geos.c @@ -3356,7 +3356,7 @@ Datum ST_Snap(PG_FUNCTION_ARGS) * Returns at most components as a collection. * First element of the collection is always the part which * remains after the cut, while the second element is the - * part which has been cut out. We arbitrarely take the part + * part which has been cut out. We arbitrarily take the part * on the *right* of cut lines as the part which has been cut out. * For a line cut by a point the part which remains is the one * from start of the line to the cut point. diff --git a/postgis/lwgeom_geos_prepared.c b/postgis/lwgeom_geos_prepared.c index 1c01dedab..a887f8556 100644 --- a/postgis/lwgeom_geos_prepared.c +++ b/postgis/lwgeom_geos_prepared.c @@ -111,7 +111,7 @@ PreparedCacheDelete(void *ptr) pghe = GetPrepGeomHashEntry(context); if (!pghe) - elog(ERROR, "PreparedCacheDelete: Trying to delete non-existant hash entry object with MemoryContext key (%p)", (void *)context); + elog(ERROR, "PreparedCacheDelete: Trying to delete non-existent hash entry object with MemoryContext key (%p)", (void *)context); POSTGIS_DEBUGF(3, "deleting geom object (%p) and prepared geom object (%p) with MemoryContext key (%p)", pghe->geom, pghe->prepared_geom, context); diff --git a/postgis/lwgeom_in_gml.c b/postgis/lwgeom_in_gml.c index 3f1aee1c6..0e7f43aea 100644 --- a/postgis/lwgeom_in_gml.c +++ b/postgis/lwgeom_in_gml.c @@ -169,7 +169,7 @@ static bool is_gml_namespace(xmlNodePtr xnode, bool is_strict) /** - * Retrieve a GML propertie from a node or NULL otherwise + * Retrieve a GML property from a node or NULL otherwise * Respect namespaces if presents in the node element */ static xmlChar *gmlGetProp(xmlNodePtr xnode, xmlChar *prop) @@ -1027,7 +1027,7 @@ static LWGEOM* parse_gml_curve(xmlNodePtr xnode, bool *hasz, int *root_srid) if (!is_gml_namespace(xa, false)) continue; if (strcmp((char *) xa->name, "LineStringSegment")) continue; - /* GML SF is resticted to linear interpolation */ + /* GML SF is restricted to linear interpolation */ interpolation = gmlGetProp(xa, (xmlChar *) "interpolation"); if (interpolation != NULL) { @@ -1056,7 +1056,7 @@ static LWGEOM* parse_gml_curve(xmlNodePtr xnode, bool *hasz, int *root_srid) * segment" from ISO 19107:2003 -> 6.3.16.1 (p43) * * So we must aggregate all the segments into a single one and avoid - * to copy the redundants points + * to copy the redundant points */ if (lss > 1) { @@ -1231,7 +1231,7 @@ static LWGEOM* parse_gml_triangle(xmlNodePtr xnode, bool *hasz, int *root_srid) if (xnode->children == NULL) return lwtriangle_as_lwgeom(lwtriangle_construct_empty(*root_srid, 0, 0)); - /* GML SF is resticted to planar interpolation + /* GML SF is restricted to planar interpolation NOTA: I know Triangle is not part of SF, but we have to be consistent with other surfaces */ interpolation = gmlGetProp(xnode, (xmlChar *) "interpolation"); @@ -1298,7 +1298,7 @@ static LWGEOM* parse_gml_patch(xmlNodePtr xnode, bool *hasz, int *root_srid) if (strcmp((char *) xnode->name, "PolygonPatch")) gml_lwpgerror("invalid GML representation", 48); - /* GML SF is resticted to planar interpolation */ + /* GML SF is restricted to planar interpolation */ interpolation = gmlGetProp(xnode, (xmlChar *) "interpolation"); if (interpolation != NULL) { diff --git a/postgis/lwgeom_in_kml.c b/postgis/lwgeom_in_kml.c index 538b571d6..8daa58a51 100644 --- a/postgis/lwgeom_in_kml.c +++ b/postgis/lwgeom_in_kml.c @@ -350,7 +350,7 @@ static POINTARRAY* parse_kml_coordinates(xmlNodePtr xnode, bool *hasz) ptarray_append_point(dpa, &pt, LW_TRUE); kml_dims = 0; } - p = q-1; /* will be incrementedon next iteration */ + p = q-1; /* will be incremented on next iteration */ //lwpgnotice("after look-ahead *p:%c, kml_dims:%d", *p, kml_dims); } else if ( *p != ',' && ! isspace(*p) ) { lwpgerror("invalid KML representation"); /* (unexpected character %c)", *p); */ diff --git a/postgis/lwgeom_inout.c b/postgis/lwgeom_inout.c index df27b630d..c7becc19b 100644 --- a/postgis/lwgeom_inout.c +++ b/postgis/lwgeom_inout.c @@ -595,10 +595,10 @@ Datum TWKBFromLWGEOMArray(PG_FUNCTION_ARGS) idlist = palloc0(num_geoms * sizeof(int64_t)); - /*Check if there is differences in dimmenstionality*/ + /* Check if there is differences in dimensionality*/ if( lwgeom_has_z(geom)!=has_z || lwgeom_has_m(geom)!=has_m) { - elog(ERROR, "Geometries have differenct dimensionality"); + elog(ERROR, "Geometries have different dimensionality"); PG_FREE_IF_COPY(arr_geoms, 0); PG_FREE_IF_COPY(arr_ids, 1); PG_RETURN_NULL(); diff --git a/postgis/lwgeom_spheroid.c b/postgis/lwgeom_spheroid.c index c4a888779..b6984dbcb 100644 --- a/postgis/lwgeom_spheroid.c +++ b/postgis/lwgeom_spheroid.c @@ -401,7 +401,7 @@ Datum LWGEOM_length_ellipsoid_linestring(PG_FUNCTION_ARGS) * Its radius is approximated by looking at the ellipse. Near the equator R = 'a' (earth's major axis) * near the pole R = 'b' (earth's minor axis). * - * The second (S) is basically a (east-west) line of lattitude. + * The second (S) is basically a (east-west) line of latitude. * Its radius runs from 'a' (major axis) at the equator, and near 0 at the poles. * * @@ -425,8 +425,8 @@ Datum LWGEOM_length_ellipsoid_linestring(PG_FUNCTION_ARGS) * Angle A is lat1 * R is the distance from the centre of the earth to the lat1/long1 point on the surface * of the Earth. - * S is the circle-of-lattitude. Its calculated from the right triangle defined by - * the angle (90-A), and the hypothenus R. + * S is the circle-of-latitude. Its calculated from the right triangle defined by + * the angle (90-A), and the hypotenuse R. * * *