abassign / Photoscenary

Programs to generate and manipulate photoscenaries for FGFS
GNU General Public License v2.0
14 stars 2 forks source link

SkyVector route parsing not working #63

Closed hbeni closed 8 months ago

hbeni commented 9 months ago

Today I tried to load the GPX export from SkyVector. The route is: https://skyvector.com/?ll=49.82894740601564,7.846984875039195&chart=301&zoom=5&fpl=%20EDGX%204916N00839E%204920N00833E%204922N00824E%204930N00818E%204940N00801E%204947N00739E%204948N00728E%204944N00719E%204951N00655E%204951N00650E%204950N00648E%204951N00646E%20EDRT

Command: julia photoscenary.jl --route /data/EDRT.gpx -p /data/OrtoPhoto/test/ -s 4 --over 1 -r 10

The actiual Julia is 1.9.4 The current version is correct in order to obtain the best performances

Photoscenary.jl ver: 0.4.00 date: 20230523 System prerequisite test

The Photoscenary.jl program has started, it can be stopped with CTRL-C

Photoscenery generator by Julia compilator,
Program for uploading Orthophotos files

Version: ImageMagick 6.9.12-98 Q16 x86_64 18038 https://legacy.imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5) 
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png raw tiff webp wmf x xml zlib

ImageMagic is operative!

Arguments (params) saved in the file: args.txt
  lat  =>  nothing
  latur  =>  0.0
  tile  =>  nothing
  lon  =>  nothing
  over  =>  1
  latll  =>  0.0
  path  =>  /data/OrtoPhoto/test/
  map  =>  1
  nosave  =>  false
  args  =>  nothing
  lonur  =>  0.0
  radius  =>  10.0
  sdwn  =>  0
  connect  =>  nothing
  proxy  =>  nothing
  png  =>  false
  attemps  =>  3
  debug  =>  0
  version  =>  false
  route  =>  /data/EDRT.gpx
  save  =>  nothing
  size  =>  4
  lonll  =>  0.0
  search  =>  nothing
  icao  =>  nothing
  sexagesimal  =>  false

Map server select id: 1 name: ESRI GIS: https://www.esri.com/en-us/about/about-esri/overview (Arcgis)

The program get localization is in ROUTE mode

Error: loadRoute in the route file: /data/EDRT.gpx

Error: processing will stop! The LAT or LON is invalid (exit code 405)
hbeni commented 9 months ago

/data/EDRT.gpx contains:


<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creator="SkyVector" version="1.1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
  <rte>
    <name>EDGX-EDRT</name>
    <rtept lat="49.305000" lon="8.660000">
      <name>EDGX</name>
      <overfly>false</overfly>
    </rtept>
    <rtept lat="49.274973" lon="8.652283">
      <name>SV001</name>
      <overfly>false</overfly>
    </rtept>
    <rtept lat="49.333311" lon="8.557320">
      <name>SV002</name>
      <overfly>false</overfly>
    </rtept>
    <rtept lat="49.369542" lon="8.391838">
      <name>SV003</name>
      <overfly>false</overfly>
    </rtept>
    <rtept lat="49.493240" lon="8.295021">
      <name>SV004</name>
      <overfly>false</overfly>
    </rtept>
    <rtept lat="49.665983" lon="8.012810">
      <name>SV005</name>
      <overfly>false</overfly>
    </rtept>
    <rtept lat="49.787604" lon="7.654381">
      <name>SV006</name>
      <overfly>false</overfly>
    </rtept>
    <rtept lat="49.794253" lon="7.461433">
      <name>SV007</name>
      <overfly>false</overfly>
    </rtept>
    <rtept lat="49.725056" lon="7.319984">
      <name>SV008</name>
      <overfly>false</overfly>
    </rtept>
    <rtept lat="49.842986" lon="6.915550">
      <name>SV009</name>
      <overfly>false</overfly>
    </rtept>
    <rtept lat="49.853834" lon="6.841358">
      <name>SV010</name>
      <overfly>false</overfly>
    </rtept>
    <rtept lat="49.826157" lon="6.804966">
      <name>SV011</name>
      <overfly>false</overfly>
    </rtept>
    <rtept lat="49.845322" lon="6.766668">
      <name>SV012</name>
      <overfly>false</overfly>
    </rtept>
    <rtept lat="49.864167" lon="6.787833">
      <name>EDRT</name>
      <overfly>false</overfly>
    </rtept>
  </rte>
</gpx>
hbeni commented 9 months ago

This fixes the issue for me:

diff --git a/Route.jl b/Route.jl
index 18513ef..3148330 100644
--- a/Route.jl
+++ b/Route.jl
@@ -28,7 +28,7 @@ module Route
         files = Commons.findFile(fileName)
         typeOfFileSelected = Nothing
         for file in files
-            if file[3] > date
+            if file[3] >= date
                 # Test the file
                 try
                     if idTypeOfFile > 0
hbeni commented 8 months ago

Fixed by 1d8654299f36853f in master, thank you!