Questions about mask files and stamps

47 views
Skip to first unread message

tama...@gmail.com

unread,
Aug 23, 2022, 6:42:30 PM8/23/22
to Lunaserv
Hi there (Nick), 

I'm exploring using a stamp_db layer and am running into some problems with overlapping stamps not being masked correctly.  The masked areas occlude each other.

I have the mask files created with name bla.mask.tif parallel to bla.pyr.tif.
They are of type Byte, with overviews (pyramidal).  They do have projection and bounds information.  Pixels of 0 indicate no data, and pixels with values indicate data.

The pyramidal tif files are RGBA (4 band), with band 4 being alpha.  They do not have projection or bounds information, so I provide an .ext file for each pyramidal tif.

What I see is that the stamps are not respecting the mask information, that is, what should be transparent in one stamp is instead occluding another stamp.

Do you have any insight into this?  Are the masks incorrect?  Do you have working samples of this kind of stamp file with mask?

Thanks much
Tamar


tama...@gmail.com

unread,
Aug 23, 2022, 7:02:15 PM8/23/22
to Lunaserv
Hm, I flipped the mask and it is still having the same behavior, which is suspicious.
I am wondering how the stamp_db layer behaves if there is data being added to the query results on the fly?
Perhaps lunaserv is caching part of the query results?  How does it know when to hit the database again?

Thanks
Tamar

Nick Estes

unread,
Aug 26, 2022, 10:45:22 AM8/26/22
to tama...@gmail.com, Lunaserv
That's interesting. Can you send me a copy of one of your stamps &
associated mask so I can look at the files and test it locally?

--Nick
> --
> You received this message because you are subscribed to the Google
> Groups "Lunaserv" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to lunaserv+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/lunaserv/0760c9f8-5b67-4ca8-b716-7a256bbdc9can%40googlegroups.com
> [1].
>
>
> Links:
> ------
> [1]
> https://groups.google.com/d/msgid/lunaserv/0760c9f8-5b67-4ca8-b716-7a256bbdc9can%40googlegroups.com?utm_medium=email&utm_source=footer

tama...@gmail.com

unread,
Aug 29, 2022, 3:36:11 PM8/29/22
to Lunaserv
Unfortunately we cannot post sample files here but will contact you through email.  Thanks for your support.
Tamar

tama...@gmail.com

unread,
Sep 23, 2022, 8:36:03 PM9/23/22
to Lunaserv
Mystery solved, thanks to Nick's support!  I was writing an 8 bit mask file (uint8), but the documentation states and lunaserv requires that it be a 1 bit mask file.
Since I am using rasterio to create the mask file, I had to make sure to open it with nbits=1.

Thanks Nick!

Reply all
Reply to author
Forward
0 new messages