1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SBuilderX Source Code

Discussion in 'Ground2k4, SBuilder, SBuilderX' started by Luis_Sá, 8 Oct 2017.

  1. Luis_Sá

    Luis_Sá Resource contributor

    Joined:
    16 Sep 2004
    Messages:
    320
    Country:
    portugal
    Dear SBuilderX users,

    From time to time I see complaints about my absence in responding to questions related to SBuilderX. Actually, since 2010 I rarely use FS and most of the times I do not know (or I do not remember) the answers that users are looking for. Fortunately many users have helped me during revisions (last one was in April 2015) and I even get help from Luis Feliz Tirado to daily manage the Ptsim forum. There is a lot of spam there and new forum users need to be manually checked or the forum gets filled with rubish. Also Dick is also writing new plugins for the tile server and I am extremely grateful to him and all that respond and help SBuilderX users.

    Since the tool is still in use and given that I am not able to give support or correct bugs, I decided to place the source code in github. The programme was last compiled using Visual Studio 2013 and now I am revising it using Visual Studio 2017 (the free version). It is written in Visual Basic and I never had the idea of it being placed in the public domain. So code documentation is almost nonexistent. Still to correct small bugs, I think it can be done by following the names of the routines to reach the culprit parts.

    There still is a question that I need to check which is related to images obtained from tile servers. In 2008 I was extremely afraid of infringing copyrights and used the concept of external plugins that could get the tiles. But today I see many tools that get image from servers so I need to check this. I think there is no difference between the compiled or source code (one is a consequence of the other) in regard to this aspect. You can PM me if you have information on this and I will be very grateful for any feedback.

    I am learning how to use git and github. I will write a notice here when I upload the files. As I plan to use parts of the code to write a tool to for my sailing hobby, I would be very interested in collaborating to improve the present code. My only limitation is with the "FS side" of the programme.

    Best Regards, Luis
     
    theisomizer, mariorc, arno and 5 others like this.
  2. Bungo

    Bungo

    Joined:
    26 Jul 2008
    Messages:
    89
    Country:
    australia
    This sounds like a positive step, Thank you Luis.

    Availability of GIS photo and vector data has exploded in the last 3-5 years and the sheer volume of GIS coverage available compared to when you created SBuilderX is mind blowing.

    :wizard: **The fact that it is still being used nearly a decade later shows that it has filled it's niche exceedingly well and is testament to it's design.**

    That said, time marches on, and its limitations with data-sets and PCs that are an order of magnitude larger/more capable than when it was written, are inevitably starting to show:
    ie (and these are in no way criticisms,:duck:see my glowing testimonial above :D ):
    • performance with large volumes of high res imagery data loaded,
    • Limited to import/gathering of/exporting to large areas of high res imagery in small chunks (screen sized?) ,
    • <2GB photo-scenery files export,
    • interoperability (ie. import/export) with now easily accessible GIS applications.
    It will be be interesting to see where to from here, especially with GDAL libraries to handle many of the limitations without requiring much re-invention of the wheel.

    I will quite happily volunteer to test and give usability/feature suggestions, and stress test it with my imagery requirements... which I have Terabytes of... :)

    Thank you again Luis, and anyone who takes up the task of collaboration with this to advance the tool.

    Regards

    Braedon
     
    Last edited: 11 Oct 2017
  3. ronh

    ronh

    Joined:
    2 Nov 2006
    Messages:
    879
    Country:
    canada
    Thank you Luis,

    I've always wanted to know how you coded this program. Excellent work. One suggestion is to put the code out under GPL (or GPL like) license. I say this because you mentioned "public domain". That way you retain some rights to your code. It can be updated and shared, but if someone updates it and does not share it, that is probably not what you intended.
     
  4. rhumbaflappy

    rhumbaflappy Moderator Staff Member Resource contributor

    Joined:
    2 Jun 2004
    Messages:
    3,099
    Country:
    us-wisconsin
    Windows bitmaps have a size limitation because the BMP header uses only 4 bytes to define the file size. That's no more than 4GB of data.

    The .NET programs also have some restrictions:

    https://stackoverflow.com/questions/29175585/what-is-the-maximum-resolution-of-c-sharp-net-bitmap

    I don't know if resample has restrictions, but it would for bitmaps. And resample is a 32-bit program.

    As far as allowing import and export of different formats, I think that would be a nice addition.
     
  5. Luis_Sá

    Luis_Sá Resource contributor

    Joined:
    16 Sep 2004
    Messages:
    320
    Country:
    portugal
    Hello Ron,

    Thank you for your valuable tip. I hope you will not be disappointed because I had never thought in sharing SBuilderX and so it is not well organized. I can push the project directly to github with one or two clicks from inside Visual Studio 2017 but I need to understand first the potentialities of github, which I am doing right now.

    Regards, Luis
     
  6. ronh

    ronh

    Joined:
    2 Nov 2006
    Messages:
    879
    Country:
    canada
    Github is a great way to share your code. It allows people to branch/fork your code and then merge later. Luis, there is some "management" of the code required here. Whom do you allow to update your official branch .... You may want some help from others and give them admin/update/merge privileges. Otherwise it's you reviewing their code and managing the updates.

    Oh, and I won't be disappointed. Some of my code started out as "playing with an idea" and is not great code either. ;) Thanks again.
     
  7. theisomizer

    theisomizer

    Joined:
    15 Jan 2007
    Messages:
    204
    Country:
    us-newyork
    @rhumbaflappy it is actually usually ~2GB, most file libraries use unsigneds by default for addressing, resample included. Our products all behave this way, even Photoshop (the large format PSB files are an extension that shares logic with the Camera Raw stuff).

    I think it would be great to see support for more formats through plugins, we have some open source libs that could be integrated, more on its way pending legal review.
     
  8. rhumbaflappy

    rhumbaflappy Moderator Staff Member Resource contributor

    Joined:
    2 Jun 2004
    Messages:
    3,099
    Country:
    us-wisconsin
    Hi Saen.

    I think it is about 2GB, as you state.

    Dick
     
  9. Bungo

    Bungo

    Joined:
    26 Jul 2008
    Messages:
    89
    Country:
    australia
    I find that if you select an area at high zoom (well any zoom actually) that would result in a file being >~2,350,000KB, SBX just says it can't create the file. At Google Zoom 20, that's a very small parcel of land :p.

    cheers

    Braedon
     
  10. rhumbaflappy

    rhumbaflappy Moderator Staff Member Resource contributor

    Joined:
    2 Jun 2004
    Messages:
    3,099
    Country:
    us-wisconsin
    Hi Braedon.

    I'm thinking that your needs aren't going to be met by SBuilderX. I'm guessing you want to do photoreal for an extremely large area. This isn't what SBuilderX was made for. Tiles collected by SBuilderX are mostly copyrighted, and cannot be distributed. They are for personal use only. You need a different source of imagery, the use of a GIS program, and learn to use resample and INF files directly... perhaps using batch files to run the whole works.

    You're still going to hit the 2GB barrier for resample for each image.
     
    theisomizer likes this.
  11. Bungo

    Bungo

    Joined:
    26 Jul 2008
    Messages:
    89
    Country:
    australia
    I am using map tiles (as opposed to imagery tiles) for generation of building footprint vector features from raster and not using them directly, and yes, it's an extremely large area at a high zoom to get finer resolution for the raster to vector algorithms in Global Mapper. I have free imagery from the Tasmanian Government for my photo-real imagery. Thus my PM to you guys about the GoogleAPIs and a tool to gather up tiles without some of the GM feature layers. SBX is the only tool to get and compile the tiles at the moment via your plugin, but it is onerous doing it in ~500m x 300m chunks for several thousand square kilometres. If SBX could write BigTIFF and a GIS application standard world file or a BigTIFF Geotiff it would save weeks of work, but then it would have trouble managing the file in memory to display it.

    I do a lot of the heavy lifting in Global Mapper, but there are some things specific to MSFS/P3D that need to be done in SBX as it is the only tool that does it. The lack of seamless interoperability with standard formats (Geotiff, standard world files, etc) is just another thing that adds to the workload. Thus my interest in the potential for a v4.0...
     
    Last edited: 13 Oct 2017 at 04:45

Share This Page