a border around each tile

23 views
Skip to first unread message

Majid Hojati

unread,
Sep 23, 2017, 1:48:06 PM9/23/17
to SpatiaLite Users
Hi,
I tried to load 4 rasters into one coverage, when I tried to load them using LibreWMS I face this image
As you can see there is a border around each tile. the 4th column in this image is the border of two sections which is joined and there is not any line but other tiles has this border. The no data value is -9999, Why this is happening?

a.fu...@lqt.it

unread,
Sep 26, 2017, 12:15:07 PM9/26/17
to spatiali...@googlegroups.com
Hi Majid,

floating point arithmetics has an intrinsically limited precision;
so sometimes it could happen to notice some 1-pixel "blank area"
caused by approximated calculations when rescaling.
(software errors can obviously contribute as well).

What happens when scaling at different resolutions ?
1) blank strips will completely disappear in many cases, and
will show only sporadically at peculiar resolutions.
2) blank strips are always well evident in the same positions
independently from the specific resolution.

if you are in case 1) the most probable cause are the random
effects of numeric rounding and truncation.

but if you are in case 2) it looks most probable that some
intrinsic misalignment affects the Sections of your Coverage.

bye Sandro

Majid Hojati

unread,
Sep 26, 2017, 1:43:36 PM9/26/17
to SpatiaLite Users
Hi,
My case is 2 which lines are shown in every resolution. How can I fix it?Is it even possible?

a.fu...@lqt.it

unread,
Sep 27, 2017, 3:14:19 AM9/27/17
to spatiali...@googlegroups.com
On Tue, 26 Sep 2017 10:43:36 -0700 (PDT), Majid Hojati wrote:
> Hi,
> My case is 2 which lines are shown in every resolution.
>

Hi Majid,

if your Coverage always shows blank vertical strips at every
resolution it's probably because the BBOXes of your individual
Sections do not exactly match a regular grid.

you can easily check for this, just few simple calculations
are required:

MaxX = MinX + ( Width * HorizontalPixelSize )
MinY = MaxY - ( Height * VerticalPixelSize )

then check if MaxX exactly matches the MinX value of the
adjacent Section immediately to the right, and so on.


> How can I fix it? Is it even possible ?
>

If I correctly remember, your initial JPEG images were
not directly supported by a companion .jgw WorldFile
as expected by RasterLite2, so you manually created
all required .jgw worldfile.

it seems very probable that during this step you've
inadvertently introduced some truncation (too few
decimals) in the HorizontalPixelSize values.

carefully check, and if the above assumption is
confirmed than you simply have to correct your
worldfiles (obviously reloading the Coverage
from scratch will be required).

bye Sandro

Majid Hojati

unread,
Sep 27, 2017, 10:44:17 AM9/27/17
to SpatiaLite Users
Hi Sandro,
Thanks very much, So if they are not the same?should I edit them manually?
Also what about multiresolution sections? does it make any problem?
Reply all
Reply to author
Forward
0 new messages