Lines Matching refs:LWGEOM

392 * LWGEOM (any geometry type)
405 LWGEOM; typedef
512 LWGEOM **geoms;
525 LWGEOM **geoms;
538 LWGEOM **rings; /* list of rings (list of points) */
551 LWGEOM **geoms;
564 LWGEOM **geoms;
594 /* Casts LWGEOM->LW* (return NULL if cast is illegal) */
595 extern LWMPOLY *lwgeom_as_lwmpoly(const LWGEOM *lwgeom);
596 extern LWMLINE *lwgeom_as_lwmline(const LWGEOM *lwgeom);
597 extern LWMPOINT *lwgeom_as_lwmpoint(const LWGEOM *lwgeom);
598 extern LWCOLLECTION *lwgeom_as_lwcollection(const LWGEOM *lwgeom);
599 extern LWPOLY *lwgeom_as_lwpoly(const LWGEOM *lwgeom);
600 extern LWLINE *lwgeom_as_lwline(const LWGEOM *lwgeom);
601 extern LWPOINT *lwgeom_as_lwpoint(const LWGEOM *lwgeom);
602 extern LWCIRCSTRING *lwgeom_as_lwcircstring(const LWGEOM *lwgeom);
603 extern LWCURVEPOLY *lwgeom_as_lwcurvepoly(const LWGEOM *lwgeom);
604 extern LWCOMPOUND *lwgeom_as_lwcompound(const LWGEOM *lwgeom);
605 extern LWPSURFACE *lwgeom_as_lwpsurface(const LWGEOM *lwgeom);
606 extern LWTRIANGLE *lwgeom_as_lwtriangle(const LWGEOM *lwgeom);
607 extern LWTIN *lwgeom_as_lwtin(const LWGEOM *lwgeom);
608 extern LWGEOM *lwgeom_as_multi(const LWGEOM *lwgeom);
609 extern LWGEOM *lwgeom_as_curve(const LWGEOM *lwgeom);
611 /* Casts LW*->LWGEOM (always cast) */
612 extern LWGEOM *lwtin_as_lwgeom(const LWTIN *obj);
613 extern LWGEOM *lwtriangle_as_lwgeom(const LWTRIANGLE *obj);
614 extern LWGEOM *lwpsurface_as_lwgeom(const LWPSURFACE *obj);
615 extern LWGEOM *lwmpoly_as_lwgeom(const LWMPOLY *obj);
616 extern LWGEOM *lwmline_as_lwgeom(const LWMLINE *obj);
617 extern LWGEOM *lwmpoint_as_lwgeom(const LWMPOINT *obj);
618 extern LWGEOM *lwcollection_as_lwgeom(const LWCOLLECTION *obj);
619 extern LWGEOM *lwcircstring_as_lwgeom(const LWCIRCSTRING *obj);
620 extern LWGEOM *lwcompound_as_lwgeom(const LWCOMPOUND *obj);
621 extern LWGEOM *lwcurvepoly_as_lwgeom(const LWCURVEPOLY *obj);
622 extern LWGEOM *lwpoly_as_lwgeom(const LWPOLY *obj);
623 extern LWGEOM *lwline_as_lwgeom(const LWLINE *obj);
624 extern LWGEOM *lwpoint_as_lwgeom(const LWPOINT *obj);
627 extern LWCOLLECTION* lwcollection_add_lwgeom(LWCOLLECTION *col, const LWGEOM *geom);
728 * from LWGEOM. If LWGEOM type is *not* flagged
732 extern void lwgeom_drop_bbox(LWGEOM *lwgeom);
733 extern void lwgeom_drop_srid(LWGEOM *lwgeom);
741 extern void lwgeom_add_bbox(LWGEOM *lwgeom);
745 extern void lwgeom_refresh_bbox(LWGEOM *lwgeom);
749 extern void lwgeom_add_bbox_deep(LWGEOM *lwgeom, GBOX *gbox);
758 extern const GBOX *lwgeom_get_bbox(const LWGEOM *lwgeom);
761 * Determine whether a LWGEOM can contain sub-geometries or not
763 extern int lwgeom_is_collection(const LWGEOM *lwgeom);
986 * Strip out the Z/M components of an #LWGEOM
988 extern LWGEOM* lwgeom_force_2d(const LWGEOM *geom);
989 extern LWGEOM* lwgeom_force_3dz(const LWGEOM *geom);
990 extern LWGEOM* lwgeom_force_3dm(const LWGEOM *geom);
991 extern LWGEOM* lwgeom_force_4d(const LWGEOM *geom);
993 extern LWGEOM* lwgeom_set_effective_area(const LWGEOM *igeom, int set_area, double area);
994 extern LWGEOM* lwgeom_chaikin(const LWGEOM *igeom, int n_iterations, int preserve_endpoint);
995 extern LWGEOM* lwgeom_filter_m(LWGEOM *geom, double min, double max, int returnm);
1001 extern LWGEOM* lwgeom_force_sfs(LWGEOM *geom, int version);
1046 extern int lwcurvepoly_add_ring(LWCURVEPOLY *poly, LWGEOM *ring);
1052 extern int lwcompound_add_lwgeom(LWCOMPOUND *comp, LWGEOM *geom);
1068 * LWGEOM functions
1079 extern LWGEOM *lwgeom_homogenize(const LWGEOM *geom);
1086 LWGEOM *lwcollection_getsubgeom(LWCOLLECTION *col, int gnum);
1098 * Set the SRID on an LWGEOM
1102 extern void lwgeom_set_srid(LWGEOM *geom, int srid);
1142 extern void lwgeom_free(LWGEOM *geom);
1145 * The *_release family of functions frees the LWGEOM structures
1162 extern void lwgeom_release(LWGEOM *lwgeom);
1186 extern LWGEOM* lwgeom_closest_line(const LWGEOM *lw1, const LWGEOM *lw2);
1187 extern LWGEOM* lwgeom_furthest_line(const LWGEOM *lw1, const LWGEOM *lw2);
1188 extern LWGEOM* lwgeom_closest_point(const LWGEOM *lw1, const LWGEOM *lw2);
1189 extern LWGEOM* lwgeom_furthest_point(const LWGEOM *lw1, const LWGEOM *lw2);
1190 extern double lwgeom_mindistance2d(const LWGEOM *lw1, const LWGEOM *lw2);
1191 extern double lwgeom_mindistance2d_tolerance(const LWGEOM *lw1, const LWGEOM *lw2, double toleranc…
1192 extern double lwgeom_maxdistance2d(const LWGEOM *lw1, const LWGEOM *lw2);
1193 extern double lwgeom_maxdistance2d_tolerance(const LWGEOM *lw1, const LWGEOM *lw2, double toleranc…
1199 extern LWGEOM* lwgeom_furthest_line_3d(LWGEOM *lw1, LWGEOM *lw2);
1200 extern LWGEOM* lwgeom_closest_line_3d(const LWGEOM *lw1, const LWGEOM *lw2);
1201 extern LWGEOM* lwgeom_closest_point_3d(const LWGEOM *lw1, const LWGEOM *lw2);
1204 extern double lwgeom_mindistance3d(const LWGEOM *lw1, const LWGEOM *lw2);
1205 extern double lwgeom_mindistance3d_tolerance(const LWGEOM *lw1, const LWGEOM *lw2, double tolerance…
1206 extern double lwgeom_maxdistance3d(const LWGEOM *lw1, const LWGEOM *lw2);
1207 extern double lwgeom_maxdistance3d_tolerance(const LWGEOM *lw1, const LWGEOM *lw2, double tolerance…
1209 extern double lwgeom_area(const LWGEOM *geom);
1210 extern double lwgeom_length(const LWGEOM *geom);
1211 extern double lwgeom_length_2d(const LWGEOM *geom);
1212 extern double lwgeom_perimeter(const LWGEOM *geom);
1213 extern double lwgeom_perimeter_2d(const LWGEOM *geom);
1214 extern int lwgeom_dimension(const LWGEOM *geom);
1228 extern LWGEOM* lwgeom_reverse(const LWGEOM *lwgeom);
1229 extern char* lwgeom_summary(const LWGEOM *lwgeom, int offset);
1231 extern int lwgeom_startpoint(const LWGEOM* lwgeom, POINT4D* pt);
1239 extern int lwgeom_is_clockwise(LWGEOM *lwgeom);
1242 extern LWGEOM* lwgeom_simplify(const LWGEOM *igeom, double dist, int preserve_collapsed);
1243 extern LWGEOM* lwgeom_remove_repeated_points(const LWGEOM *in, double tolerance);
1250 * called from within PostGIS, the LWGEOM argument should be built
1255 extern void lwgeom_reverse_in_place(LWGEOM *lwgeom);
1256 extern void lwgeom_force_clockwise(LWGEOM *lwgeom);
1257 extern void lwgeom_longitude_shift(LWGEOM *lwgeom);
1258 extern void lwgeom_simplify_in_place(LWGEOM *igeom, double dist, int preserve_collapsed);
1259 extern void lwgeom_affine(LWGEOM *geom, const AFFINE *affine);
1260 extern void lwgeom_scale(LWGEOM *geom, const POINT4D *factors);
1261 extern void lwgeom_remove_repeated_points_in_place(LWGEOM *in, double tolerance);
1276 LWGEOM *lwgeom_wrapx(const LWGEOM *lwgeom, double cutx, double amount);
1288 extern int lwgeom_needs_bbox(const LWGEOM *geom);
1291 * Count the total number of vertices in any #LWGEOM.
1293 extern uint32_t lwgeom_count_vertices(const LWGEOM *geom);
1296 * Count the total number of rings in any #LWGEOM. Multipolygons
1299 extern uint32_t lwgeom_count_rings(const LWGEOM *geom);
1305 extern int lwgeom_has_srid(const LWGEOM *geom);
1311 extern int lwgeom_is_empty(const LWGEOM *geom);
1317 extern int lwgeom_is_closed(const LWGEOM *geom);
1322 extern int lwgeom_dimensionality(const LWGEOM *geom);
1325 extern char lwgeom_same(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2);
1329 * @brief Clone LWGEOM object. Serialized point lists are not copied.
1335 extern LWGEOM *lwgeom_clone(const LWGEOM *lwgeom);
1338 * Deep clone an LWGEOM, everything is copied
1340 extern LWGEOM *lwgeom_clone_deep(const LWGEOM *lwgeom);
1354 extern LWCURVEPOLY* lwcurvepoly_construct(int srid, GBOX *bbox, uint32_t nrings, LWGEOM **geoms);
1356 …CTION* lwcollection_construct(uint8_t type, int srid, GBOX *bbox, uint32_t ngeoms, LWGEOM **geoms);
1360 extern LWGEOM* lwgeom_construct_empty(uint8_t type, int srid, char hasz, char hasm);
1380 extern LWLINE *lwline_from_lwgeom_array(int srid, uint32_t ngeoms, LWGEOM **geoms);
1391 extern LWMPOINT *lwmpoint_from_lwgeom(const LWGEOM *g); /* Extract the coordinates of an LWGEOM int…
1402 extern int32_t lwgeom_get_srid(const LWGEOM *geom);
1407 extern uint32_t lwgeom_get_type(const LWGEOM *geom);
1412 extern int lwgeom_has_z(const LWGEOM *geom);
1417 extern int lwgeom_has_m(const LWGEOM *geom);
1422 extern int lwgeom_ndims(const LWGEOM *geom);
1444 extern LWGEOM* lwgeom_locate_along(const LWGEOM *lwin, double m, double offset);
1451 extern LWCOLLECTION* lwgeom_locate_between(const LWGEOM *lwin, double from, double to, double offse…
1456 extern double lwgeom_interpolate_point(const LWGEOM *lwin, const LWPOINT *lwpt);
1468 extern double lwgeom_tcpa(const LWGEOM *g1, const LWGEOM *g2, double *mindist);
1475 extern int lwgeom_cpa_within(const LWGEOM *g1, const LWGEOM *g2, double maxdist);
1481 extern int lwgeom_is_trajectory(const LWGEOM *geom);
1486 * Returned LWGEOM might is unchanged if a POINT.
1488 extern LWGEOM *lwgeom_segmentize2d(const LWGEOM *line, double dist);
1499 extern LWMPOINT *lwgeom_to_points(const LWGEOM *lwgeom, uint32_t npoints);
1504 extern LWPOINT* lwgeom_median(const LWGEOM *g, double tol, uint32_t maxiter, char fail_if_not_conve…
1510 char *lwgeom_geohash(const LWGEOM *lwgeom, int precision);
1535 LWCOLLECTION* lwgeom_clip_to_ordinate_range(const LWGEOM *lwin, char ordinate, double from, double …
1566 extern char* lwgeom_to_gml2(const LWGEOM *geom, const char *srs, int precision, const char *prefix);
1567 extern char* lwgeom_extent_to_gml2(const LWGEOM *geom, const char *srs, int precision, const char *…
1571 extern char* lwgeom_extent_to_gml3(const LWGEOM *geom, const char *srs, int precision, int opts, co…
1572 extern char* lwgeom_to_gml3(const LWGEOM *geom, const char *srs, int precision, int opts, const cha…
1573 extern char* lwgeom_to_kml2(const LWGEOM *geom, int precision, const char *prefix);
1574 extern char* lwgeom_to_geojson(const LWGEOM *geo, char *srs, int precision, int has_bbox);
1575 extern char* lwgeom_to_svg(const LWGEOM *geom, int precision, int relative);
1576 extern char* lwgeom_to_x3d3(const LWGEOM *geom, char *srs, int precision, int opts, const char *def…
1577 extern char* lwgeom_to_encoded_polyline(const LWGEOM *geom, int precision);
1580 * Create an LWGEOM object from a GeoJSON representation
1588 extern LWGEOM* lwgeom_from_geojson(const char *geojson, char **srs);
1591 * Create an LWGEOM object from an Encoded Polyline representation
1595 extern LWGEOM* lwgeom_from_encoded_polyline(const char *encodedpolyline, int precision);
1607 extern double lwgeom_distance_spheroid(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2, const SPHEROID…
1618 extern LWGEOM* lwgeom_segmentize_sphere(const LWGEOM *lwg_in, double max_seg_length);
1629 extern double lwgeom_area_sphere(const LWGEOM *lwgeom, const SPHEROID *spheroid);
1635 extern double lwgeom_area_spheroid(const LWGEOM *lwgeom, const SPHEROID *spheroid);
1641 extern double lwgeom_length_spheroid(const LWGEOM *geom, const SPHEROID *s);
1647 extern int lwgeom_covers_lwgeom_sphere(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2);
1668 extern LWBOUNDINGCIRCLE* lwgeom_calculate_mbc(const LWGEOM* g);
1682 extern void lwgeom_swap_ordinates(LWGEOM *in, LWORD o1, LWORD o2);
1689 * Create a new LWPOINTITERATOR over supplied LWGEOM*
1691 extern LWPOINTITERATOR* lwpointiterator_create(const LWGEOM* g);
1694 * Create a new LWPOINTITERATOR over supplied LWGEOM*
1697 extern LWPOINTITERATOR* lwpointiterator_create_rw(LWGEOM* g);
1773 * Check that coordinates of LWGEOM are all within the geodetic range (-180, -90, 180, 90)
1775 extern int lwgeom_check_geodetic(const LWGEOM *geom);
1778 * Gently move coordinates of LWGEOM if they are close enough into geodetic range.
1780 extern int lwgeom_nudge_geodetic(LWGEOM *geom);
1783 * Force coordinates of LWGEOM into geodetic range (-180, -90, 180, 90)
1785 extern int lwgeom_force_geodetic(LWGEOM *geom);
1790 extern void lwgeom_set_geodetic(LWGEOM *geom, int value);
1793 * Calculate the geodetic bounding box for an LWGEOM. Z/M coordinates are
1795 * to fill out. LWGEOM must have been built from a GSERIALIZED to provide
1798 extern int lwgeom_calculate_gbox_geodetic(const LWGEOM *geom, GBOX *gbox);
1805 extern int lwgeom_calculate_gbox_cartesian(const LWGEOM *lwgeom, GBOX *gbox);
1811 extern int lwgeom_calculate_gbox(const LWGEOM *lwgeom, GBOX *gbox);
1964 * Calculate required memory segment to contain a serialized form of the LWGEOM.
1968 extern size_t gserialized_from_lwgeom_size(const LWGEOM *geom);
1971 * Allocate a new #GSERIALIZED from an #LWGEOM. For all non-point types, a bounding
1977 extern GSERIALIZED* gserialized_from_lwgeom(LWGEOM *geom, size_t *size);
1980 * Allocate a new #LWGEOM from a #GSERIALIZED. The resulting #LWGEOM will have coordinates
1983 extern LWGEOM* lwgeom_from_gserialized(const GSERIALIZED *g);
2010 * (E)WKT/(E)WKB to LWGEOM
2015 uint8_t *serialized_lwgeom; /* Pointer to serialized LWGEOM */
2016 size_t size; /* Size of serialized LWGEOM in bytes */
2017 LWGEOM *geom; /* Pointer to LWGEOM struct */
2042 * Unparser result structure: returns the result of attempting to convert LWGEOM to (E)WKT/(E)WKB
2046 uint8_t *serialized_lwgeom; /* Copy of pointer to input serialized LWGEOM */
2048 size_t size; /* Size of serialized LWGEOM in bytes */
2098 extern char* lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out);
2105 extern uint8_t* lwgeom_to_wkb(const LWGEOM *geom, uint8_t variant, size_t *size_out);
2112 extern char* lwgeom_to_hexwkb(const LWGEOM *geom, uint8_t variant, size_t *size_out);
2117 extern char *lwgeom_to_ewkt(const LWGEOM *lwgeom);
2124 extern LWGEOM* lwgeom_from_wkb(const uint8_t *wkb, const size_t wkb_size, const char check);
2130 extern LWGEOM* lwgeom_from_wkt(const char *wkt, const char check);
2135 extern LWGEOM* lwgeom_from_hexwkb(const char *hexwkb, const char check);
2165 extern LWGEOM* lwgeom_from_twkb(const uint8_t *twkb, size_t twkb_size, char check);
2172 extern uint8_t* lwgeom_to_twkb(const LWGEOM *geom, uint8_t variant, int8_t precision_xy, int8_t pre…
2174 extern uint8_t* lwgeom_to_twkb_with_idlist(const LWGEOM *geom, int64_t *idlist, uint8_t variant, in…
2177 * Trim the bits of an LWGEOM in place, to optimize it for compression.
2188 extern void lwgeom_trim_bits_in_place(LWGEOM *geom, int32_t prec_x, int32_t prec_y, int32_t prec_z,…
2194 int lwgeom_has_arc(const LWGEOM *geom);
2195 LWGEOM *lwgeom_stroke(const LWGEOM *geom, uint32_t perQuad);
2196 LWGEOM *lwgeom_unstroke(const LWGEOM *geom);
2261 * @return a newly allocated LWGEOM
2263 extern LWGEOM* lwcurve_linearize(const LWGEOM *geom, double tol, LW_LINEARIZE_TOLERANCE_TYPE type, …
2266 * GEOS proxy functions on LWGEOM
2272 /** Convert an LWGEOM to a GEOS Geometry and convert back -- for debug only */
2273 LWGEOM* lwgeom_geos_noop(const LWGEOM *geom) ;
2275 LWGEOM *lwgeom_normalize(const LWGEOM *geom);
2276 LWGEOM *lwgeom_intersection(const LWGEOM *geom1, const LWGEOM *geom2);
2277 LWGEOM *lwgeom_difference(const LWGEOM *geom1, const LWGEOM *geom2);
2278 LWGEOM *lwgeom_symdifference(const LWGEOM* geom1, const LWGEOM* geom2);
2279 LWGEOM *lwgeom_pointonsurface(const LWGEOM* geom);
2280 LWGEOM *lwgeom_centroid(const LWGEOM* geom);
2281 LWGEOM *lwgeom_union(const LWGEOM *geom1, const LWGEOM *geom2);
2282 LWGEOM *lwgeom_linemerge(const LWGEOM *geom1);
2283 LWGEOM *lwgeom_unaryunion(const LWGEOM *geom1);
2284 LWGEOM *lwgeom_clip_by_rect(const LWGEOM *geom1, double x0, double y0, double x1, double y1);
2285 LWCOLLECTION *lwgeom_subdivide(const LWGEOM *geom, uint32_t maxvertices);
2296 LWGEOM* lwgeom_snap(const LWGEOM* geom1, const LWGEOM* geom2, double tolerance);
2307 LWGEOM* lwgeom_sharedpaths(const LWGEOM* geom1, const LWGEOM* geom2);
2320 LWGEOM* lwgeom_offsetcurve(const LWGEOM *geom, double size, int quadsegs, int joinStyle, double mit…
2328 int lwgeom_is_simple(const LWGEOM *lwgeom);
2332 * PROJ4-dependent extra functions on LWGEOM
2348 int lwgeom_transform(LWGEOM *geom, projPJ inpj, projPJ outpj);
2353 * GEOS-dependent extra functions on LWGEOM
2363 LWGEOM* lwgeom_buildarea(const LWGEOM *geom) ;
2368 LWGEOM* lwgeom_make_valid(LWGEOM* geom);
2377 LWGEOM* lwgeom_split(const LWGEOM* lwgeom_in, const LWGEOM* blade_in);
2383 LWGEOM* lwgeom_node(const LWGEOM* lwgeom_in);
2394 LWGEOM* lwgeom_delaunay_triangulation(const LWGEOM *geom, double tolerance, int32_t edgeOnly);
2405 LWGEOM* lwgeom_voronoi_diagram(const LWGEOM* g, const GBOX* env, double tolerance, int output_edges…
2411 * @param geoms the input array of LWGEOM pointers
2415 int * lwgeom_cluster_2d_kmeans(const LWGEOM **geoms, uint32_t ngeoms, uint32_t k);