Jump to content

Oscar Pilote

Frozen-Inactivity
  • Content Count

    37
  • Donations

    $0.00 
  • Joined

  • Last visited

Posts posted by Oscar Pilote


  1. I have updated the Dropbox content with what could be called "release canditate" (let us be pedantic!)

     

    - Ortho4XP.py (main source file, now accepts WMS servers too)

    - Carnet_d_addresses.py (address book of providers, added a few WMS and TMS)

    - README.install (install instructions updated, step by step)

     

    I have removed the content of the Win64 install dir and replaced it by the

    (updated) download links. I use Dropbox which has a download quota and I would

    not like to break it. I also made some tiny changes to the Manual.pdf

     

    The total archive size is now 15Mb, most of which is the manual.


  2. File "C:\Users\Jack\Desktop\Ortho4XP\Ortho4XP.py", line 3679, in point_in_poly
    gon
        change=quadrants[0]-quadrants[len(quadrants)-1]
    IndexError: list index out of range

    It is actually not related to the DEM.

    The point_in_polygon algorithm is the one responsible for checking wether a triangle is in one of the

    regions you have selected on the preview screen or not.

    In the version you have (I thought I had uploaded the fix but it seems not) if you click twice on "save region"

    you get an empty polygon after the second click and that results in the error you read ("quadrant" is the

    list of the polygon vertices).

    The temporary fix until I upload the "last" version is thus to not click twice in a raw on "save region". 


  3. (gimp-console-2.8.exe :3872): LibGimpBase-WARNING **: gimp-console-2.8.exe : gim

    p_wire_read(): error

    batch command executed successfully

    That one will remain, and it is actually not an error but just a warning due to some artefact

    of gimp on the console with windows. It has no effect on the process.

     

    I'm in the course of adding quite a few providers in the address book, I'll release that

    shortly.

     

    Have a pleasant discovery !

    Oscar


  4. Dear Hans,

     

    The issue seems to be related to "convert" which is a utility provided by Imagemagick.

    The error is indicated in the last and before last lines above; the corresponding

    instruction should check whether a croped image file is totally black or not to decide

    wether a water mask should be created there. Your OS tells python that the external

    call to convert failed (return status should be zero for a succesful command).

     

    Which is your OS and where did you get Imagemagick from (including version number) ?

    If you open a terminal window and type in "convert -list format" (without the quotes),

    you should get of list of supported formats (and PNG should be one of those, along with

    JPEG and DDS, both in read and write mode). If you don't get a list but an error message

    from the OS, it is then simply that convert is not in your PATH. If you get a list but

    not all the desired formats, your version of Imagemagick was compiled with only a limited set

    of features.

     

    Installation of prerequisites is (or can be) by far the most annoying part, but once this

    is settled you should get a smoother experience.

    Tony is certainly not a good example of "average user", but a number of people from the

    french forum are now using it although they had never glanced at a source file before

    (and you actually won't need to).

     

     

    Regards,

    Oscar


  5. Also, I couldn't generate -53-001, I received an error with some non-existant number in the mesh. 

     

    Thanks for that one ! This is a division by zero bug for longitudes touching 0 or 180 (and maybe a few others...), I'll correct it in the day.

     

    Other known possible issues (which are not bugs) are related to OSM errors (when two pieces of water overlap or when nodes are missing : the rule is that two segments must be either equal, disjoint, or have only one endpoint in common).

    Correcting in OSM is the best fix of course, but possible overcomes are also to put no_small_angle=False and increase min_area (so that these buggy closed ways are discarded due to their too small area).


  6. Hi,

     

    There are "detailed" installation instructions for the 3 OS in the Dropbox. They are probably in French now, but Google translate will help you.

     

    Basically what you'll need is :

     

    - Python 3 + the following modules : requests (for easy http), numpy (for easy arrays), overpy (for easy OSM), PIL or Pillow (for easy image manipulation), gdal [now optional, if not present I rely on PIL]. Installation of numpy and gdal is a little

    bit more tricky on Windows than the otehr modules, since its not pure python but involves compiling C code (automatic though).

    - Imagemagick >= 6.9 (you need a version with a jpeg and a dds delegates)

     

    To test wether you have the prerequisities before using the program

    1) type "convert" in a command window, if you get a help message from Imagemagick this is fine, if you get "file not found" or so its probably a PATH problem.

    2) launch a python3 console and type "import requests, overpy, numpy, PIL". If this reports no error, and the first was ok too, you are on track to use Ortho4XP. If not you'll get issues if you try to use it.

     

    For the graphical interface soon to be ready, you'll also need the 'tkinter' module (easy widgets).

     

    @Tony (we cross-posted!)

     

    The total construction time for a ZL16 tile is more like 15-20min here (the bottle neck being jepg->dds conversion at 1 every 4sec, and there are between 200 to 250 of them depending on latitude), but that may indeed depend on various parameters.

     

    I am curious about what you mention with OSM limitation. I have not experienced that at all, and have tested the +51+004 and +52+004 which have huge amounts of OSM data for water (10 times more than average). The only limitation then is your RAM, since the overpy module is a bit inefficient on that (I can do the +51+004 on my 8Gb RAM computer but not on my 4Gb laptop), I will maybe skip overpy one day and replace it with wget and personal treatment of the xml osm data.

    Edit : maybe I understand what you mean, this is the role of the parameter min_area (with it you let down every closed water way that has a surface smaller than min_area (in km^2)). Having an overlay for very small patches of water was not crucial I believed (since you have the orthophoto anyway and won't see nice reflections on such small pieces), and can make the mesh a bit more heavy, but you can put min_area=0 if you want every single water patch on OSM. 

     

    Also, if you want to tweak overpy for speed, you can try the following (this goes in the __init__.py file of overpy, commented

    lines are the original ones) :

     

    #default_read_chunk_size = 8192
    default_read_chunk_size = 131072

    #self.url = "http://overpass-api.de/api/interpreter"
    self.url = "http://api.openstreetmap.fr/oapi/interpreter"

     

    the french oapi server is quicker but is only updated once a day, so if you make some changes on OSM (in partucular correct some errors of encroached segments) revert to the german one if you want to test thereafter. 

     

    Regards,

    Oscar


  7. If I may help do not hesite to ask directly.

     

    Present version is alpha3 (dropbox in my x-plane.fr signature, I have let

    sourceforge down when they had permanent connection issues).

     

    What do you mean by "it fails when it tries to download data from osm ?"

    Do you have python 3 with the overpy module ?

     

    I'll make the soft public with documentation when its characteristics are

    stabilized, in a few weeks from now.

    • Upvote 1
×
×
  • Create New...