PostGIS  2.2.8dev-r@@SVN_REVISION@@
lwgeom_in_gml.c File Reference
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include "postgres.h"
#include "executor/spi.h"
#include "../postgis_config.h"
#include "lwgeom_pg.h"
#include "liblwgeom.h"
#include "lwgeom_transform.h"
Include dependency graph for lwgeom_in_gml.c:

Go to the source code of this file.

Data Structures

struct  struct_gmlSrs
 

Macros

#define XLINK_NS   ((char *) "http://www.w3.org/1999/xlink")
 
#define GML_NS   ((char *) "http://www.opengis.net/gml")
 
#define GML32_NS   ((char *) "http://www.opengis.net/gml/3.2")
 

Typedefs

typedef struct struct_gmlSrs gmlSrs
 

Functions

Datum geom_from_gml (PG_FUNCTION_ARGS)
 
static LWGEOMlwgeom_from_gml (const char *xml)
 Read GML. More...
 
static LWGEOMparse_gml (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML. More...
 
static void gml_lwpgerror (char *msg, int error_code)
 
 PG_FUNCTION_INFO_V1 (geom_from_gml)
 Ability to parse GML geometry fragment and to return an LWGEOM or an error message. More...
 
static bool is_gml_namespace (xmlNodePtr xnode, bool is_strict)
 Return false if current element namespace is not a GML one Return true otherwise. More...
 
static xmlChar * gmlGetProp (xmlNodePtr xnode, xmlChar *prop)
 Retrieve a GML propertie from a node or NULL otherwise Respect namespaces if presents in the node element. More...
 
static bool is_xlink (xmlNodePtr node)
 Return true if current node contains a simple XLink Return false otherwise. More...
 
static xmlNodePtr get_xlink_node (xmlNodePtr xnode)
 Return a xmlNodePtr on a node referenced by a XLink or NULL otherwise. More...
 
static POINTARRAYgml_reproject_pa (POINTARRAY *pa, int srid_in, int srid_out)
 Use Proj4 to reproject a given POINTARRAY. More...
 
static int gml_is_srid_planar (int srid)
 Return 1 if given srid is planar (0 otherwise, i.e geocentric srid) Return -1 if srid is not in spatial_ref_sys. More...
 
static void parse_gml_srs (xmlNodePtr xnode, gmlSrs *srs)
 Parse gml srsName attribute. More...
 
static double parse_gml_double (char *d, bool space_before, bool space_after)
 Parse a string supposed to be a double. More...
 
static POINTARRAYparse_gml_coordinates (xmlNodePtr xnode, bool *hasz)
 Parse gml:coordinates. More...
 
static POINTARRAYparse_gml_coord (xmlNodePtr xnode, bool *hasz)
 Parse gml:coord. More...
 
static POINTARRAYparse_gml_pos (xmlNodePtr xnode, bool *hasz)
 Parse gml:pos. More...
 
static POINTARRAYparse_gml_poslist (xmlNodePtr xnode, bool *hasz)
 Parse gml:posList. More...
 
static POINTARRAYparse_gml_data (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse data coordinates. More...
 
static LWGEOMparse_gml_point (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML point (2.1.2, 3.1.1) More...
 
static LWGEOMparse_gml_line (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML lineString (2.1.2, 3.1.1) More...
 
static LWGEOMparse_gml_curve (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML Curve (3.1.1) More...
 
static LWGEOMparse_gml_linearring (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML LinearRing (3.1.1) More...
 
static LWGEOMparse_gml_polygon (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML Polygon (2.1.2, 3.1.1) More...
 
static LWGEOMparse_gml_triangle (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML Triangle (3.1.1) More...
 
static LWGEOMparse_gml_patch (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML PolygonPatch (3.1.1) More...
 
static LWGEOMparse_gml_surface (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML Surface (3.1.1) More...
 
static LWGEOMparse_gml_tin (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML Tin (and TriangulatedSurface) (3.1.1) More...
 
static LWGEOMparse_gml_mpoint (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse gml:MultiPoint (2.1.2, 3.1.1) More...
 
static LWGEOMparse_gml_mline (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse gml:MultiLineString (2.1.2, 3.1.1) More...
 
static LWGEOMparse_gml_mcurve (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML MultiCurve (3.1.1) More...
 
static LWGEOMparse_gml_mpoly (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML MultiPolygon (2.1.2, 3.1.1) More...
 
static LWGEOMparse_gml_msurface (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML MultiSurface (3.1.1) More...
 
static LWGEOMparse_gml_psurface (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML PolyhedralSurface (3.1.1) Nota: It's not part of SF-2. More...
 
static LWGEOMparse_gml_coll (xmlNodePtr xnode, bool *hasz, int *root_srid)
 Parse GML MultiGeometry (2.1.2, 3.1.1) More...