Jump to content

[SOLVED] Trouble getting landcover masks from QGIS to Unigine


photo

Recommended Posts

First of all, I know this isn't specifically a Unigine question, but since it's directly related and I can't get things working in Unigine without it, I'm going to ask here with the hope that someone has an idea or has encountered it before.

I am running into issues trying to get masks I created from imagery (using QGIS with the SCP plugin) into Unigine.  I understand that Unigine requires RGB single channel or three channel, but for the life of me, I cannot export from QGIS in a format that Unigine will accept - everything is in greyscale.  The file is currently a tif, and it does map correctly in the landscape editor based on WGS84, but when I open it in Photoshop, the whole thing is completely black and featureless, and when I try to set trees or other foliage to go along with the mask, Unigine doesn't generate anything. 

I have tried searching on several GIS forums for an answer, but I think I am probably not asking in the right terms or I am going about this wrong.  I've attached a picture of the end-result mask as it is in QGIS, and if I understand the documentation correctly, I could then use the RGB colors to specify a mask in Unigine (right?)  Initially I thought Houdini would be the big hurdle, but it seems this is the real challenge in the near term!

Any help would be appreciated.

Thanks.

 

EDIT: If anyone has a landcover mask they'd be willing to donate just so I can see the file type, open it up, and look at the format, what would also be extremely helpful.

mask.png

Edited by david.norlin
Link to comment

Hi David,

I'd like to take a look at your landcover file if it's possible.

Speaking of Landscape tool, make sure you've made tags for landcover source file. Each tag should contain the index or hex number of color. Mask will be created based on these tags (don't forget to tick required tags in Parameters -> Masks).

You can check these landcover sources: https://gapanalysis.usgs.gov/gaplandcover/data/download/. You also can create in Qgis .tif images from these files, just save it as an image (not as "data"). By the way, Photoshop is not the best app to check georeferenced images :) QGis or Global Mapper will give adequate results with landcover files.

Since 2.7 we support non-geo landcovers so you literally can draw landcover image in photoshop, but, without georeference.

Feel free to ask, Landscape Tool is not the easiest thing to start with, but after some practice, it'll be okay :)

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Morbid,

I've attached two different versions of the landcover file.  The first (T32UNA - ALL LANDCOVER CLASSES.rar) is what I have immediately after creating the classes themselves using SCP, and the second is a saved, rendered version (Landcover rendered 1.rar).  The first loads into the Landscape Editor, but I can't set any kind of index for color.  It's not an option at all.  It just says "Type: MASK" below the tag box.  The second one - the rendered image - does not load in at all.  I can specify the file and try to import, but it doesn't show up under "Masks (Landcover)", as if it didn't import or something isn't parsing correctly.

I did download the Hawaii landcover data and I noticed it was a .img file.  I have tried to replicate this with my own landcover files but it still is not working.  I noticed its band rendering is single band paletted, and I cannot figure out how to convert mine to that rendering type.  The Hawaii landcover does import into Unigine, so I think this has something to do with it.  

Any ideas?  Thanks for the help.

T32UNA - ALL LANDCOVER CLASSES.rar

Landcover rendered 1.rar

Link to comment

Hi, thanks for the files.

For some reason, QGis add 4th band to all files by default. In 2.7 we had a limitation - only 3 band (RGB) files could be used as landcover. 

Unfortunately, I have no idea how to drop 4th band in QGis during export. I've made a little research but still have no clue how to do it via UI. In Global Mapper you can just uncheck "Make void pixels transparent" and this will do the job.

The good news is we support 4-band sources in the upcoming 2.7.1, so this shouldn't be pain in the neck. In the attachment, you'll find a tiff from Global Mapper.

Thanks!

landcover_rgb.zip

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Morbid,

Thank you so much for the help.  I see that it has imported successfully, and if four-band sources are supported in a future release and this won't be an issue, I will hold off on a purchase of GlobalMapper.  For evaluation purposes, this should suit our needs.  

On that note - how soon until 2.7.1?  

Thanks again!

 

Link to comment

Do you have any recommendations on how to align the corrected landcover image you sent?  I don't imagine this will be a problem after the patch, because what we export from QGIS (the 4-band images) will align without modification, but in the meantime, I'd like to at least have things overlaid correctly.  

I tried aligning it corner-to-corner with the existing albedo imagery we're using as a stand-in, just to get it "close enough", but it still seems completely off.  I opened it in a viewer and it's still right side up, but something is definitely not right.  Any ideas? 

Link to comment

Hi,

the image I've sent has same georeference, this wasn't changed anyhow. Do you mean that landcover_rgb.tif is placed somewhere else (please, check my screenshot)? 

Maybe you'd imported it in tileset mode that ignores georeference? Please, check this version. When you hit "Import source" you can choose between tileset and georeferenced mode. It should be georeferenced in your case.

Thanks!

 

lc.PNG

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
  • morbid changed the title to [SOLVED] Trouble getting landcover masks from QGIS to Unigine
×
×
  • Create New...