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

CVXExtractor - Exporting vector data.

Discussion in 'Showroom' started by Patrick Germain, 31 Jan 2015.

  1. rhumbaflappy

    rhumbaflappy Moderator Staff Member Resource contributor

    Joined:
    2 Jun 2004
    Messages:
    3,062
    Country:
    us-wisconsin
    Hi Patrick.

    Very nice. The GUI edition will help some users. I note the GUI version dumps the ESRI files to the indicated folder, rather than creating a sub-folder to hold the contents within that folder.

    Dick
     
  2. Patrick Germain

    Patrick Germain

    Joined:
    27 May 2014
    Messages:
    86
    Country:
    ca-quebec
    Thanks Dick!
    Yeah I know. I was hesitating about whether to create a subfolder (with the Bgl File name radical) or not. Guess I got my answer ;-). I'll fix that in the next release.
     
  3. rhumbaflappy

    rhumbaflappy Moderator Staff Member Resource contributor

    Joined:
    2 Jun 2004
    Messages:
    3,062
    Country:
    us-wisconsin
    Hi Patrick.

    Or maybe a checkbox option to place in a subfolder?

    Dick
     
  4. rhumbaflappy

    rhumbaflappy Moderator Staff Member Resource contributor

    Joined:
    2 Jun 2004
    Messages:
    3,062
    Country:
    us-wisconsin
    Hi Patrick.

    The CVX extractor works great.

    If you are interested in developing this further, it is possible to set the .XML file for SHP file compilation at a level other than Clip = 11. To make conversions of vectors to FS2004, for example, we could make the clip level at 15, producing a BGL with the polys neatly sliced at the LOD13 borders.

    I'm including an uploaded zipped file with an HPX bgl clipped at QMID15.
     

    Attached Files:

    • 7824.zip
      File size:
      889.4 KB
      Views:
      58
  5. Patrick Germain

    Patrick Germain

    Joined:
    27 May 2014
    Messages:
    86
    Country:
    ca-quebec
    Hi Dick

    I'm working on it but remember that the CvxExtractor is intended for FSX only.
    Stay tuned.

    Pat
     
  6. rhumbaflappy

    rhumbaflappy Moderator Staff Member Resource contributor

    Joined:
    2 Jun 2004
    Messages:
    3,062
    Country:
    us-wisconsin
    Hi Patrick.

    I think the problem is solved like this:

    Code:
    if ((current2.Qmid.Level == 11 || current2.Qmid.Level == 12 || current2.Qmid.Level == 13 || current2.Qmid.Level == 14 || current2.Qmid.Level == 15) && this.checkSubSectionBounding(current2, nwCorner, seCorner))
    I have a possible use for this using OSM data in FS9... but I wanted a way to split up he polys at QMID15 so I could weed out those polys and use areafills. FSX is supposed to allow other clip levels but I haven't really tried that yet.
     
  7. Patrick Germain

    Patrick Germain

    Joined:
    27 May 2014
    Messages:
    86
    Country:
    ca-quebec
    Now I'm not sure anymore of what you want.
    The code line you are referring to is to filter the sections from the INPUT file.
    I thought you wanted the XML value changed for the OUTPUT XML file built along the shapes files, needed by the Shp2Vec tool, like in this example (https://msdn.microsoft.com/en-ca/library/cc707121.aspx):
    <Geometry clipLevel="11"></Geometry>
     
  8. rhumbaflappy

    rhumbaflappy Moderator Staff Member Resource contributor

    Joined:
    2 Jun 2004
    Messages:
    3,062
    Country:
    us-wisconsin
    Hi Patrick.

    The extractor woudn't output a bln or shp file if the compilation used a different clip level than 11. Shp2Vec does a great job of slicing a shp file into QMID levels, and extracting the bgl back to a shp file gives me a very nicely sliced set of polys.
     
  9. Patrick Germain

    Patrick Germain

    Joined:
    27 May 2014
    Messages:
    86
    Country:
    ca-quebec
    So you want the extractor to be able process an input BGL files that contains QMID levels other that 11 or 15 ? Correct ?
    The XML file produced by the extractor tool would still have "<Geometry clipLevel="11"></Geometry> " but you can manually edit it if needed. Still correct ?
     
  10. rhumbaflappy

    rhumbaflappy Moderator Staff Member Resource contributor

    Joined:
    2 Jun 2004
    Messages:
    3,062
    Country:
    us-wisconsin
    Yes. That works.
     
  11. Patrick Germain

    Patrick Germain

    Joined:
    27 May 2014
    Messages:
    86
    Country:
    ca-quebec
    On it!
     
  12. Patrick Germain

    Patrick Germain

    Joined:
    27 May 2014
    Messages:
    86
    Country:
    ca-quebec
    Try this...
     

    Attached Files:

  13. GaryGB

    GaryGB

    Joined:
    23 Dec 2005
    Messages:
    3,239
    Country:
    us-illinois
    Hi Patrick:

    Initial testing looks good so far. :)


    IIUC although this version update changes only XML output files, I must again say a KMZ displayed in Google Earth (aka "GE") is astounding, and the KMZ 'layer tree' is extremely useful in the GE sidebar ! :wizard:


    FYI: AFAIK, KLM airlines may certainly appreciate the free subliminal advertising among the FSDeveloper community. ;)

    But, if possible, when you have a chance, could you change the 'output' file extension label from KLM to KML (aka "Keyhole Markup Language") ? :duck:


    https://en.wikipedia.org/wiki/KLM

    https://en.wikipedia.org/wiki/Keyhole_Markup_Language

    https://en.wikipedia.org/wiki/Google_Earth


    Many thanks again for developing this FS utility ! :D

    GaryGB
     
    Last edited: 29 Aug 2016
  14. GaryGB

    GaryGB

    Joined:
    23 Dec 2005
    Messages:
    3,239
    Country:
    us-illinois

    Hi Dick:

    Perhaps you might further elaborate on how to process the XML output file to modify it for use with making FS2004 vector content ? :scratchch


    [EDITED]

    Following the above ideas, might it work successfully if one were to:

    1.) Edit the clip level in a XML file otherwise exported by CVXExtractor, for example:

    <Vectors>
    <VectorType name="GPSHydroPolygons">
    <Vector FileOffsetHex="80">
    <QMID u="240" v="241" l="11" />
    <Shapes>
    <Shape Index="0" DrawType="Polygon" FileOffsetHex="8E">
    <Points>
    <Point Longitude="-123.539593219757" Latitude="47.4609375" Altitude="-9999.0" />
    <Point Longitude="-123.541867733002" Latitude="47.4612432718277" Altitude="-9999.0" />
    <Point Longitude="-123.542268276215" Latitude="47.4609375" Altitude="-9999.0" />
    <Point Longitude="-123.539593219757" Latitude="47.4609375" Altitude="-9999.0" />
    </Points>
    </Shape>
    </Shapes>
    </Vector>

    2.) Set l=15 (...assuming " l " actually represents the intended clip level as a QMID ...not LOD)

    3.) Re-compile edited XML to SHP via appropriate compiler (using required associated files)

    4.) Input the SHP to CVXExtractor

    5.) Use CVXExtractor to output a ex: BLN file

    6.) Append the BLN file to SBuilder

    7.) Compile to FS2004-format vector BGL ...via appropriate FS9 SDK compiler

    [END_EDIT]

    Some of us here would be very grateful for any additional info you might share on how to do what you described above with the XML file. ;)


    Thanks,

    GaryGB
     
    Last edited: 8 Jul 2016
  15. timers15

    timers15

    Joined:
    13 Jan 2014
    Messages:
    3
    Patrick, I've followed your excellent post on the wiki for decoding terrain vector data. Everything works well but I'm having a problem with "Method 2" for the vector data. I have the initial point computed which matches your CVXExtractor. The subsequent points I can't get right. Can you give a hint?
     
  16. Patrick Germain

    Patrick Germain

    Joined:
    27 May 2014
    Messages:
    86
    Country:
    ca-quebec
  17. motuslechat

    motuslechat

    Joined:
    9 May 2009
    Messages:
    39
    Country:
    france
    Hi Patrick,

    Thank you for this excellent tool.

    Do you think you can add OSM.PBF format for output (http://wiki.openstreetmap.org/wiki/PBF_Format) ?

    Other Points :
    - possibility to add "batch" mode in GUI to select a complete folder or many BGL file in a folder
    - correct when you un-select "All" in GUI, all extract will be un-selected

    Thank you again.
     
    Last edited: 15 Apr 2017
  18. Patrick Germain

    Patrick Germain

    Joined:
    27 May 2014
    Messages:
    86
    Country:
    ca-quebec
    New version for CvxExtractor (1.0.2.0)

    • Support a new output format: OSM for OpenStreetMap
    • CvxExtractor dll (with documentation) to be used with your own apps.

    Thanks to Laurent, a.k.a. motuslechat, for making the suggestion and testing it.

    See this link to get the zip file.

    Enjoy
     
    bina likes this.
  19. See Michel

    See Michel

    Joined:
    1 May 2014
    Messages:
    9
    Country:
    germany
    Hi, I have a issue.
    When I try to append BLN, XML or SHP file I created with CVX extractor I get an error message.
    View attachment 36013
    Can someone tell me what to do? Is there a way to convert to SBX?
    The file covers madeira cvx4320.bgl.
     
  20. GaryGB

    GaryGB

    Joined:
    23 Dec 2005
    Messages:
    3,239
    Country:
    us-illinois
    See my reply at: :wave:

    http://www.fsdeveloper.com/forum/posts/776863/

    GaryGB
     

Share This Page