• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Semi-Automated Building Footprint Extraction from Satellite Imagery for Autogen Creation in FSX/P3D

I am facing a problem when exporting reclassification image into raster. When I try to export the reclassified image using "r.out.gdal" command, then the output shows

"Input raster map contains cells with NULL-value (no-data). The value 255 will be used to represent no-data values in the input map. You can specify a nodata value with the nodata option.
The default nodata value is present in rasterband and would lead to data loss. Please specify a custom nodata value with the nodata parameter.
Raster export aborted.
Finished with error."
Now, what to do?
 
Is it possible that you forgot to assign new values to certain classes? How many classes did you use in the unclassified supervision (step 7) and which classes did you assign to be black (value 0) or white (value 255)?
I may be wrong but the error sounds like certain classes were not reclassified. Nonetheless, it states that those with null values should now be all white (value 255), but since it is aborting on this error, try placing the value 0 in the last box on the creation tab. This should turn any no data values to black and avoid the stop error.
Terrain45.png


If you are using the command line, use nodata=0.


Regards,
Zev.
 
I have used 9 classes and used the following classification rule

0 thru 7 = 0
8 thru 9 = 255
end

And this is my reclassified image. But here, the large white portion represents no data. and the white portion inside grey represents 255. I think this is the problem as you mentioned that I cannot reclassify the no data value.

1526784763992.png

I tried with 0 value in the creation tab but it shows the same problem (WARNING: The user given nodata value 0 is present in rasterband <reclass@msngh_m> and would lead to data loss. Please specify a different nodata value with the nodata parameter.
ERROR: Raster export aborted).
Now, how can I manage the problem?

Thanks
 
I see the issue. The nodata option for r.out doesn't change the null input values but instead represents those output values as nodata.
I have long removed QGIS from my PC, but a quick search has shown that r.null may be able to help. I will do some further reading to see if I can guide you but here is the link:
https://grass.osgeo.org/grass70/manuals/r.null.html


EDIT:
Try running r.null.to and set the null value to 0 on the classified map that you are using. It seems that r.null cannot be run on reclassified images so this must be done as the last part of the unsupervised classification (step 7).
GuRkK.png


Regards,
Zev.
 
Last edited:
It works and I can export.
But after exporting the image looks like this
1526825168895.png


And then when I apply Blob Remover tool it shows that

" * * * Blob Remover * * *

* * * WARNING * * *
This routine works only with Bmp or Raw files 8 bit
Raw files should have 'dim' header with image dimension

-------------------------------------------------

Input file should have black background "

A folder named "Folder cut" created but contains partial data like "partial_00.bmp.aux"

What is wrong with that and how to apply the tool?
 
Did you reclassify the image after running r.null?
If so you should only be left with a black and white image. Your empty space should be fully black now.

When exporting did you change the raster data format to BMP, and, in the Creation Tab, ensure that you checked Do not write the GDAL standard colortable and selected Byte as the Data Type for export?
 
Earlier I tried it in qgis 1.7.4-wroclaw and then the problem happened. But when I use qgis 2.16.1-Nodebo it works and the exported image is
1526921838210.png


I change the raster data format to BMP, and, in the Creation Tab, checked Do not write the GDAL standard colortable and selected Byte as the Data Type for export.
So, I think now the image is in correct format. But when I apply Blob remover tool it shows that complete but no file is created in the same folder or in other folder. What is the problem?
 
It is possible that the blob remover tool may be crashing before it finishes.
Try running the tool from the command line to see if it returns any errors before it disappears.

You can use similar code to automatically open the tool for you:

Code:
START cmd.exe /k "D:\Program Files\BREC\BlobRemover\blob_removerwin.exe"
Paste it into notepad and save the file with extension .bat

If that fails you will have to try using photoshop to remove blobs manually.
Or you could skip this step entirely and resort to using either ScenProc's code, or GIS software utilities to filter out the small polygons they will generate.
 
Dear Zev,
After applying blob remover tool I have got the following image

1527657121597.png


And after that I had applied building cleaner tool and got the following image

1527657229142.png


I do not use scenproc yet because of having no previous idea about it. But I am scared that my final result is not so good.

Sincerely,
Falguni
 
Ok. There is a forum here dedicated to ScenProc, and the manual is also handy. You will get there eventually. Don't be afraid to ask questions.
 
Dear Zev,
My ScenProc shows warning message

1527785563173.png

Can I work on it in spite of having warning?
Another question is the code you given, would I paste it in notepad and then connect to ScenProc?
 
Falguni, the correct sim probably has not been set in ScenProcs settings. You should still be able to use it despite warnings.
The code can be typed directly in ScenProc after you click on "New".
It will be better to post questions regarding ScenProc in its dedicated forum. Please also don't forget to read the manual.
 
Back
Top