Smrender
 All Data Structures Files Functions Variables Macros
Data Structures | Macros | Functions
smosmout.c File Reference
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <errno.h>
#include "smrender.h"
#include "smcore.h"
#include "rdata.h"
Include dependency graph for smosmout.c:

Data Structures

struct  ostream
 

Macros

#define TBUFLEN   24
 

Functions

int bs_safe_put_xml (FILE *f, const bstring_t *b)
 
int print_onode (FILE *f, const osm_obj_t *o)
 
int print_tree (osm_obj_t *o, struct ostream *os)
 
size_t save_osm0 (FILE *f, bx_node_t *tree, const struct bbox *bb, const char *info)
 
size_t save_osm (const char *s, bx_node_t *tree, const struct bbox *bb, const char *info)
 

Detailed Description

This file contains the functions for output of XML/OSM data.

Author
Bernhard R. Fischer

Function Documentation

int bs_safe_put_xml ( FILE *  f,
const bstring_t b 
)

Safely output a literal string, i.e. it replaces '<' and '"'.

Returns
It returns the number of bytes written.
size_t save_osm ( const char *  s,
bx_node_t tree,
const struct bbox bb,
const char *  info 
)

Save OSM data of tree to file s.

Parameters
sFilename of output file.
Pointerto bxtree containing the information.
bbOptional bounding box (written to tag <bounds>).
infoOptional information written to the header as comment ().
Returns
The function returns 0, or -1 in case of error.
size_t save_osm0 ( FILE *  f,
bx_node_t tree,
const struct bbox bb,
const char *  info 
)

Save OSM data of tree to file f.

Parameters
sFILE handle of output file.
Pointerto bxtree containing the information.
bbOptional bounding box (written to tag <bounds>).
infoOptional information written to the header as comment ().
Returns
The function returns 0.