]> granicus.if.org Git - postgis/commitdiff
Fix some spelling errors
authorDaniel Baston <dbaston@gmail.com>
Fri, 2 Mar 2018 01:47:41 +0000 (01:47 +0000)
committerDaniel Baston <dbaston@gmail.com>
Fri, 2 Mar 2018 01:47:41 +0000 (01:47 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@16440 b70326c6-7e19-0410-871a-916f4a2858ee

41 files changed:
liblwgeom/bytebuffer.c
liblwgeom/effectivearea.c
liblwgeom/effectivearea.h
liblwgeom/g_box.c
liblwgeom/g_serialized.c
liblwgeom/liblwgeom.h.in
liblwgeom/liblwgeom_internal.h
liblwgeom/liblwgeom_topo.h
liblwgeom/lwalgorithm.c
liblwgeom/lwgeodetic.c
liblwgeom/lwgeodetic_tree.c
liblwgeom/lwgeom.c
liblwgeom/lwgeom_api.c
liblwgeom/lwgeom_geos_clean.c
liblwgeom/lwgeom_sfcgal.c
liblwgeom/lwgeom_topo.c
liblwgeom/lwout_x3d.c
liblwgeom/lwpsurface.c
liblwgeom/lwstroke.c
liblwgeom/lwtin.c
liblwgeom/lwtriangle.c
liblwgeom/lwutil.c
liblwgeom/measures.c
liblwgeom/measures.h
liblwgeom/measures3d.c
liblwgeom/ptarray.c
liblwgeom/stringbuffer.c
liblwgeom/varint.c
postgis/brin_2d.c
postgis/gserialized_gist_2d.c
postgis/legacy.sql.in
postgis/lwgeom_box.c
postgis/lwgeom_box3d.c
postgis/lwgeom_functions_analytic.c
postgis/lwgeom_functions_lrs.c
postgis/lwgeom_geos.c
postgis/lwgeom_geos_prepared.c
postgis/lwgeom_in_gml.c
postgis/lwgeom_in_kml.c
postgis/lwgeom_inout.c
postgis/lwgeom_spheroid.c

index 2bd1da51b46671990e3caabe156e930108151265..397a2109d5619b9d433a96ea077dce00cc50f813 100644 (file)
@@ -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)
index 93fe7d920914d2cf94145a2e7d5f966432d3c99d..ac0cffdeb75303c8b50ee0e8ea7eb75846da7962 100644 (file)
@@ -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;p<ea->inpts->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;p<ea->inpts->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;
        }
 
index b21c8bfce38f74969e0cbc2b6be474922ecac566..01d023f9ab5dd35ebbff6f0e2413dd1d8c44cfae 100644 (file)
@@ -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
 {
index 4159da291ddcdc552560dbe65c175620dd315599..33914bee44961884114348c07c163253e0a01d81 100644 (file)
@@ -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);
index 1649ee1bd88c9c7a6931f5e74e090af7d92c1587..4a496a798090db142f1d376d73665ec4ca3812a7 100644 (file)
@@ -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
index 4f2092dfdf6101d97b8230149867dae7fe18344b..dead6b6eea7a778c246ee98bbdb61c041fe4de51 100644 (file)
@@ -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 */
index e09b4f5a99f5df4b7e0f6eb7f696241486c03d86..2853a401699ea2483e00a8d2ed82e076321b35fd 100644 (file)
@@ -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);
 
index ceb2cda3ff262e0eb85694ea8783708cd9795715..390cb5b39c8786f1aedd876eb94a861c6a61039a 100644 (file)
@@ -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
  *
  */
index 29686f717838172279d8aa2f705eb32fe69a5842..bf4c95da7970f80b9a95a5805595ffa51c50cbc0 100644 (file)
@@ -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 )
index b42f590c75ee742673c0eaa3adc82ff40ff003d1..b137da334c24624b7d582e8516b16a8410b7027e 100644 (file)
@@ -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)
 {
index fe2c5276a8c6c8430b038b1c319906fe57a02354..112e0489658be0fdb9f7ad2ee591bc0394f84fb1 100644 (file)
@@ -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));
index 83a422413f6468bf54d11cbec265fcae297d11c9..da79e14accc00875ac5e63e0b9581b329d11a13b 100644 (file)
@@ -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)
index 1e386e1cc5134a93cb52ce00af42225e37246843..2506daf63f87ab069e9450906c8229c0794c3f2e 100644 (file)
@@ -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
index 9bf1de991ad60f64bb46c945f6a11a518a7bc5d2..53bc6b0d713f766fc9fa513cb389c8df38913044 100644 (file)
@@ -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;
index 58ff9c8fd2fd667081b4f232ccad2e9de0a6d94b..ac9760016ddef238d6583a391c105f4d2385d7f1 100644 (file)
@@ -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)
index ade95ee4eee1db05628eabdfe8a78b91d6111262..a66fd77bfbfd9cafd12080b87f5d6feec6f7c14f 100644 (file)
@@ -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...
   --
index 86c88fcadd3ab4e3f6e110b792fc7559846a910f..bfb1bf8ec9a989c059a76fb77bb9fc321a9fac34 100644 (file)
@@ -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.
index 0c0887c10f30c4d986c3d4562acc825c66e99239..a4527c30546acfec3589605ace554af30891f0ff 100644 (file)
@@ -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];
index daa9d5ead94303a06a1390faa3493129ae479857..016eafda6f0c8284151d74af4bedb0a559992dbe 100644 (file)
@@ -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 ) {
index 52a7c551056ad7b32970c69a689feb27b56fb2ff..8bcc9b657f31cd7840c6b670b60001a11684a0a2 100644 (file)
@@ -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);
index 842dd8a15a7adc334afa8f93c19624cb670c19ef..dfe490a1175e7ce99350e2ac913439eb5b2773af 100644 (file)
@@ -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 *
index 93d70b7855370ab1417507908fe05a910895b52e..0e7488706e34e84fa31d9bf6e3baa6bbd8d566ab 100644 (file)
@@ -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
index f2846328129e5aebcbf81a3b489a75eb5ea948af..424c840afab6099856c8bf96bfd9b72da0f7c607 100644 (file)
@@ -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)
index 2bdef548f6510f7786e124ff1d54814abd0c201f..970a7a249b57a20ea0b18c14920872586033f590 100644 (file)
@@ -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;
 
index 1abbd0626d962795f5d6b6a1832fc43854f452d3..31e494478322042f8ae0e61a0aa43cb5bcfbd4cc 100644 (file)
@@ -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.
 */
 
index 851578be0ccabd856b26092d345b7ee4aaff83e6..7110e9cd56315695b77ca5249d9be47ee0071b9b 100644 (file)
@@ -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) )
                {
index c363ba376cec55232ecefda74569a6c5a0201e93..14ad3cc501c4d0e333e09f8603bfe31539a83c74 100644 (file)
@@ -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
index 78af2a4656a0b2a1ba9bb9c18d4e58e7816a4554..22b8e7ef61a83c2773f7013b1b438fc15f7991dc 100644 (file)
@@ -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 */
index 148951db25164b2645f29a95641c8af7107c718d..6b584fdc5477e9514c59238ea4ca5e7a5a3073cf 100644 (file)
@@ -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);
 
index 103d95e74bd6bbb5d8f71a00d2b87620d88f0950..8213e7f348094453ab3024c215763bfd3a64c324 100644 (file)
@@ -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;
index 855b1d5905cbf69c3bab3b3bc1452a9b48c47015..ce8f49c96dcb975bf487988baf085310b43ff802 100644 (file)
@@ -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'
index 995fbb2473534b2b1fdefbb96361226983de0de0..92a6635248e4e4d1c4b5edcafedd5fc41c2c4b9e 100644 (file)
@@ -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();
        }
 
index 2ec4a994e5076e0120571c01e9e377842d27856d..c3891265a2ca3c88cd3402d774f4d5764d36caf5 100644 (file)
@@ -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();
                }
        }
index bba67c332fdf4af4a443bc72cb29477045e70b9f..5e18473f4387821b2c52bf9f40019ffa02d2ec8c 100644 (file)
@@ -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)
                {
index a60e1c691bcee3ba5536d4b57b2d4875d813b5bf..d5170c3daf6747109d0bd3bd88bbe60b028b67c0 100644 (file)
@@ -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;
 }
 
index 54c68539d44f6340ca04785da87da230e1da97b9..43d091c42b10c9380c71e5d3e21fd116f539756d 100644 (file)
@@ -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.
index 1c01dedabde3a773016a33163d754fcee98703ec..a887f8556a1d73935500e6de0cf96e5e4c185024 100644 (file)
@@ -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);
 
index 3f1aee1c6bd7979882d6bff36b52c2bfe62a7a47..0e7f43aea852cb58bbe4831a58b57ddcf560d503 100644 (file)
@@ -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)
        {
index 538b571d6473d6441675c09fdefd6660b8cea8ef..8daa58a51c2f264d5d0168dfd6e3931b2d28cdda 100644 (file)
@@ -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); */
index df27b630d7efc2291240be53aed3f320d3982ed9..c7becc19b4d9683fce0941c40c738f353a529472 100644 (file)
@@ -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();
index c4a888779f291cd1e480c475494f413724023f6a..b6984dbcb9fb1c418c6dc068569eaea383c3437d 100644 (file)
@@ -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.
  *
  *
  *