Vizitown
 All Classes Namespaces Files Functions Variables
vizitown_plugin.vt_utils_converter.PostgisToJSON Class Reference

Class PostgisToJSON Converts an X3D formats in a json. More...

Collaboration diagram for vizitown_plugin.vt_utils_converter.PostgisToJSON:
Collaboration graph

Public Member Functions

def __init__
 Constructor. More...
 
def parse
 parse method Manage the process in the class and use the appropriate process in function of the data More...
 

Static Public Member Functions

def remove_comma
 remove_comma static method Delete the comma in a string the string to transform More...
 

Public Attributes

 nbPointVertice
 
 noHeight
 
 geometry
 
 hasH
 
 color
 
 uuid
 

Private Member Functions

def _replace_metadata
 _replace_metadata method Change the metadata by another information More...
 
def _get_data
 _get_data method Getter to access to the data and associated information More...
 
def _parse_point
 _parse_point method Parse a point data More...
 
def _parse_line
 _parse_line method Parse a line data More...
 
def _parse_polygon
 _parse_polygon method Parse a polygon or multipolygon data More...
 
def _get_polygon_point
 _get_polygon_point method Select a points with a polygon to define a polygon More...
 
def _parse_triangle
 _parse_triangle method Parse a triangle data More...
 
def _get_vertices
 _get_vertices method Getter of vertex data More...
 
def _count_vertice
 _count_vertice method Count the number of vertex More...
 
def _get_json_geom
 _get_json_geom method Getter of a geo json data More...
 
def _get_json_threejs
 _get_json_threejs method Getter a threejs json data More...
 

Private Attributes

 _jsonThreejs
 
 _jsonExchange
 
 _jsonGeom
 

Detailed Description

Class PostgisToJSON Converts an X3D formats in a json.

Constructor & Destructor Documentation

def vizitown_plugin.vt_utils_converter.PostgisToJSON.__init__ (   self)

Constructor.

Member Function Documentation

def vizitown_plugin.vt_utils_converter.PostgisToJSON._count_vertice (   self,
  vertices 
)
private

_count_vertice method Count the number of vertex

Parameters
verticesstock a vertex number
Returns
a number of vertex
def vizitown_plugin.vt_utils_converter.PostgisToJSON._get_data (   self,
  result,
  hasH 
)
private

_get_data method Getter to access to the data and associated information

Parameters
result
hasH
Returns
the data
def vizitown_plugin.vt_utils_converter.PostgisToJSON._get_json_geom (   self,
  pointArray,
  height 
)
private

_get_json_geom method Getter of a geo json data

Parameters
pointArraywith the several point with coordinates
heightto add an information of elevation
Returns
a geojson file
def vizitown_plugin.vt_utils_converter.PostgisToJSON._get_json_threejs (   self,
  nbFaces,
  nbVertices,
  faces,
  vertices 
)
private

_get_json_threejs method Getter a threejs json data

Parameters
nbFacesto define the number of faces
nbVerticesto define the number of vertex
facesstock a faces values
verticesstock a vertex values
Returns
a threejs json file
def vizitown_plugin.vt_utils_converter.PostgisToJSON._get_polygon_point (   self,
  polygon 
)
private

_get_polygon_point method Select a points with a polygon to define a polygon

Returns
an array with the vertices of the polygon
def vizitown_plugin.vt_utils_converter.PostgisToJSON._get_vertices (   self,
  xmldoc 
)
private

_get_vertices method Getter of vertex data

Parameters
xmldocto stock the data
Returns
a specific vertex
def vizitown_plugin.vt_utils_converter.PostgisToJSON._parse_line (   self,
  dataArray 
)
private

_parse_line method Parse a line data

Parameters
dataArrayto stock the data
Returns
a json file
def vizitown_plugin.vt_utils_converter.PostgisToJSON._parse_point (   self,
  dataArray 
)
private

_parse_point method Parse a point data

Parameters
dataArrayto stock the data
Returns
a json file
def vizitown_plugin.vt_utils_converter.PostgisToJSON._parse_polygon (   self,
  dataArray 
)
private

_parse_polygon method Parse a polygon or multipolygon data

Parameters
dataArrayto stock the data
Returns
a json file
def vizitown_plugin.vt_utils_converter.PostgisToJSON._parse_triangle (   self,
  dataArray 
)
private

_parse_triangle method Parse a triangle data

Parameters
stringto stock the data
Returns
a json file
def vizitown_plugin.vt_utils_converter.PostgisToJSON._replace_metadata (   self,
  exchange 
)
private

_replace_metadata method Change the metadata by another information

Parameters
exchangethe new information
Returns
the new metadata
def vizitown_plugin.vt_utils_converter.PostgisToJSON.parse (   self,
  resultArray,
  geometry,
  hasH,
  color,
  uuid 
)

parse method Manage the process in the class and use the appropriate process in function of the data

Parameters
resultArrayto stock the data
geometryto check the type of geometry
hasHto define the representation of data
colorto define the color of data
uuidto define the identifiant of data
Returns
a json
def vizitown_plugin.vt_utils_converter.PostgisToJSON.remove_comma (   string)
static

remove_comma static method Delete the comma in a string the string to transform

Returns
the string after the process

Member Data Documentation

vizitown_plugin.vt_utils_converter.PostgisToJSON._jsonExchange
private
vizitown_plugin.vt_utils_converter.PostgisToJSON._jsonGeom
private
vizitown_plugin.vt_utils_converter.PostgisToJSON._jsonThreejs
private
vizitown_plugin.vt_utils_converter.PostgisToJSON.color
vizitown_plugin.vt_utils_converter.PostgisToJSON.geometry
vizitown_plugin.vt_utils_converter.PostgisToJSON.hasH
vizitown_plugin.vt_utils_converter.PostgisToJSON.nbPointVertice
vizitown_plugin.vt_utils_converter.PostgisToJSON.noHeight
vizitown_plugin.vt_utils_converter.PostgisToJSON.uuid

The documentation for this class was generated from the following file: