PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ lwgeom_from_wkt()

LWGEOM* lwgeom_from_wkt ( const char *  wkt,
const char  check 
)
Parameters
wktWKT string
checkparser check flags, see LW_PARSER_CHECK_* macros

Definition at line 904 of file lwin_wkt.c.

References struct_lwgeom_parser_result::geom, LW_FAILURE, lwerror(), lwgeom_parse_wkt(), struct_lwgeom_parser_result::message, and r.

Referenced by assert_empty_diagram(), basic_test(), buildarea1(), buildarea2(), buildarea3(), buildarea4(), buildarea4b(), buildarea5(), buildarea6(), buildarea7(), check_dimension(), cu_twkb(), cu_twkb_idlist(), cu_wkb(), cu_wkt(), do_encoded_polyline_test(), do_fn_test(), do_geojson_test(), do_geojson_unsupported(), do_geom_test(), do_gml2_extent_test(), do_gml2_test(), do_gml2_test_prefix(), do_gml2_unsupported(), do_gml3_extent_test(), do_gml3_test(), do_gml3_test_nodims(), do_gml3_test_opts(), do_gml3_test_prefix(), do_kml_test(), do_kml_test_prefix(), do_kml_unsupported(), do_lwgeom_flip_coordinates(), do_median_dims_check(), do_median_test(), do_svg_test(), do_svg_unsupported(), do_test_lwgeom_effectivearea_lines(), do_test_lwgeom_effectivearea_polys(), do_test_mindistance_tolerance(), do_type_test(), do_x3d3_test(), do_x3d3_unsupported(), line2pts(), lwgeom_over_gserialized(), polyhedralsurface_parse(), test_cannot_modify_read_only(), test_clone(), test_empty(), test_gbox_same_2d(), test_gbox_utils(), test_geohash(), test_geos_linemerge(), test_geos_noop(), test_geos_subdivide(), test_grid(), test_gserialized_from_lwgeom(), test_gserialized_from_lwgeom_size(), test_gserialized_get_gbox_geocentric(), test_gserialized_is_empty(), test_gserialized_peek_gbox_p_fails_for_unsupported_cases(), test_gserialized_peek_gbox_p_gets_correct_box(), test_gserialized_peek_gbox_p_no_box_when_empty(), test_isclosed(), test_lwcollection_extract(), test_lwgeom_area_sphere(), test_lwgeom_as_curve(), test_lwgeom_calculate_gbox(), test_lwgeom_clip_by_rect(), test_lwgeom_clone(), test_lwgeom_count_vertices(), test_lwgeom_delaunay_triangulation(), test_lwgeom_distance_sphere(), test_lwgeom_force_clockwise(), test_lwgeom_free(), test_lwgeom_from_gserialized(), test_lwgeom_is_empty(), test_lwgeom_is_trajectory(), test_lwgeom_locate_along(), test_lwgeom_make_valid(), test_lwgeom_node(), test_lwgeom_same(), test_lwgeom_scale(), test_lwgeom_segmentize2d(), test_lwgeom_segmentize_sphere(), test_lwgeom_simplify(), test_lwgeom_split(), test_lwgeom_tcpa(), test_lwgeom_voronoi_diagram(), test_lwgeom_voronoi_diagram_custom_envelope(), test_lwgeom_wrapx(), test_lwline_clip(), test_lwline_crossing_bugs(), test_lwline_crossing_long_lines(), test_lwline_from_lwmpoint(), test_lwline_split_by_point_to(), test_lwmline_clip(), test_lwpoly_covers_point2d(), test_lwprint_assert_error(), test_lwprint_assert_format(), test_misc_area(), test_misc_count_vertices(), test_misc_force_2d(), test_misc_simplify(), test_mixed_rw_access(), test_modification(), test_no_memory_leaked_when_iterator_is_partially_used(), test_on_gser_lwgeom_count_vertices(), test_ordering(), test_point_count(), test_point_density(), test_ptarray_contains_point_sphere(), test_ptarray_contains_point_sphere_iowa(), test_rect_tree_contains_point(), test_rect_tree_intersects_tree(), test_sfcgal_noop(), test_spheroid_area(), test_tree_circ_create(), test_tree_circ_distance(), test_tree_circ_distance_threshold(), test_tree_circ_pip(), test_tree_circ_pip2(), tin_parse(), triangle_parse(), and WKTARRAY2LWGEOM().

905 {
907 
908  if( LW_FAILURE == lwgeom_parse_wkt(&r, (char*)wkt, check) )
909  {
910  lwerror(r.message);
911  return NULL;
912  }
913 
914  return r.geom;
915 }
char * r
Definition: cu_in_wkt.c:24
#define LW_FAILURE
Definition: liblwgeom.h:79
int lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int parse_flags)
Parse a WKT geometry string into an LWGEOM structure.
Parser result structure: returns the result of attempting to convert (E)WKT/(E)WKB to LWGEOM...
Definition: liblwgeom.h:2020
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
Here is the call graph for this function: