GEOS XML VIEWER
The geos-xml-viewer python package defines tools to read, process, and visualize objects from GEOS input xml file. See Advanced XML Features for a detailed description of the input format.
This package defines multiple console scripts and a vtk ilter associated with a Paraview reader.
Consol scripts
geos-exporter
Reads the xml file and writes a PartionedDataSetCollection file containing all the mesh objects (mesh, wells, boxes) defind in the xml.
Extract Internal wells into VTK files
usage: geos-exporter [-h] -xp XMLFILEPATH [-a ATTRIBUTENAME] [-o OUTPUTNAME]
Named Arguments
- -xp, --xmlFilepath
path to xml file.
Default:
''
- -a, --attributeName
Attribute name.
Default:
'attribute'
- -o, --outputName
name of the output file.
Default:
myPartionedDataSetCollection.vtpc
geos-modifier
Rewrite wells into VTK file and modify the xml file accordingly.
Rewrite wells into VTK file
usage: geos-modifier [-h] -xp XMLFILEPATH [-a ATTRIBUTENAME] -vtpc VTPC
[-o OUTPUTNAME]
Named Arguments
- -xp, --xmlFilepath
path to xml file.
Default:
''
- -a, --attributeName
Attribute name.
Default:
'attribute'
- -vtpc
path to vtpc file.
Default:
''
- -o, --outputName
name of the output file.
Default:
myModifiedPartionedDataSetCollection.vtpc
geos-splitter
Extract Internal wells into VTK files.
Extract Internal wells into VTK files
usage: geos-splitter [-h] -xp XMLFILEPATH --deckName DECKNAME
Named Arguments
- -xp, --xmlFilepath
path to xml file.
Default:
''
- --deckName
name of the deck.
Default:
'test'
geos-viewer
Viewer dedicated to xml mesh objects (mesh, wells, boxes).
Extract Internal wells into VTK files
usage: geos-viewer [-h] -xp XMLFILEPATH [-vtpc VTPCFILEPATH]
[--showmesh | --no-showmesh]
[--showsurfaces | --no-showsurfaces]
[--showboxes | --no-showboxes]
[--showwells | --no-showwells]
[--showperforations | --no-showperforations]
[--clipToBoxes | --no-clipToBoxes]
[--Zamplification ZAMPLIFICATION]
[--attributeName ATTRIBUTENAME]
Named Arguments
- -xp, --xmlFilepath
path to xml file.
Default:
''
- -vtpc, --vtpcFilepath
path to .vtpc file.
Default:
''
- --showmesh, --no-showmesh
show mesh. (default: True)
Default:
True
- --showsurfaces, --no-showsurfaces
show surfaces. (default: True)
Default:
True
- --showboxes, --no-showboxes
show boxes. (default: True)
Default:
True
- --showwells, --no-showwells
show wells. (default: True)
Default:
True
- --showperforations, --no-showperforations
show well perforations. (default: True)
Default:
True
- --clipToBoxes, --no-clipToBoxes
show only mesh elements inside boxes from xml file. (default: True)
Default:
True
- --Zamplification
Z amplification factor.
Default:
1
- --attributeName
Attribute name.
Default:
'attribute'
WIP consol scripts
geos-validate
Validate xml file according to GEOS scheme.
Validate xsd schema
usage: geos-validate [-h] --xsdFilepath XSDFILEPATH
[--xmlFilepath XMLFILEPATH]
Named Arguments
- --xsdFilepath
path to xsd file.
Default:
''
- --xmlFilepath
path to xml file.
Default:
''
vtk filter
Geos deck reader
Vtk reader of GEOS xml file to load or build vtk objects (mesh, wells, boxes).
- class geos_xml_viewer.filters.geosDeckReader.GeosDeckReader[source]
Bases:
VTKPythonAlgorithmBase
VTK GEOS deck reader filter.
- RequestData(request, inInfoVec, outInfoVec)[source]
RequestData function of the vtk pipeline.
- Parameters:
request (vtkInformation) – information about the request
inInfoVec (vtkInformationVector) – input information vector
outInfoVec (vtkInformationVector) – output information vector
- Returns:
Returns 1 if the pipeline is successful
- Return type:
int
Paraview plugin
Geos Deck Reader
Paraview plugin of Geos Deck Reader.
PVGeosDeckReader is a Paraview plugin to load and create mesh objects from GEOS xml input file.
Utilities
geos_xml_viewer.algorithms.deck
- class geos_xml_viewer.algorithms.deck.SimulationDeck(file_path, xml_root)[source]
Create new instance of SimulationDeck(file_path, xml_root)
- file_path
Alias for field number 0
- xml_root
Alias for field number 1
- class geos_xml_viewer.algorithms.deck.TreeViewNodeType(value)[source]
An enumeration.
- PERFORATION = 10
- PROPERTIES = 3
- REPRESENTATION = 2
- TIMESERIES = 9
- UNKNOWN = 1
- WELLBORECHANNEL = 6
- WELLBORECOMPLETION = 8
- WELLBOREFRAME = 5
- WELLBOREMARKER = 7
- WELLBORETRAJECTORY = 4
- geos_xml_viewer.algorithms.deck.build_model(d, collection, attr)[source]
_summary_
- Parameters:
d (SimulationDeck) – _description_
collection (vtk.vtkPartitionedDataSetCollection) – _description_
attr (str) – _description_
- Returns:
_description_
- Return type:
_type_
- geos_xml_viewer.algorithms.deck.format_attribute(attribute_indent, ka, attribute_value)[source]
Format xml attribute strings
- Parameters:
attribute_indent (str) – Attribute indent string
ka (str) – Attribute name
attribute_value (str) – Attribute value
- Returns:
Formatted attribute value
- Return type:
str
- geos_xml_viewer.algorithms.deck.format_deck(input_fname, indent_size=2, indent_style=False, block_separation_max_depth=2, alphebitize_attributes=False, close_style=False, namespace=False)[source]
Script to format xml files
- Parameters:
input_fname (str) – Input file name
indent_size (int) – Indent size
indent_style (bool) – Style of indentation (0=fixed, 1=hanging)
block_separation_max_depth (int) – Max depth to separate xml blocks
alphebitize_attributes (bool) – Alphebitize attributes
close_style (bool) – Style of close tag (0=same line, 1=new line)
namespace (bool) – Insert this namespace in the xml description
- geos_xml_viewer.algorithms.deck.format_xml(tree, indent_size=2, indent_style=False, block_separation_max_depth=2, alphebitize_attributes=False, close_style=False, namespace=False)[source]
- geos_xml_viewer.algorithms.deck.format_xml_level(output, node, level, indent=' ', block_separation_max_depth=2, modify_attribute_indent=False, sort_attributes=False, close_tag_newline=False, include_namespace=False)[source]
Iteratively format the xml file
- Parameters:
output (file) – the output text file handle
node (lxml.etree.Element) – the current xml element
level (int) – the xml depth
indent (str) – the xml indent style
block_separation_max_depth (int) – the maximum depth to separate adjacent elements
modify_attribute_indent (bool) – option to have flexible attribute indentation
sort_attributes (bool) – option to sort attributes alphabetically
close_tag_newline (bool) – option to place close tag on a separate line
include_namespace (bool) – option to include the xml namespace in the output