コード例 #1
0
ファイル: geoRef.py プロジェクト: BPascal-91/geoRef
    import bpaTools
except ImportError:
    ### Include local modules/librairies  ##
    import os
    import sys
    module_dir = os.path.dirname(__file__)
    aixmParserLocalSrc  = "../../aixmParser/src/"
    sys.path.append(os.path.join(module_dir, aixmParserLocalSrc))
    import bpaTools

from frenchConfig import *

###  Context applicatif  ####
appName                 = bpaTools.getFileName(__file__)
appPath                 = bpaTools.getFilePath(__file__)
appVersion              = bpaTools.getVersionFile()
appId                   = appName + " v" + appVersion
inpPath                 = appPath + "../input/"
outPath                 = appPath + "../output/"
logFile                 = outPath + "_" + appName + ".log"


def createGeoJsonFile(sFileSrc, sCountryName, sCountryCode, sCountryIsoCode, sCountryDepCode, oArea, iIdx=-1) -> None:
    if iIdx==-1:
        sName = sCountryName
    elif iIdx>-1 and sCountryName=="France":
        sName = oFranceNames.get(str(iIdx), str(iIdx))
    else:
        sName = str(iIdx)

    #Property for new GeoJSON
コード例 #2
0
#!/usr/bin/env python3

import bpaTools
import aixmReader

if __name__ == '__main__':
    ### Context applicatif
    callingContext = "Paragliding-OpenAir-French-Files"  #Your app calling context
    linkContext = "http://pascal.bazile.free.fr/paraglidingFolder/divers/GPS/OpenAir-Format/"
    appName = "aixmParser"  #or your app name
    appPath = bpaTools.getFilePath(__file__)  #or your app path
    appVersion = bpaTools.getVersionFile()  #or your app version
    appId = appName + " v" + appVersion
    outPath = appPath + "../out/"
    logFile = outPath + "_" + appName + ".log"
    bpaTools.createFolder(outPath)  #Init dossier de sortie

    ####  Source test file  ####
    srcFile = "../tst/aixm4.5_SIA-FR_map-Airspaces.xml"
    #srcFile = "../../poaff/input/BPa/99999999_BPa_Test4CleaningCatalog_aixm45.xml"
    #srcFile = "../../poaff/input/BPa/99999999_BPa_Test4AppendDelta1_aixm45.xml"
    #srcFile = "../../poaff/input/FFVP/20200704_FFVP_ParcsNat_BPa_aixm45.xml"

    ####  quelques options d'appels  ####
    #Simulation des arguments d'appels 'sys.argv' via le tableau 'aArgv'
    #aArgv = [appName, aixmReader.CONST.optHelp]
    #------- tests unitaires ---
    #aArgv = [appName, srcFile, "-Fgeojson", aixmReader.CONST.optTstGeojson, aixmReader.CONST.optDraft]
    #aArgv = [appName, srcFile, "-Fgeojson", aixmReader.CONST.typeAIRSPACES, aixmReader.CONST.optFreeFlight, aixmReader.CONST.optDraft, aixmReader.CONST.optMakePoints4map]
    #------- tests de non-reg ---
    #aArgv = [appName, srcFile, "-Fall", aixmReader.CONST.typeCTRLTOWERS]
コード例 #3
0
ファイル: aixmParser.py プロジェクト: igclib/aixmParser
#!/usr/bin/env python3

import sys
import bpaTools
import aixmReader

### Context applicatif
bpaTools.ctrlPythonVersion()
__AppName__ = bpaTools.getFileName(__file__)
__AppPath__ = bpaTools.getFilePath(__file__)
__AppVers__ = bpaTools.getVersionFile()
___AppId___ = __AppName__ + " v" + __AppVers__
__OutPath__ = __AppPath__ + "../out/"
__LogFile__ = __OutPath__ + "_" + __AppName__ + ".log"
bpaTools.createFolder(__OutPath__)  #Init dossier de sortie


def syntaxe():
    print("Aeronautical Information Exchange Model (AIXM) Converter")
    print(
        "Call: " + __AppName__ +
        " <[drive:][path]filename> <Format> <Type> [<Type2> ... <TypeN>] [<Option(s)>]"
    )
    print("With:")
    print("  <[drive:][path]filename>       AIXM source file")
    print("")
    print("  <Format> - Output formats:")
    print("    " + aixmReader.CONST.frmtGEOJSON +
          "        GeoJSON for GoogleMap")
    print("    " + aixmReader.CONST.frmtOPENAIR +
          "        OpenAir for aeronautical software")
コード例 #4
0
    import bpaTools

import aixmReader
from groundEstimatedHeight import GroundEstimatedHeight

import poaffCst
import geoRefArea
from airspacesCatalog import AsCatalog
from geojsonArea import GeojsonArea
from geojsonTruncature import GeojsonTrunc
from geojson2kml import Geojson2Kml
from openairArea import OpenairArea
from xmlSIA import XmlSIA

###  Context applicatif  ####
aixmParserVersion = bpaTools.getVersionFile(aixmParserLocalSrc)
aixmParserId = poaffCst.aixmParserAppName + " v" + aixmParserVersion
appName = bpaTools.getFileName(__file__)
appPath = bpaTools.getFilePath(__file__)
appVersion = bpaTools.getVersionFile()
appId = appName + " v" + appVersion
outPath = appPath + "../output/"
logFile = outPath + "_" + appName + ".log"

###  Environnement applicatif  ###
poaffOutPath = outPath + poaffCst.cstPoaffOutPath
globalCatalog = poaffOutPath + poaffCst.cstReferentialPath + poaffCst.cstGlobalHeader + poaffCst.cstSeparatorFileName + poaffCst.cstCatalogFileName
globalAsGeojson = poaffOutPath + poaffCst.cstGlobalHeader + poaffCst.cstSeparatorFileName + poaffCst.cstAsAllGeojsonFileName
globalAsOpenair = poaffOutPath + poaffCst.cstGlobalHeader + poaffCst.cstSeparatorFileName + poaffCst.cstAsAllOpenairFileName

###################################