CVXExtractor - Exporting vector data.

#21
It certainly is nice to see a developer update their application in a timely fashion! If only certain payware developer's were even half as dedicated as you, Patrick! Thank you very much.
Thanks ! :)
I have a reputation to maintain and I hate to see my applications not doing what they are expected to do. :cool:
 

rhumbaflappy

Moderator
Staff member
Resource contributor
#28
Hi Patrick.

A suggestion if you'd want to spend the time and do the math:

-q l,u,v

QMID cell level, hotizontal, vertical ex: -q 11,389,269 equals -latMax 42.71484375 -latMin 42.5390625 -longMax -88.59375 -longMin -88.828125

For some extracts. setting the bounds to an exact QMID level would be needed. for example, when the -ADDTOCELLS flag is not set in shp2vec, the entire QMID 11 cell needs to be replaced. InSBuilderX, when the QMID gridlines are active, the status bar show the QMID cell. Just a shortcut to manually figuring out the bounds.

Dick
 
#30
Hi Patrick.

A suggestion if you'd want to spend the time and do the math:

-q l,u,v

QMID cell level, hotizontal, vertical ex: -q 11,389,269 equals -latMax 42.71484375 -latMin 42.5390625 -longMax -88.59375 -longMin -88.828125

For some extracts. setting the bounds to an exact QMID level would be needed. for example, when the -ADDTOCELLS flag is not set in shp2vec, the entire QMID 11 cell needs to be replaced. InSBuilderX, when the QMID gridlines are active, the status bar show the QMID cell. Just a shortcut to manually figuring out the bounds.

Dick
Hi Dick.

The math and algorithm already exist. I use them in my BglViewer tool

upload_2015-2-8_12-45-34.png
 

rhumbaflappy

Moderator
Staff member
Resource contributor
#31
Hi Patrick.

Your extractor works great.

I used it today to rewrite an FSX-derived QMID11 cell for Flight. stonelance has created a converter process for the world scenery of FSX for Flight.

We can use new FSX terrain data in Microsoft's Flight, but the vector BGLs must be compiled without -ADDTOCELLS. This means any vector addons exclude all vector data within the affected QMID11 cells. I can extract the FSX QMID11 data as ESRI shapefiles, and then import them to SBuilderX. I make any changes in SBuilderX, and compile, making sure my SBuilder.ini sets AddToCells=False ( required by Flight ).

I then construct a .flightAddon fileset, add to Flight with AddonBuilder, and it's good to go.

Without your tool, the work would be very difficult and... with your tool, it becomes creative fun changing and adding the polys and lines..

Many thanks.

Test1.png


FSX Conversion error:

Test2.png


Correction:

Test3.png



Dick
 
#32
Hi Patrick.

Your extractor works great.

I used it today to rewrite an FSX-derived QMID11 cell for Flight. stonelance has created a converter process for the world scenery of FSX for Flight.

We can use new FSX terrain data in Microsoft's Flight, but the vector BGLs must be compiled without -ADDTOCELLS. This means any vector addons exclude all vector data within the affected QMID11 cells. I can extract the FSX QMID11 data as ESRI shapefiles, and then import them to SBuilderX. I make any changes in SBuilderX, and compile, making sure my SBuilder.ini sets AddToCells=False ( required by Flight ).

I then construct a .flightAddon fileset, add to Flight with AddonBuilder, and it's good to go.

Without your tool, the work would be very difficult and... with your tool, it becomes creative fun changing and adding the polys and lines..

Many thanks.

Dick
Cool work Dick ! I'm glad that the tool can change the process from painful to fun !
 
#34
Hi Patrick.

A suggestion if you'd want to spend the time and do the math:

-q l,u,v

QMID cell level, hotizontal, vertical ex: -q 11,389,269 equals -latMax 42.71484375 -latMin 42.5390625 -longMax -88.59375 -longMin -88.828125

For some extracts. setting the bounds to an exact QMID level would be needed. for example, when the -ADDTOCELLS flag is not set in shp2vec, the entire QMID 11 cell needs to be replaced. InSBuilderX, when the QMID gridlines are active, the status bar show the QMID cell. Just a shortcut to manually figuring out the bounds.

Dick
public BoundBox GetBoundingCoordinates()
{
var pw2 = Math.Pow(2.0, Level);
var deltaLong = 480.0 / pw2;
var deltaLat = 360.0 / pw2;
var longitude = -180.0 + U * deltaLong;
var latitude = 90.0 - V * deltaLat;

return new BoundBox
{
LeftLongitude = longitude,
UpperLatitude = latitude,
RightLongitude = longitude + deltaLong,
LowerLatitude = latitude - deltaLat
};
}
 
#35
- Processes Flight CVX file for QMID Level 11 only
Two thoughts. First, Thank You to Patrick. This utility will be a useful tool when trying to address problems with the default FSX/P3D world and addons that must live within that horrible world.

Second to Dick, might there be a way to update TCalcX to now show the LOD 11 cell, along with Folder/File? Makes it easier when trying to figure out where the renegade water lies within the larger LOD file.
 
#36
Patrick, this is a fantastic tool, thank you!

I found that to use the SHP files in an app such as QGIS, it's helpful to generate the prj file.
The following works:

ogr2ogr -a_srs EPSG:4326 output.shp input.shp

Where input.shp is the SHP file output from cvsextractor. Then output.shp can
be loaded into QGIS, ArcGis Explorer etc.
 
#39
Hi Patrick:

Possibly it might be of incidental interest to your work with CvxExtractor ...to access ground surface elevation data as rendered at run time in FS and then "extract" it to a log file for further processing and use in MSFS scenery development via various output data file formats as in "CvxE". :idea:

FYI: Such data can be captured in FS flight sessions at the known and calculable Geographic coordinates for vertices in the FS Quad Matrix Grid.

Such a logging process requires complex programming (and with use of very high precision floating point numbers used achieve higher resolution in the QMID grid vertex Geographic coordinate positioning of the SimObject used to log higher resolution LODs when flying the grid).

But it can be done (there are proprietary applications which have been in existence for years < and not yet released to the public as stand-alone utilities >, created as a "Proof-of-Concept" ...which are already able to do this). ;)


One practical use for such "extracted" elevation data in MSFS scenery development is discussed in this thread:

http://www.fsdeveloper.com/forum/th...n-from-bgl-file-into-blender-tutorial.433345/


...which links to another thread discussing the basic concepts involved in the "extraction" process:

http://forum.avsim.net/topic/340961-reverse-engineer-mesh-into-3d-format/



PS: Perhaps this caveat might merit mentioning yet again, to pro-actively dissuade would-be posters of EULA / copyright objection "nonsense":

"...one must note that terrain surface elevations logged by such a process would only be as interpreted and rendered by FS at run time, and subject to interactions of multiple terrain mesh, water, or land surface flatten files etc., and should not be construed as capable of precisely reproducing original source data used to create terrain mesh files."


Hope this helps ! :)

GaryGB
 
Last edited:
#40
Thanks Gary for this info.
I'm currently working on extracting data from Terrain sections (Photo,Altitude, etc) . All terrain sections are using the same pattern to store values, be it a ARGB value for photos or a real value for altitude.
I just started on it but I'm not out of the woods yet !
 
Top