GeoTIFF / GeoTIFF/georaster-layer-for-leaflet-example

`.ovr` is getting added after the tiff file path

Open
#13 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
98
Forks
31
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
A clear and concise description of what the bug is.
I'm trying to show tiff on the map, but when I add my tiff path e.g. `https://abc.s3.amazonaws.com/abc/2022-03-14/abc.tif` and run the program , it adds `.ovr` at the end

**To Reproduce**
Steps to reproduce the behavior:
Here is the code
```





#map {
bottom: 0;
left: 0;
position: absolute;
right: 0;
top: 0;
z-index: 1;
}
#info {
background: rgba(20, 20, 20, 0.85);
color: lightblue;
left: 15%;
padding: 15px;
position: absolute;
top: 0;
right: 15%;
z-index: 2;
}
#info a {
color: lightblue;
}










// initalize leaflet map
var map = L.map("map").setView([0, 0], 5);

// add OpenStreetMap basemap
L.tileLayer("http://{s}.tile.osm.org/{z}/{x}/{y}.png", {
attribution:
'&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
}).addTo(map);

var url_to_geotiff_file =
"https://abc.s3.amazonaws.com/abc/2022-03-14/Ratan+Waje.tif";

const scale = chroma
.scale([
"rgba(0,0,0,0)",
"#d73027",
"#f46d43",
"#fdae61",
"#fee08b",
"#ffffbf",
"#d9ef8b",
"#a6d96a",
"#66bd63",
"#1a9850",
"#006837",
])
.domain([0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]);
var pixelValuesToColorFn = (values) => {
return scale(values).hex();
};
parseGeoraster(url_to_geotiff_file).then((georasters) => {
var layer = new GeoRasterLayer({
georasters,
pixelValuesToColorFn,
resolution: 64,
opacity: 0.5,
});
layer.addTo(map);
map.fitBounds(layer.getBounds());
});

```

**Expected behavior**
I should be able to see tiff on the map

**Screenshots**
Screenshot 2022-03-20 at 11 02 22

**Desktop (please complete the following information):**
- OS: - MacOS (mac mini)
- Browser - chrome

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the HTML reproduction, especially the parseGeoraster call and GeoRasterLayer setup, and inspect the browser's requests when the remote TIFF URL is loaded. Determine why the .ovr suffix is requested or appended; done means the supplied TIFF displays on the Leaflet map without the erroneous path behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.