Jump to content
Sign in to follow this  
kjjj11223344

Ortho4XP for FSX/P3D

Recommended Posts

12 hours ago, Chris Bell said:

i dont get this,
you can simply work on developing a proper area.kml database for FSEarthTiles with area and water poly's instead,
FSEarthTiles will do a perfect water masking and blending for you already if you provide it with area.kml with definitions in it!

all you really need is to distribute a proper area.kml for each state you want to run instead of doing all this,
people can simply load area.kml  locally for their state and let FSEarthTiles do the work start to finish with every layer available,

I suppose I could have created a program to create KML’s from OSM data which could be fed into FSET. But I’m not well versed in the format of OSM data nor KMLs, etc, and it is easier for me to make Ortho4xp support FSX/P3D rather than come up with the logic to create KMLs. I’ve seen tutorials about doing this with arcgis for example, but when I read about it years ago, I couldn’t figure it out + I wanted something which was automatic and didn’t require any user intervention.

If there exists a programmatic/automatic way to do this OSM to KML conversion, please let me know, as my inability to find this isn’t why I created this fork in the first place :).

  • Like 2

Boeing777_Banner_Pilot.jpgsig_TheBusIveBeenWaitingFor.jpg

Alfredo Terrero

Share this post


Link to post
Share on other sites
7 minutes ago, Ollie12634 said:

Okay, I'm not sure if this is a bug - or me being a dummy (the latter is probably more likely).

I have followed the instructions on the .txt file provided, and when I go to do step 3 (run it), this happens.

I am running Windows 10 Pro v17134.165, and using Python 3.6.6

 

dxcEqPK.png

Do you see a fast_image_mask.pyd in the main folder of the package?

Also, does the binary inside the dist folder work, or does it give the same error (it’s okay if you don’t trust the binary and want to run it with python, I’ll still help you out).

Finally, that ERROR in the first line is something new that happened after Oscar’s latest commit to Ortho4XP. It happens in the latest plain Ortho4XP as well, and doesn’t seem to affect anything (its more a warnig than an error).

Edited by kjjj11223344

Boeing777_Banner_Pilot.jpgsig_TheBusIveBeenWaitingFor.jpg

Alfredo Terrero

Share this post


Link to post
Share on other sites
3 minutes ago, kjjj11223344 said:

Do you see a fast_image_mask.pyd in the main folder of the package?

Yes, downloaded the whole thing from Git this morning.


Mr Moss
---------------------------------
🛩️ UK PPL(A)
🖥️ MSFS & Prepar3D v5
🗺️ Southern England

Share this post


Link to post
Share on other sites
6 minutes ago, Ollie12634 said:

Yes, downloaded the whole thing from Git this morning.

I created the fast_image_mask.pyd dll using python 3.6.4. That's the only thing I can imagine is going wrong. I suggest rebuilding the pyd. You need visual studio installed, as well as q8 ImageMagick++ dll's installed on your system. Then do something like this:

 

"F:\ExtraPrograms\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\Hostx64\x64\cl.exe" /LD /I "C:\Program Files\ImageMagick-7.0.8-Q8\include" /I C:/Users/fery2/AppData/Local/Programs/Python/Python36/include /I "C:\Program Files\ImageMagick-7.0.8-Q8\include" src\cpp\fast_image_mask.cpp src\cpp\FSET_ports.cpp from the 64 bit visual studio command prompt (or 32 bit if your python and ImageMagick are 32 bit, but I have only tested on 64 bit).

 

Alternatively, you can downgrade to 3.6.4 of python or use the prebuilt binary in the dist folder. Let me know if you decide to build and don't understand the above command. I just copied the command I used, but I suppose I could explain it more if it is unclear.


Boeing777_Banner_Pilot.jpgsig_TheBusIveBeenWaitingFor.jpg

Alfredo Terrero

Share this post


Link to post
Share on other sites
13 hours ago, Chris Bell said:

i dont get this,
you can simply work on developing a proper area.kml database for FSEarthTiles with area and water poly's instead,
FSEarthTiles will do a perfect water masking and blending for you already if you provide it with area.kml with definitions in it!

all you really need is to distribute a proper area.kml for each state you want to run instead of doing all this,
people can simply load area.kml  locally for their state and let FSEarthTiles do the work start to finish with every layer available,

 

16 minutes ago, kjjj11223344 said:

I suppose I could have created a program to create KML’s from OSM data which could be fed into FSET. But I’m not well versed in the format of OSM data nor KMLs, etc, and it is easier for me to make Ortho4xp support FSX/P3D rather than come up with the logic to create KMLs. I’ve seen tutorials about doing this with arcgis for example, but when I read about it years ago, I couldn’t figure it out + I wanted something which was automatic and didn’t require any user intervention.

If there exists a programmatic/automatic way to do this OSM to KML conversion, please let me know, as my inability to find this isn’t why I created this fork in the first place :).

Yeah, I am not sure what you don't get Chris?  This tool is about as simple as you can get from a user perspective. All you have to do is select what "tile" you want photoreal for and select some options and go.  To create something that converts OSM to KML and then have the user have to use FSET to then generate the tiles just adds steps and confusion for the same result.

This tool makes it very easy.  It's one of the big reasons why people prefer X-Plane over ESP products because of how simple this tool has made it to create such beautiful scenery for free.  Obviously for X-Plane, it does autogen too.  When this tool does that for ESP(I believe it is planned, right kjjj11223344?), then we will have the same great scenery we have in X-Plane for ESP sims and in such a simple way to create it.

What would generating kml first and using FSET do that this can't already?  I'm curious.

  • Like 2

Regards,

 

Kevin LaMal

"Facts Don't Care About Your Feelings" - Shapiro2024

Share this post


Link to post
Share on other sites
8 minutes ago, kjjj11223344 said:

I created the fast_image_mask.pyd dll using python 3.6.4. That's the only thing I can imagine is going wrong. I suggest rebuilding the pyd. You need visual studio installed, as well as q8 ImageMagick++ dll's installed on your system. Then do something like this:

 

"F:\ExtraPrograms\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\Hostx64\x64\cl.exe" /LD /I "C:\Program Files\ImageMagick-7.0.8-Q8\include" /I C:/Users/fery2/AppData/Local/Programs/Python/Python36/include /I "C:\Program Files\ImageMagick-7.0.8-Q8\include" src\cpp\fast_image_mask.cpp src\cpp\FSET_ports.cpp from the 64 bit visual studio command prompt (or 32 bit if your python and ImageMagick are 32 bit, but I have only tested on 64 bit).

 

Alternatively, you can downgrade to 3.6.4 of python or use the prebuilt binary in the dist folder. Let me know if you decide to build and don't understand the above command. I just copied the command I used, but I suppose I could explain it more if it is unclear.

This is my first time doing anything Python-related, I'm just aiming to get a couple of Ortho tiles for P3D done, so I'm gonna skip rebuilding the pyd haha! This is what happens when I run the .exe in /dist:

Fz0edDZ.png

It just gets stuck there. I shall try downgrading to Python 3.6.4 64-bit and let you know what happens.


Mr Moss
---------------------------------
🛩️ UK PPL(A)
🖥️ MSFS & Prepar3D v5
🗺️ Southern England

Share this post


Link to post
Share on other sites
9 minutes ago, Ollie12634 said:

This is my first time doing anything Python-related, I'm just aiming to get a couple of Ortho tiles for P3D done, so I'm gonna skip rebuilding the pyd haha! This is what happens when I run the .exe in /dist:

Fz0edDZ.png

It just gets stuck there. I shall try downgrading to Python 3.6.4 64-bit and let you know what happens.

Downgrading to 3.6.4 didn't work unfortunately.


Mr Moss
---------------------------------
🛩️ UK PPL(A)
🖥️ MSFS & Prepar3D v5
🗺️ Southern England

Share this post


Link to post
Share on other sites
14 minutes ago, Ollie12634 said:

This is my first time doing anything Python-related, I'm just aiming to get a couple of Ortho tiles for P3D done, so I'm gonna skip rebuilding the pyd haha! This is what happens when I run the .exe in /dist:

Fz0edDZ.png

It just gets stuck there. I shall try downgrading to Python 3.6.4 64-bit and let you know what happens.

You don't need to even have python installed if you are using the pre built exe.

 

The first ERROR you see in the black cmd window is something new which appeared when I brought over Oscar's latest Ortho4XP code over. It is more of a warning than an error, and can be ignored (it occurs in the latest Ortho4XP from oscar's github as well). The "FSX/P3D bulding requires..." is a warning I added. Basically, if mask_zl is different from zoomlevel of the orthophotos, the program sets the mask_zl equal to that of the zoomlevel you choose in the dropdown. Again, this is more to let the user know what is happening, and it can be ignored.

As to the program hanging and not doing anything - are you shift + left clicking on the tile on the map? Ortho4XP requires shift + left click rather than just left click.

Edit: just tried it. Not shift + left clicking should be your issue.

Edited by kjjj11223344

Boeing777_Banner_Pilot.jpgsig_TheBusIveBeenWaitingFor.jpg

Alfredo Terrero

Share this post


Link to post
Share on other sites
6 minutes ago, kjjj11223344 said:

You don't need to even have python installed if you are using the pre built exe.

 

The first ERROR you see in the black cmd window is something new which appeared when I brought over Oscar's latest Ortho4XP code over. It is more of a warning than an error, and can be ignored (it occurs in the latest Ortho4XP from oscar's github as well). The "FSX/P3D bulding requires..." is a warning I added. Basically, if mask_zl is different from zoomlevel of the orthophotos, the program sets the mask_zl equal to that of the zoomlevel you choose in the dropdown. Again, this is more to let the user know what is happening, and it can be ignored.

As to the program hanging and not doing anything - are you shift + left clicking on the tile on the map? Ortho4XP requires shift + left click rather than just left click.

Well bugger me. That was it! I just had to Shift+Left Click.

I feel so bad, you went to all that trouble for that, my apologies!

  • Like 1

Mr Moss
---------------------------------
🛩️ UK PPL(A)
🖥️ MSFS & Prepar3D v5
🗺️ Southern England

Share this post


Link to post
Share on other sites
25 minutes ago, klamal said:

 

I believe it is planned, right kjjj11223344?)

Yes, that is my goal. Might take some time as my time is limited, but I definitely want to do it.


Boeing777_Banner_Pilot.jpgsig_TheBusIveBeenWaitingFor.jpg

Alfredo Terrero

Share this post


Link to post
Share on other sites
2 hours ago, kjjj11223344 said:

If there exists a programmatic/automatic way to do this OSM to KML conversion, please let me know, as my inability to find this isn’t why I created this fork in the first place :).

@kjjj11223344
Hi Alfredo :)
there is no need to make any conversion from OSM to KML,
KML is Google earth native file format they developed,

i know documentation for FSET was not the most detailed,
we do have the source code and know the developer who already did most of the legwork with it,

what really left is to create alibrary with just kml files loaded with few lines really that all it comes down to,
a line in color X represent 1 feature, second line in another feature and so on,
its really 3 type of lines (there are more types to work with but we really need 3 main ones)

you have one line representing general area border,
next line represent water lines, and the next represent the blend mask buffer area, that's it!

you feed this file in FSET work folder; it reads it on its own and performs all the steps mentioned earlier,
only the class are already built and can simply be deployed now instead of developing them from scratch, 

i think if you were able to come up with this extremely complex application;
a simple example will give you  what you need to get your thought in order with regards to FSET,
i think once you do instead of spending energy in programming from scratch you will be able to leverage FSET to do what you are looking for with ease,

ill get an example for you shortly ❤️ 
its a simple one click start to finish once kml instructions are ready,
 

2 hours ago, klamal said:

What would generating kml first and using FSET do that this can't already?  I'm curious.

@klamal
Hi Kevin :)
it seems that functions are being developed when they already exists and proven solid,
everything i saw listed to be developed already is!
 

Edited by Chris Bell

Share this post


Link to post
Share on other sites
6 minutes ago, Chris Bell said:

there is no need to make any conversion from OSM to KML,
KML is Google earth native file format they developed,

But who defines the KML?  How is that created?  Does this exist already on the internet like OSM data does?


Regards,

 

Kevin LaMal

"Facts Don't Care About Your Feelings" - Shapiro2024

Share this post


Link to post
Share on other sites
7 minutes ago, Chris Bell said:

it seems that functions are being developed when they already exists and proven solid,
everything i saw listed to be developed already is!

Maybe so.  I've used FSET myself so I agree.  That works.  However, it is nowhere near as simple in my opinion as this app is.  Whether it's re-inventing the wheel or not, it's doing so in an easier way for us users.

  • Upvote 1

Regards,

 

Kevin LaMal

"Facts Don't Care About Your Feelings" - Shapiro2024

Share this post


Link to post
Share on other sites
3 minutes ago, klamal said:

But who defines the KML?  How is that created?  Does this exist already on the internet like OSM data does?

that's what i was getting at; instead of reprogramming the whole application from scratch,
kml could be worked much faster and with less energy,

you create the kml yourself, its very simple to do,
open google earth; draw any polygon and save it; that's your kml!

now if you used a red line FSET knows red line represents area,
if you placed a blue line it tells FSET this is where water line is,
if you give it another orange line parallel to water line it will blend that area in,

there are a handful of colors one can use as the second water line; the difference is the blend being used,
the concept in itself is very simple; for water bodies the blend is continues vs sea where it gets blended out eventually,

now these are all developed all we are missing is the central db with stated defined in kml files,

Share this post


Link to post
Share on other sites
9 minutes ago, Chris Bell said:

you create the kml yourself, its very simple to do,
open google earth; draw any polygon and save it; that's your kml!

You and I have much different definitions of simple.  LOL.  Well, actually, you're right...it's not hard to draw lines.  But try doing that for entire continents!!  That's a lot of patience.  And patience is definitely a virtue that I lack!  :)

This application figures that all out for you...at least in regards to water masking.  Maybe you are trying to do more yet?


Regards,

 

Kevin LaMal

"Facts Don't Care About Your Feelings" - Shapiro2024

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...