Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates and bug fixes #269

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
059ca52
initial commit
shred86 Jun 3, 2024
155ffdf
save custom_dem and fill_nodata to global cfg and clean up unused met…
shred86 Jun 4, 2024
c495573
add dependencies for windows and initial commit for .bat
shred86 Jun 4, 2024
1f150c8
update windows bat files
shred86 Jun 5, 2024
0dd91ee
separate requirements for win based on gdal version issue
shred86 Jun 5, 2024
432262a
clean up windows install batch
shred86 Jun 5, 2024
1ebb13d
support for pyinstaller
shred86 Jun 5, 2024
ae50f19
Merge pull request #3 from shred86/dev
shred86 Jun 5, 2024
bc92fc9
fix issue with convert_texture
shred86 Jun 6, 2024
92fc5b5
Merge pull request #5 from shred86/dev
shred86 Jun 6, 2024
27c1f7f
separate O4XP data from libraries when using PyInstaller
shred86 Jun 7, 2024
939f1ce
Merge pull request #6 from shred86/dev
shred86 Jun 7, 2024
32ca9e7
add zoom level asterik
shred86 Jun 8, 2024
b409bed
typo and wording
shred86 Jun 8, 2024
ce3f8b1
auto remove symlink on tile deletion
shred86 Jun 8, 2024
ba472a0
single requirements and update windows bat
shred86 Jun 9, 2024
eb4c0c1
Merge pull request #7 from shred86/dev
shred86 Jun 10, 2024
38d9bdb
fix zone_list issue with tile configuration
shred86 Jun 10, 2024
cd54573
add accidently removed changes from previous merge
shred86 Jun 10, 2024
a14f356
add versioning and save on exit
shred86 Jun 10, 2024
be0611a
update readme with changes
shred86 Jun 10, 2024
de578aa
Merge pull request #10 from shred86/dev
shred86 Jun 10, 2024
428f3c2
include gdal for linux
shred86 Jun 10, 2024
eb79f95
Merge pull request #13 from shred86/dev
shred86 Jun 10, 2024
103a0a5
fix console feedback placement and verbosity in try statement
shred86 Jun 10, 2024
bc7776f
add batch delete for cached data
shred86 Jun 11, 2024
0ca8ef5
Use os.path.join for data path
ColinM9991 Jun 13, 2024
dbece9f
initial commit for config window restructure
shred86 Jun 13, 2024
5f6b3db
Merge pull request #16 from ColinM9991/bugfix/ortho-data-path
shred86 Jun 14, 2024
2031ff9
Use os.path.join for data path
ColinM9991 Jun 13, 2024
af7e8a7
Use os.path.join for data path
ColinM9991 Jun 13, 2024
ca3fa44
auto load tile config, bug fixes, confirm dialog for removing zones
shred86 Jun 15, 2024
142017e
update cfg_vars, fix global_cfg issue, readability changes, more fixes
shred86 Jun 15, 2024
690dfc7
remove global_cfg dict and use globals, clean up cfg_vars
shred86 Jun 15, 2024
7ba4d29
clean up popup window
shred86 Jun 15, 2024
9dfd3b6
add tile zone fix to Tile class, minor visual tweaks
shred86 Jun 16, 2024
a84efee
Merge pull request #18 from shred86/config_window_update
shred86 Jun 16, 2024
087c9a5
fix tab loading issue, move protocol method, minor visual tweaks, bum…
shred86 Jun 16, 2024
c9a9ca5
add unsaved changes check, custom_dem fix, create default config
shred86 Jun 17, 2024
a4b3feb
prompt only if tile has zones on reset
shred86 Jun 17, 2024
f70ab39
info debug level by default
shred86 Jun 17, 2024
1ccf9e4
set value types before comparing
shred86 Jun 18, 2024
309c25c
Merge pull request #19 from shred86/dev
shred86 Jun 18, 2024
607c036
backup cfg buttons, always use tile config by default, override tile …
shred86 Jun 20, 2024
8f5c499
tile tab config status text and field availability update
shred86 Jun 20, 2024
11f568f
readme updates, text updates, bump to version 1.40.03
shred86 Jun 20, 2024
997aa44
fix method called for closing config window
shred86 Jun 20, 2024
520d745
Merge pull request #22 from shred86/dev
shred86 Jun 20, 2024
907ee04
fix for cfg state listener
shred86 Jun 21, 2024
5b5eb06
fix issue with cancel on close_window
shred86 Jun 21, 2024
9b52a6e
revert cfg_var changes
shred86 Jun 21, 2024
33e6107
check unsaved changes on all build options, add viewfinder panoramas …
shred86 Jun 29, 2024
5ba60ab
fix for lat lon variables
shred86 Jun 29, 2024
97afd19
Merge pull request #25 from shred86/dev
shred86 Jun 29, 2024
8b06f93
check unsaved changes on app close, fix viewfinderpanorama
shred86 Jun 29, 2024
fdb7a6a
add symlink to overlays
shred86 Jun 30, 2024
e56fc4e
update readme and minor code clean up
shred86 Jun 30, 2024
9af6496
Merge pull request #31 from shred86/dev
shred86 Jun 30, 2024
4dc253c
fix Here provider API key
shred86 Jul 1, 2024
d1f9c11
Account for new sea tiles
andrewpucci Jul 1, 2024
72a6bca
Merge pull request #35 from andrewpucci/fix-33
shred86 Jul 2, 2024
6181f80
remove image sources no longer available
shred86 Jul 2, 2024
1cf5df3
update readme and bump version
shred86 Jul 5, 2024
9eafb99
fix path space issue on Windows
shred86 Jul 8, 2024
4fdf600
remove FR OSM server, update to https
shred86 Jul 9, 2024
3395319
update OSM RU overpass server, and default to KU
shred86 Jul 9, 2024
1695bd7
include 7zz for mac, update copyright, default imprint_mask_to_dds to…
shred86 Jul 20, 2024
5747a80
random OSM server selection
shred86 Nov 26, 2024
d06b7b3
fix url_template for EOX
shred86 Nov 26, 2024
6a19fab
fix mouse right-click for macOS
shred86 Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Binary/
build/
dist/
Elevation_data/
Geotiffs/
Masks/
Expand All @@ -9,9 +11,12 @@ Previews/
Extents/Auto
tmp/
Tiles/
venv/
**/Ortho4XP.log
**/__pycache__
**/Thumbs.db
**/*.bak
**/*.swp
*.spec
.last_gui_params.txt
.DS_Store
87 changes: 0 additions & 87 deletions Install_Instructions.txt

This file was deleted.

59 changes: 42 additions & 17 deletions Licence/copyright.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,22 @@ http://dev.x-plane.com/cgit/cgit.cgi/xptools.git/

------------------------------------------------------------------------------
7-Zip
Igor Pavlov

~~~~~
License for use and distribution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

7-Zip Copyright (C) 1999-2018 Igor Pavlov.

Licenses for files are:
7-Zip Copyright (C) 1999-2023 Igor Pavlov.

1) 7z.dll: GNU LGPL + unRAR restriction
2) All other files: GNU LGPL
The licenses for 7zz and 7zzs files are:

The GNU LGPL + unRAR restriction means that you must follow both
GNU LGPL rules and unRAR restriction rules.
- The "GNU LGPL" as main license for most of the code
- The "GNU LGPL" with "unRAR license restriction" for some code
- The "BSD 3-clause License" for some code

Redistributions in binary form must reproduce related license information from this file.

Note:
You can use 7-Zip on any computer, including a computer in a commercial
Note:
You can use 7-Zip on any computer, including a computer in a commercial
organization. You don't need to register or pay for 7-Zip.


Expand All @@ -90,21 +88,48 @@ GNU LGPL information
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You can receive a copy of the GNU Lesser General Public License from
You can receive a copy of the GNU Lesser General Public License from
http://www.gnu.org/

BSD 3-clause License
--------------------

The "BSD 3-clause License" is used for the code in 7z.dll that implements LZFSE data decompression.
That code was derived from the code in the "LZFSE compression library" developed by Apple Inc,
that also uses the "BSD 3-clause License":

----
Copyright (c) 2015-2016, Apple Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder(s) nor the names of any contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----

unRAR restriction
-----------------
unRAR license restriction
-------------------------

The decompression engine for RAR archives was developed using source
The decompression engine for RAR archives was developed using source
code of unRAR program.
All copyrights to original unRAR code are owned by Alexander Roshal.

The license for original unRAR code has the following restriction:

The unRAR sources cannot be used to re-create the RAR compression algorithm,
which is proprietary. Distribution of modified unRAR sources in separate form
The unRAR sources cannot be used to re-create the RAR compression algorithm,
which is proprietary. Distribution of modified unRAR sources in separate form
or as a part of other software is permitted, provided that it is clearly
stated in the documentation and source comments that the code may
not be used to develop a RAR (WinRAR) compatible archiver.
Expand Down
1 change: 0 additions & 1 deletion Ortho4XP.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
IMG.initialize_combined_providers_dict()
if len(sys.argv)==1: # switch to the graphical interface
Ortho4XP = GUI.Ortho4XP_GUI()

Ortho4XP.mainloop()
print("Bon vol!")
else: # sequel is only concerned with command line
Expand Down
5 changes: 2 additions & 3 deletions Providers/Global/EOX.lay
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
request_type=tms
grid_type=webmercator
url_template=https://{switch:a,b,c,d}.s2maps-tiles.eu/wmts/?layer=s2cloudless_3857&style=default&tilematrixset=GoogleMapsCompatible&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fjpeg&TileMatrix={zoom}&TileCol={x}&TileRow={y}
url_template=https://{switch:a,b,c,d}.tiles.maps.eox.at/wmts/?layer=s2cloudless-2023_3857&style=default&tilematrixset=GoogleMapsCompatible&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fjpeg&TileMatrix={zoom}&TileCol={x}&TileRow={y}
max_zl=14
imagery_dir=grouped

imagery_dir=grouped
5 changes: 0 additions & 5 deletions Providers/Global/EOX2.lay

This file was deleted.

2 changes: 0 additions & 2 deletions Providers/Global/Mapbox.lay

This file was deleted.

6 changes: 0 additions & 6 deletions Providers/Global/Maxar.lay

This file was deleted.

2 changes: 1 addition & 1 deletion Providers/O4_Custom_URL.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get_Here_value():
Here_value="loading"
js_path=str(requests.get('https://wego.here.com').content).split('<script defer="defer" src="')[1][:100].split('"')[0]
print("js_path: "+js_path)
Here_value=str(requests.get('https://wego.here.com'+js_path).content).split('APP_KEY:"')[1][:100].split('"')[0]
Here_value=str(requests.get('https://wego.here.com'+js_path).content).split('PLATFORM_API_KEY:"')[1][:100].split('"')[0]
print("Here_value: "+Here_value)
Here_time=time.time()
return Here_value
Expand Down
96 changes: 65 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,66 @@
# Ortho4XP
A scenery generator for the X-Plane flight simulator.

NOTE 15/02/2024 : In transition to version 1.40.

Version 1.40 is mostly a compatibility update for XP 12 water requirements.
Some newer code related to 3D waterbed rendering is included, but one will have
to wait for XP 12.1 to potentially revise it. The default setting is XP11 (i.e.
overlay based ) water rendering + bathymetry for 3D water and physics plane interaction.
The new Ortho4XP tiles also automatically bring the seasons, sounds, etc raster from the
corresponding Global Scenery tiles.

The code as been updated to work with recent versions of the python modules it
depends on (you may have experienced some deprecation warnings or even some
code break due to Numpy, Pyproj and Shapely, these should be fixed with this
update). The only new python module used is skfmm (Fast Marching Method) and is only needed when using
the distance_masks_too option, the program will run even without it.


TODO :
- Update install instructions (after user first tests). The ones included have
not been updated at all, but the same list of decently recent python modules should
work out of the box.
- Check and update providers status.
- Compile nvcompress for OSX ARM64 (the included version is the old one renamed without the
.app). A Linux version of nvcompress is included now because some distros are apparently
no longer shipping it. Triangle4XP has been updated for all OS, including ARM based Mac.
I have not tested anything but Linux software.
- Incorporate some code changes that were in the old "devel" version (the
present is an update from the v130 master branch only).
- Do something about the 3rd party initiatives to provide some Docker or other
Plug and Play versions.
![example](https://github.com/shred86/Ortho4XP/assets/32663154/f06ebfe5-ba1d-4f05-9439-8e569bd99ef5)

Ortho4XP is a scenery generation tool for [X-Plane](https://www.x-plane.com). It creates the scenery base mesh and texture layer using external data and orthophoto sources.

This is a forked version of [Ortho4XP](https://github.com/oscarpilote/Ortho4XP) developed by [@oscarpilote](https://github.com/oscarpilote) which includes some updates, fixes and documentation. The official version is infrequently updated which is the reason I created this forked version to provide quicker updates and documentation.

The specific changes in this forked version:

#### General
* Tile configurations are automatically loaded when the active tile is changed using the Tiles Collection and Management window. If a tile configuration doesn't exist, the global tile configuration settings are used. The tile configuration is not loaded if you manually type in coordinates to change the active tile.
* Code changes to enable using [PyInstaller](https://pyinstaller.org/en/stable/) to bundle Ortho4XP and its dependencies into a single package.

#### Tiles Collection and Management
* Batch building process modified in regards to configuration files. If a tile configuration exists, it will be used. If a tile configuration does not exist, the global configuration will be used.
* "Read per tile cfg" removed and a "Override tile cfg" option added. This override setting allows you to force using the global configuration setting on all tiles, overriding any existing tile configurations.
* Erased cached data feature works like batch building tiles now, meaning Shift-Click (red rectangle) to select tiles, choose deletion options, and click "Batch Delete". The batch delete has no effect on the active tile selection (yellow rectangle).
* Display asterisk next to each tile zoom level number in the Tiles and configuration window if custom zoom levels have been specified.
* Added ability to create a symlink to the yOrtho4XP_Overlays folder by pressing the "O" key in the Tiles Collection and Management window.

#### Config
* Ortho4XP Config window is now separated into three tabs: Tile Config, Global Config, and Application Config.
* When a tile configuration doesn't exist, the Tile Tab fields will become read-only. Clicking "Save Tile Cfg" in this case will make the fields become editable again since a tile configuration now exists.
* Text added at the top of the Tile Tab window which provides information on whether a tile configuration was loaded, or global defaults are being used.
* "Apply" buttons removed since this occurs automatically when a tile is changed, and the configuration is loaded. It also occurs when you click "Save".
* A "Reset to Global" button was added to the Tile Config tab which will reset the tile settings to the global tile config settings. If custom zones exist, a prompt asserts asking to save the zones. You still must select "Save Tile Config" if you want to save the changes.
* A "Reset to Defaults" button was added as a part of the Global Config and Application Config tabs which will reset the tile and application settings to the application defaults. You still must select "Save Tile Config" if you want to save the changes. These buttons are independent of each other so if you're on the Global Config tab, it will reset just the tile settings in your global config and if you're on the Application Config tab, it will reset just the application settings in your global config.
* "Load Backup Cfg" buttons added to the Tile, Global, and Application Config tabs which loads settings from a backup config file (if available).
* Added ability to set an alternate `custom_overlay_src` directory to resolve an issue for some users. The default X-Plane scenery files are split up between `/X-Plane 12/Global Scenery/X-Plane Global Scenery` and `/X-Plane 12/Global Scenery/X-Plane Demo Areas`. So if you set `custom_overlay_src` to the first directory and try to batch build a bunch of tiles, you might get an error that the .dsf file can't be found if it's a location where the .dsf files are located in the second directory.
* The `custom_dem` and `fill_nodata` settings are now saved to the global configuration.
* Prompt user if attempting to close the application or config window with unsaved changes.
* Prompt user if attempting to change the active tile with unsaved changes on the Tile Tab in the config window.
* Prompt user if attempting to build tiles with unsaved changes in the config window.
* Backup of the tile configuration is created when using the "Save Tile Config" button (previously was only during a tile build process).

#### Miscellaneous
* Automatically saves the same data (active tile, default provider, default zoom level and base folder) that the power button icon does when you close the application using the operating system close button.
* Additional console messages addeded to provide more feedback. These are categorized with a verbosity setting of 1 (default).
* "Part of image could not be obtained" error will now show a summary message at the end of a batch build.
* Minor visual tweaks which included moving the "Refresh" and "Exit" buttons to the bottom of the left side in the Tiles collection and management window to better illustrate the "Refresh" button is not tied to Batch Build only.
* Includes Windows Python dependency wheel files for gdal and scikit-fmm.
* Update and pin requirements to latest working versions.
* Adds a bash script to automate the setup process for those that prefer not to use the packaged version.
* Removed Maxar and Mapbox image providers which are no longer publically available.
* Removed unavailable OSM FR and updated RU server with a working URL.
* Include 7-zip executable for macOS.

#### Bug Fixes
* If one-click symlink feature is used, added removal of symlink when "Erase cached data" "Tile (whole)" option is used.
* Fixed zones being saved to tile configuration that were outside of the tile location.
* Fixed a bug where symlinks weren't automatically deleted if you used the Erased cached data - Tile (whole) option.
* Fixed a bug if you created zones on a tile then clicked "Apply" (which no longer exists as a button) before saving the tile config, it would delete your zones.
* Fixed Viewfinderpanorama elevation source for certain regions of the world.
* Fixed Here (https://wego.here.com/) image provider API key.
* Fixed issue in certain coastal regions where .dds files were being deleted with cleaning_level set to 2 or higher.
* Corrected a few typos in setting descriptions.
* Default `imprint_mask_to_dds` to `False` to prevent issues when using `water_tech=XP12`.


## Installation

For installation instructions, refer to the [Installation page](https://github.com/shred86/Ortho4XP/wiki/Installation) in the [Wiki](https://github.com/shred86/Ortho4XP/wiki).

## Support

Troubleshooting steps for some issues are provided in the [Wiki FAQ](https://github.com/shred86/Ortho4XP/wiki/FAQ). For additional support or questions, refer to the [Ortho4XP forum](https://forums.x-plane.org/index.php?/forums/forum/322-ortho4xp/) at [X-Plane.org](https://forums.x-plane.org).
Binary file added Utils/mac/7zz
Binary file not shown.
Binary file added Utils/win/GDAL-3.8.4-cp312-cp312-win_amd64.whl
Binary file not shown.
Binary file not shown.
Loading