XML templates for windPRO projects: Difference between revisions

From Wiki-WindPRO
Jump to navigation Jump to search
Line 312: Line 312:


Very basic sample XML file: [[:File:WP_XML_Very_Basic.zip]]
Very basic sample XML file: [[:File:WP_XML_Very_Basic.zip]]
Small sample with background map and a line object: [[File:Sample.zip]]

Revision as of 12:38, 29 January 2018

Purpose

This page describes an XML file used to set up initial data for a windPRO project


Disclaimer

This windPRO feature is still in an experimental stage. The XML format relies heavily on the internal structures of windPRO and can be changed from version to version.


Use

The XML template can be created or edited in any tool, either a simple text editor or specialized XML editor. The XML template can be used as argument to a command line launch of windPRO or selected in an open dialog.

Command line launch

windPRO can be launched from a command line (or batch file) as:

wpstart /P=xxxx.xml

Notice that windPRO must be shut down. There is currently no support for creating a new project in a running instance of windPRO.

Open XML template

From a running instance of windPRO, an XML template can be selected in the Open dialog. Note that XML can't be selected as file type, the user must either type the full file name or *.xml and search for the XML template


Format of XML template

The current supported format is described. The format may be enhanced or changed in the future.

Main structure

<?xml version="1.0" ?>
<WindPROProjectInitialize >
  <Filename>c:\Windpro data\projects\newtest.w32p</Filename>
  <Maindata/>
  <Layers/>
  <Objects/>
</WindPROProjectInitialize>

Filename

File name for the new project. <Filename>Full file name (*.w32p)</Filename>

Maindata

The Maindata tag contains the data from WindPRO project properties.

<Name>Project name</Name>
  <Country>2 letter country ID</Country>
  <SitePosEast>Site center longitude WGS 84 datum</SitePosEast>
  <SitePosNorth>Site center latitude WGS 84 datum</SitePosNorth>
  <TimeZone>Time zone in Windows notation (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones)</TimeZone>
  <DefaultSystem1>Coordinate system used in GUI</DefaultSystem1>
  <ViewDatum>Datum, only for geographical coordinate system </ViewDatum>
  <Zone>Zone for coordinate system, if needed</Zone>
  <LatNorth>true for latitude positive north, false for positive south</LatNorth>
  <LongEast> true for longitude positive east, false for positive west</LongEast>
  <SiteDescription >Site description </SiteDescription >
  <MapColl> Collection of background maps, two types are supported
  <Item>
    <MapID>Negative integer, must be unique for each map</MapID>
    <FormatID>For bitmap files with ESRI world file: 10003 </FormatID>
    <Path>Full file name for bitmap file (*.tif, *.jpg etc </Path>
    <ScaleInt>Scale of map as integer, e.g. 25000</ScaleInt>
    <Text>Map name</Text>
    <System>Coordinate system in world file</System>
    <Datum>Datum in world file</Datum>
    <Zone>Zone in world file</Zone>
  </Item>
  <Item>/
    <FormatID>For WindPRO *.bmi files: 10001</FormatID>
    <Path>Full file name for *.bmi file</Path>
    <Text>Map name</Text>
  </Item>
  </MapColl>


Layers

List of layers

<Layers>
  <Name>Layer 1</Name>
  <Name>Layer 2</Name>
  ...
</Layers> 

Objects

List of objects, only general properties are set

<Objects>
  <Item>
    <ObjTypeID>Object type, see appendix</ObjTypeID>
    <UserDescription >Description</UserDescription >
    <UserLabel >User label</UserLabel >
    <X>Longitude in WGS 84</X>
    <Y>Latitude in WGS 84</Y>
    <Layer>Layer 1</Layer>
    <PosLocked>true</PosLocked><SymbolLabelSetup>slUserLabel</SymbolLabelSetup>
  </Item>
</Objects>

Object specific properties

On selected objects it is possible to set specific properties. Here is a few samples: Line object

<Item>
  <ObjTypeID>HCData</ObjTypeID>
  <UserDescription>Description</UserDescription >
  <UserLabel>User label</UserLabel >
  <X>Longitude in WGS 84</X>
  <Y>Latitude in WGS 84</Y>
  <SpecificData>
  <Filename>Filename (*.wpo or *.map)</Filename>
  <System>Rectangular coordinate system if *.map</System>
  <Zone>Zone if needed</Zone>
  <UseAsTIN>True</UseAsTIN>
  </SpecificData>
</Item>

WTG object

<Item>
  <ObjTypeID>NewWTG|ExistWTG</ObjTypeID>
  <UserDescription >Description</UserDescription >
  <UserLabel >User label</UserLabel >
  <X>Longitude in WGS 84</X>
  <Y>Latitude in WGS 84</Y>
  <SpecificData>
  <WTGUID>
  <Filename>File name (*.wtg or *.xml Note: special xml WTG format</Filename>
  <Hubheight>Hub height</Hubheight>
  </WTGUID>
  </SpecificData>
</Item>


Site data object (Statgen)

<Item>
  <ObjTypeID>SiteData</ObjTypeID>
  <UserDescription>SiteData</UserDescription>
  <UserLabel>Site data object for Statgen</UserLabel>
  <X>9.963361</X>
  <Y>57.030325</Y>
  <Layer>General data</Layer>
  <SpecificData>
  <ObjUse>ouStatgen</ObjUse>
  <NoSectors>16</NoSectors>
  </SpecificData>
</Item>

Site data object (WAsP)

<Item>
<ObjTypeID>SiteData</ObjTypeID>
  <UserDescription>SiteData</UserDescription>
  <UserLabel>Site data object for WAsP</UserLabel>
  <X>9.963361</X>
  <Y>57.030325</Y>
  <Layer>General data</Layer>
  <SpecificData>
  <ObjUse>ouWasp</ObjUse>
  <Windstatistics>
  <Item>
    <Name>c:\tmp\AutoTest\DK MetStationName2 - 42,00 m.wws</Name>
  </Item>
  </Windstatistics>
  </SpecificData>
</Item>

Calculations

List of calculations to create

<Calculations>
  <Item>
    <ModuleNumber>Module ID, see list</ModuleNumber>
    <CalcIndex>Calculation ID, see list</CalcIndex>
    <SpecificData>
    <Name>Name of calculation</Name>
    <AdvancedOptionsEnabled>True</AdvancedOptionsEnabled>
    <CalcHalfDiameter>True</CalcHalfDiameter>
    <KeyHubheight>50</KeyHubheight>
    <AirDensityCorrMethod>3</AirDensityCorrMethod>
    <AirDen_DoNotUpdateAtWTGPositions>True</AirDen_DoNotUpdateAtWTGPositions>
    <Objects>
    <Item>
      <ObjTypeID>Object type, see list</ObjTypeID>
      <Layer>Name of layer, all objects of ObjTypeID in this layer are used</Layer>
    </Item>
    </Objects>
  </SpecificData>
  <RunCalculation>true/false</RunCalculation>
  </Item>
<Calculations>
<Item>
<ModuleNumber>Module ID, see list</ModuleNumber>
<CalcIndex>Calculation ID, see list</CalcIndex>
<SpecificData>
<Name>Name of calculation</Name>
<AdvancedOptionsEnabled>True</AdvancedOptionsEnabled>
<CalcHalfDiameter>True</CalcHalfDiameter>
<KeyHubheight>50</KeyHubheight>
<AirDensityCorrMethod>3</AirDensityCorrMethod>
<AirDen_DoNotUpdateAtWTGPositions>True</AirDen_DoNotUpdateAtWTGPositions>
<Objects><Item>
<ObjTypeID>Object type, see list</ObjTypeID>
<UserLabel>Use object of type ObjTypeID with this user label</UserLabel>
</Item>
</Objects>
</SpecificData>
<RunCalculation>true/false</RunCalculation>
</Item>

Lists

Object types

NewWTG (New WTG)
ExistWTG (Existing WTG)
SiteData (Site data)
Obstacle (Obstacle)
NSA (Noise sensitive area)
MeteoObjectData (Meteorological data)
Shadow (Shadow receptor)
CtrlPoint (Control point)
Camera (Camera)
HCData (Line object)
Obj3DData (3D Object)
AreaObj (Area object)
WTGnet (Park design)
WTGareas (WTG area)
UsrTextData (User text)
Ruler (Ruler)
VR (3DA Object)
Shape (Shape)
EGrid (EGrid)
BusBar (Bus bar)
Transformer (Transformer)
ExtGrid (External grid)
ELoad (Electric load)
RadarObject (Radar object)

Coordinate systems

Only the most used systems are shown

c100001: Geographic format: sddd°mm'ss.ss"
c100032: Geographic format: sddd°mm.mmm'
c100006: Geographic format: sddd.dddd°
c100003: UTM
c100002: Gauss Krüger (Bessel)

Datums

Datums do not need to be specified for Gauss Krüger (Bessel).

d1010: WGS 84
d1031: ED 50 (DK)

Calculation module ID and calculation ID

110,7: Basis
111,0: Windbank
116,0: eGrid
118,0: Loss & uncertainty
117,0: MCP
110,13: Meteo
110,14: Atlas
110,18: CFD Interface
110,6: Resource
110,12: WAsP interface
110,1: Park
110,3: Statgen
110,2: Decibel
110,9: Impact
119,0: Nord2000
110,4: Shadow
110,15: ZVI
120,0: Site compliance
110,10: Optimize

Samples

To use these

  • Download and unzip
  • Replace all file paths (c:\tmp) with the appropriate path on your computer


Very basic sample XML file: File:WP_XML_Very_Basic.zip Small sample with background map and a line object: File:Sample.zip