FSX Resmaple.exe Not Compiling

#41
Hi Caleb:

Before we Geo-rectify your files in Global Mapper, we need to know Pixel Row and Column 'size' for each of these images:

* "X10_blendmask_gimp.tif"

* "X10_watermask.tif"


Also, please clarify whether the above images were created from copies of your original DG_Satellite_1.tif GeoTIFF image.

If so, please clarify whether the above images have not yet been 're-sized' by any graphics application, or or 're-projected' by any GIS application such as Global Mapper or QGIS etc ...after they were created as copies of your original DG_Satellite_1.tif.

[EDITED]

I shall await your reply to the above questions prior to proceeding; (I'll require that info to prepare a step-by-step guide). ;)

[END_EDIT]

GaryGB
 
Last edited:
#42
Thanks for the reply.
Hi Caleb:

Before we Geo-rectify your files in Global Mapper, we need to know Pixel Row and Column 'size' for each of these images:

* "X10_blendmask_gimp.tif"

* "X10_watermask.tif"
How may I find out this? Are these the "pixel width" and "pixel height" entries in the metadata in Global Mapper?
Also, please clarify whether the above images were created from copies of your original DG_Satellite_1.tif GeoTIFF image.
I opened a copy of the GeoTIFF in Photoshop and drew the watermasks and blendmask as separate layers in Photoshop on top of the GeoTIFF. After I was done with this I deleted all layers except the blendmask layers and exported it as "X10_blendmask_gimp.tif" (please ignore the "gimp" part of the name). Then I deleted all the layers except the watermask layers and exported them as a separate tif (X10_watermask.tif) as I did with the blendmask.
If so, please clarify whether the above images have not yet been 're-sized' by any graphics application, or or 're-projected' by any GIS application such as Global Mapper or QGIS etc ...after they were created as copies of your original DG_Satellite_1.tif.
The watermasks and blendmask have not been 're-sized' by any graphics application, or or 're-projected' by any GIS application such as Global Mapper or QGIS etc.
 
#43
https://www.fsdeveloper.com/forum/threads/resmaple-exe-not-compiling.442820/post-799353

How may I find out this? Are these the "pixel width" and "pixel height" entries in the metadata in Global Mapper?
No, "pixel width" and "pixel height" entries in the metadata in Global Mapper are Pixel Dimensions per unit of measurement.

In Universal Transverse Mercator (aka "UTM"), Zone 17 (Northern Hemisphere) we use Pixels per Meter

In Geographic (Lat-Lon) Projection / WGS84 Datum (aka "EPSG:4326") / Units=Arc Degrees, we use Pixels per Arc Degree


The Metadata in Global Mapper pertains only to an image that is Geo-rectified and opened as a 'layer' in Control Center.

We can 'best' be certain as to the actual Pixel Row and Column 'size' (and the Pixels per unit of extent on the ground) for each of these images after they are properly Geo-rectified in Global Mapper and opened as a 'layer' in Control Center.


FYI: To see (but in this case, not change:alert: ) a current actual Pixel Row and Column 'size' for your Mask images, refer to this:

https://helpx.adobe.com/photoshop/using/image-size-resolution.html


Please post current actual Pixel Row / Column 'size' for each Mask image in a reply; we will be better prepared to proceed with Geo-rectification.

GaryGB
 
Last edited:
#45
https://www.fsdeveloper.com/forum/threads/resmaple-exe-not-compiling.442820/post-799368

This is the info from the "Image > Image Size" window in Photoshop. Is this what you need?

Watermask:

Width: 11068 Pixels

Height: 20640 Pixels

Blendmask:

Width: 11068 Pixels

Height: 20640 Pixels
Yes.

FYI: I am already preparing a step-by-step guide to Geo-rectify the Mask files cited above: I will post it ASAP (within the hour ?) ;)


Please post a screenshot showing Water Mask mis-alignment with the custom photo-real aerial imagery land class "DAY" image. :pushpin:


GaryGB
 
#46
https://www.fsdeveloper.com/forum/threads/resmaple-exe-not-compiling.442820/post-799368

This is the info from the "Image > Image Size" window in Photoshop. Is this what you need?

Watermask:

Width: 11068 Pixels

Height: 20640 Pixels

Blendmask:

Width: 11068 Pixels

Height: 20640 Pixels
Yes.

FYI: I am already preparing a step-by-step guide to Geo-rectify the Mask files cited above: I will post it ASAP (within the hour ?) ;)


Please post a screenshot showing Water Mask mis-alignment with the custom photo-real aerial imagery land class "DAY" image. :pushpin:


GaryGB
Thanks for the reply. I'm going to be away from my PC for the next few hours also, so I will wait for your guide and send some screenshots as soon as I'm back at my PC.

Thanks for the help.
 
#48
Example Global Mapper workflow to Geo-rectify the Blend Mask for your aerial imagery: :teacher:

NOTE: This is intended to match your Blend Mask image Geo-rectification to that of the 'native' Geo-rectification assigned to your original DG_Satellite_1.tif" GeoTIFF "DAY" image file when it was first opened in Global Mapper.

After properly Geo-rectified, the Blend Mask image must be "re-projected" within Global Mapper to the "projection" required by MSFS / P3D SDK Resample ...so that any subsequent exported data will be correctly formatted:


First, unload all open files from the Global Mapper work-space:

1.) Global Mapper Menu > File > Unload All...

2.) Global Mapper Menu > File > Rectify (Geo-reference) Imagery... (Batch Image Rectification Options dialog opens)

a.) In "Batch Image Rectification Options dialog":

(1) Check: "Add Rectified Images to Main Map View"

(2) Check: "Show Rectified Images in Reference View"

(3) Check: "Export Rectified Images to New Files"

(a) Tick: GeoTIFF > Pick: Grayscale Palette

(b) Click: [OK] button ("Open" dialog pops up)

(c) In "Open" dialog > Browse / Select: "X10_blendmask_gimp.tif" ("Tip" dialog opens)

(d) In "Tip" dialog > Read the info ! > click [OK] button (Image Rectifier [Automatic] (X10_blendmask_gimp.tif) dialog opens)


3.) In "Image Rectifier [Automatic] (X10_blendmask_gimp.tif)" dialog:

a.) Ground Control Point (GCP) Projection > click: [Select Projection] button ("Projection" dialog opens)

(1) In "Projection" dialog > configure:

Projection: UTM

Zone: 17 (84 W - 78 W - Northern Hemisphere)

Datum: WGS84

Planar Units: Meters

(2) Click [Apply] > [OK] buttons


4.) Back in "Image Rectifier [Automatic] (X10_blendmask_gimp.tif)" dialog:

a.) Ground Control Point (GCP) Entry > configure: Upper-Left (NW corner) pixel

PixelX: 0

X/Easting/Lon: 532999.623

PixelY: 0

X/Northing/Lat: 2956194.610

(1) Click [Add Point To List] button ("Ground Control Point Name" 'prompt' dialog opens)

(2) In "Ground Control Point Name" 'prompt' dialog > Verify name submitted is "Point 1"

(3) Click [OK] button (Point 1 appears in Ground Control Points list at bottom)


(b.) Ground Control Point (GCP) Entry > configure: Lower-Right (SE corner) pixel

PixelX: 11068

X/Easting/Lon: 536320.023

[EDITED]

PixelY: 20640

X/Northing/Lat: 2950002.610

[END_EDIT]

(1) Click [Add Point To List] button ("Ground Control Point Name" 'prompt' dialog opens)

(2) In "Ground Control Point Name" 'prompt' dialog > Verify name submitted is "Point 2"

(3) Click [OK] button (Point 2 appears in Ground Control Points list at bottom)


5.) At bottom Right in "Image Rectifier [Automatic] (X10_blendmask_gimp.tif)" dialog

a.) Click [Apply] and [OK] buttons ("Tip" dialog opens)

(b.) In "Tip" dialog > Read the info ! > click [OK] button ("X10_blendmask_gimp.tif" loads in Global Mapper work-space)

c.) With "X10_blendmask_gimp.tif" now loaded in Global Mapper work-space:


6.) Global Mapper Menu > Tools > Configure > {Projection} Tab

a.) Configure:

Projection: Geographic (Latitude/Longitude)

Datum: WGS84

Planar Units: Arc Degrees

Parameters > Attribute

Central Longitude = 0

b.) Click [Apply] and [OK] buttons (Back to Global Mapper work-space)


7.) Global Mapper Menu > File > Export > Export Raster Image Format ("Select Image Format" dialog opens)

8.) In "Select Image Format" dialog pick-list, select "GeoTIFF"; click [OK] button ("GeoTIFF Export Options" dialog opens)

a.) In "GeoTIFF Export Options" dialog > {GeoTIFF Options} Tab:

(1) File Type: 8-bit Palette Image
(2) Palette: Grayscale Palette
(3) Resampling: Bicubic Interpolation
(4) Sample Spacing / Scale: (Filled in automatically; IMHO: Do not edit)
(5) Check "Always Generate Square Pixels"
(6) Compression pick-list: select "No Compression"
(7) Check "Generate TFW (World) File
(8) Check "Generate PRJ File (aka 'projection' info)

b.) In"GeoTIFF Export Options" dialog > {Tiling} Tab
(1) Select "No Tiling - Just One Export File"

c.) In"GeoTIFF Export Options" dialog > {Export Bounds} Tab
(1) Select "All Loaded Data"

Click [OK] button ("Save As" dialog opens); enter desired GeoTIFF Blend Mask file name and click "Save"

You should now have a re-projected GeoTIFF Blend Mask file to use in development for your project. :pushpin:


A step-by-step guide to Geo-rectify and re-project the Water Mask for your aerial imagery will follow soon. :coffee:

GaryGB
 
Last edited:
#49
Example Global Mapper workflow to Geo-rectify the Water Mask for your aerial imagery: :teacher:

NOTE: This is intended to match your Water Mask image Geo-rectification to that of the 'native' Geo-rectification assigned to your original DG_Satellite_1.tif" GeoTIFF "DAY" image file when it was first opened in Global Mapper.

After properly Geo-rectified, the Water Mask image must be "re-projected" within Global Mapper to the "projection" required by MSFS / P3D SDK Resample ...so that any subsequent exported data will be correctly formatted:


First, unload all open files from the Global Mapper work-space:

1.) Global Mapper Menu > File > Unload All...

2.) Global Mapper Menu > File > Rectify (Geo-reference) Imagery... (Batch Image Rectification Options dialog opens)

a.) In "Batch Image Rectification Options dialog":

(1) Check: "Add Rectified Images to Main Map View"

(2) Check: "Show Rectified Images in Reference View"

(3) Check: "Export Rectified Images to New Files"

(a) Tick: GeoTIFF > Pick: Grayscale Palette

(b) Click: [OK] button ("Open" dialog pops up)

(c) In "Open" dialog > Browse / Select: "X10_watermask.tif" ("Tip" dialog opens)

(d) In "Tip" dialog > Read the info ! > click [OK] button (Image Rectifier [Automatic] (X10_watermask.tif) dialog opens)


3.) In "Image Rectifier [Automatic] (X10_watermask.tif)" dialog:

a.) Ground Control Point (GCP) Projection > click: [Select Projection] button ("Projection" dialog opens)

(1) In "Projection" dialog > configure:

Projection: UTM

Zone: 17 (84 W - 78 W - Northern Hemisphere)

Datum: WGS84

Planar Units: Meters

(2) Click [Apply] > [OK] buttons


4.) Back in "Image Rectifier [Automatic] (X10_watermask.tif)" dialog:

a.) Ground Control Point (GCP) Entry > configure: Upper-Left (NW corner) pixel

PixelX: 0

X/Easting/Lon: 532999.623

PixelY: 0

X/Northing/Lat: 2956194.610

(1) Click [Add Point To List] button ("Ground Control Point Name" 'prompt' dialog opens)

(2) In "Ground Control Point Name" 'prompt' dialog > Verify name submitted is "Point 1"

(3) Click [OK] button (Point 1 appears in Ground Control Points list at bottom)


(b.) Ground Control Point (GCP) Entry > configure: Lower-Right (SE corner) pixel

PixelX: 11068

X/Easting/Lon: 536320.023

[EDITED]

PixelY: 20640

X/Northing/Lat: 2950002.610

[END_EDIT]

(1) Click [Add Point To List] button ("Ground Control Point Name" 'prompt' dialog opens)

(2) In "Ground Control Point Name" 'prompt' dialog > Verify name submitted is "Point 2"

(3) Click [OK] button (Point 2 appears in Ground Control Points list at bottom)


5.) At bottom Right in "Image Rectifier [Automatic] (X10_watermask.tif)" dialog

a.) Click [Apply] and [OK] buttons ("Tip" dialog opens)

(b.) In "Tip" dialog > Read the info ! > click [OK] button ("X10_watermask.tif" loads in Global Mapper work-space)

c.) With "X10_watermask.tif" now loaded in Global Mapper work-space:


6.) Global Mapper Menu > Tools > Configure > {Projection} Tab

a.) Configure:

Projection: Geographic (Latitude/Longitude)

Datum: WGS84

Planar Units: Arc Degrees

Parameters > Attribute

Central Longitude = 0

b.) Click [Apply] and [OK] buttons (Back to Global Mapper work-space)


7.) Global Mapper Menu > File > Export > Export Raster Image Format > ("Select Image Format" dialog opens)

8.) In "Select Image Format" dialog pick-list, select "GeoTIFF"; click [OK] button ("GeoTIFF Export Options" dialog opens)

a.) In "GeoTIFF Export Options" dialog > {GeoTIFF Options} Tab:

(1) File Type: 8-bit Palette Image
(2) Palette: Grayscale Palette
(3) Resampling: Bicubic Interpolation
(4) Sample Spacing / Scale: (Filled in automatically; IMHO: Do not edit)
(5) Check "Always Generate Square Pixels"
(6) Compression pick-list: select "No Compression"
(7) Check "Generate TFW (World) File
(8) Check "Generate PRJ File (aka 'projection' info)

b.) In"GeoTIFF Export Options" dialog > {Tiling} Tab
(1) Select "No Tiling - Just One Export File"

c.) In"GeoTIFF Export Options" dialog > {Export Bounds} Tab
(1) Select "All Loaded Data"

Click [OK] button ("Save As" dialog opens); enter desired GeoTIFF Water Mask file name and click "Save"

You should now have a re-projected GeoTIFF Water Mask file to use in development for your project. :pushpin:

Feel free to inquire further if you require assistance with any of the above info or procedures. :)

GaryGB
 
Last edited:
#50
In step 3 in post #48 (blendmask) when I must select Arc Degrees as 'Planar Units', in the Planar Units dropdown menu I do not see the Arc Degrees option. This is all I see. Any ideas why?

1526588671617.png


Thanks.
 
#51
https://www.fsdeveloper.com/forum/threads/resmaple-exe-not-compiling.442820/post-799386

In step 3 in post #48 (blendmask) when I must select Arc Degrees as 'Planar Units', in the Planar Units dropdown menu I do not see the Arc Degrees option. This is all I see. Any ideas why?

Thanks.

Thank you very much for catching my unintended editing error; Planar Units for UTM should indeed be Meters. :eek:

I have edited my posts above in this thread to correct Planar Units to Meters for cited UTM projection info. ;)

Now I must find / edit my other posts elsewhere in the forum containing that same editing error (perils of copy-and-paste !) :banghead:


UPDATE: My (1) other post found elsewhere in the forum, containing that same editing error, has also now been corrected. :pushpin:

GaryGB
 
Last edited:
#52
Thank you very much for catching my unintended editing error; Planar Units for UTM should indeed be Meters. :eek:

I have edited my posts above in this thread. ;)

Now I must find / edit my other posts elsewhere in the forum containing that editing error (perils of copy-and-paste !) :banghead:

GaryGB
Thanks for the clarification. Everyone makes mistakes. ;)

I will continue with the steps and inquire further if I have any more questions.

Thanks again.
 
#54
a.) Ground Control Point (GCP) Entry > configure: Top-Left (NW corner) pixel

PixelX: 0

X/Easting/Lon: 532999.623

PixelY: 0

X/Northing/Lat: 2956194.610
I'm still working on the blendmask, and the above step gets me confused. How do I "configure: Top-Left (NW corner) pixel"? Would you mind explaining this a little deeper?

And after I've done that, do I manually enter the "PixelX", "X/Easting/Lon", and "PixelY" as you told? Or am I supposed to click somewhere and let it automatically enter that info for me?

Thanks.

Hi Caleb:

Please let me know if FSX / P3D run time display of either Mask is still misaligned after Geo-rectified / re-projected as I outlined above.

GaryGB
Will do, once I get the masks Geo-rectified / re-projected.
 
#55
https://www.fsdeveloper.com/forum/threads/resmaple-exe-not-compiling.442820/post-799391

I'm still working on the blendmask, and the above step gets me confused.

How do I "configure: Upper-Left (NW corner) pixel"? Would you mind explaining this a little deeper?

And after I've done that, do I manually enter the "PixelX", "X/Easting/Lon", and "PixelY" as you told? Or am I supposed to click somewhere and let it automatically enter that info for me?
For the Upper-Left (NW corner) pixel:

* Accept the existing correct "0" value for both "PixelX" and "PixelY" Pixel 'coordinate' positions

* Click into each empty alphanumeric character entry box to enter the numeric values shown in a bold typeface :

X/Easting/Lon: 532999.623

X/Northing/Lat: 2956194.610


For the Lower-Right (SE corner) pixel:

* Click into alphanumeric character entry box to Delete existing in-correct "0" value for both "PixelX" and "PixelY" Pixel 'coordinate' positions.

* Replace both "PixelX" and "PixelY" Pixel 'coordinate' positions with:

PixelX: 11068

PixelY: 20640


* Click into each empty alphanumeric character entry box to enter:

X/Easting/Lon: 536320.023

[EDITED]

X/Northing/Lat: 2950002.610

[END_EDIT]


Does that explain this particular procedure adequately ? :scratchch

GaryGB
 
Last edited:
#56
For the Top-Left (NW corner) pixel:

* Accept the existing correct "0" value for both "PixelX" and "PixelY" Pixel 'coordinate' positions

* Click into each empty alphanumeric character entry box to enter the X/Easting/Lon: 532999.623 and X/Northing/Lat: 2956194.610 values


For the Bottom-Left (SE corner) pixel:

* Click into entry box to Delete the existing in-correct "0" value for both "PixelX" and "PixelY" Pixel 'coordinate' positions.

* Replace both "PixelX" and "PixelY" Pixel 'coordinate' positions with:

PixelX: 11068

PixelY: 20640


* Click into each empty alphanumeric character entry box to enter the X/Easting/Lon: 536320.023 and X/Northing/Lat: 2956194.610 values


Does that explain this particular procedure adequately ? :scratchch

GaryGB
Thank you, this does explain this particular procedure adequately. :)

This is what the "Image Rectifier" window shows after completing the above steps. Is this correct?

1526593247528.png

Thanks
 
#57
https://www.fsdeveloper.com/forum/threads/resmaple-exe-not-compiling.442820/post-799394

Thank you, this does explain this particular procedure adequately. :)

This is what the "Image Rectifier" window shows after completing the above steps. Is this correct?
No, that does not look correct, as the Red cross-hairs should be at the:

* Upper-Left (NW corner) pixel

...and:

* Lower-Right (SE corner) pixel


FYI: I had made yet another editing error by incorrectly stating "Bottom-Left (SE corner) pixel" (more perils of copy-and-paste !):duck:

That statement is now corrected above. :pushpin:


< Time for my coffee break, apparently ! :rotfl:>

Let me know if the latter correction resolves the issue.


PS: How big in MB or GB ...is your 8-Bit gray-scale Water Mask TIF file ? :scratchch

GaryGB
 
Last edited:
#58
No, that does not look correct, as the Red cross-hairs should be at the:

* Top-Left (NW corner) pixel

...and:

* Bottom-Right (SE corner) pixel
That's what I thought was wrong. That's why I posted to confirm. I think I was clicking around a bit to try to figure it out and messed things up, so I will redo the process tomorrow.
< Time for my coffee break, apparently ! :rotfl:>
I gotta have dinner too. :) I'll put this on hold til tomorrow. :)
PS: How big in MB or GB ...is your 8-Bit grayscale Water Mask TIF file ? :scratchch
I'm actually not sure if my watermask is a 8-Bit grayscale TIF file, but the current size (before being Geo-rectified / re-projected) is 871 MB.
 
#59
OK, we'll see how things work tomorrow. :)

If necessary, perhaps you can PM a link to your Water Mask TIF inside a ZIP file (ex: DropBox ?) so I can download it for inspection. ;)

FYI: WinRAR and 7-ZIP can 'segment' a big file into smaller pieces to be reassembled ...to work-around file size limits of download sites. :idea:

GaryGB
 
#60
4.) Back in "Image Rectifier [Automatic] (X10_blendmask_gimp.tif)" dialog:

a.) Ground Control Point (GCP) Entry > configure: Top-Left (NW corner) pixel

PixelX: 0

X/Easting/Lon: 532999.623

PixelY: 0

X/Northing/Lat: 2956194.610

(1) Click [Add Point To List] button ("Ground Control Point Name" 'prompt' dialog opens)

(2) In "Ground Control Point Name" 'prompt' dialog > Verify name submitted is "Point 1"

(3) Click [OK] button (Point 1 appears in Ground Control Points list at bottom)
I am still at the step I quoted above for the blendmask, and when I enter the things you say, the point still does not appear in the far upper left corner as you said it was supposed to.

Where did you find out the numbers that I should put in the "X/Easting/Lon" and "X/Northing/Lat" fields? Maybe I incorrectly specified some information that you used to calculate these numbers. Can you please tell me how/where you found the information for the "X/Easting/Lon" and "X/Northing/Lat" fields, so that I may confirm that I correctly specified the information you used to calculate those numbers?

Thanks.
 
Top