Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Undo change to GeoDataset timestamp
Browse files Browse the repository at this point in the history
adamjstewart committed Sep 13, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 936023d commit 2a123a8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions torchgeo/datasets/geo.py
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
import os
import re
import sys
from datetime import datetime, timedelta
from datetime import datetime
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, cast

import fiona
@@ -231,8 +231,7 @@ def __init__(
if "date" in match.groupdict():
date = match.group("date")
time = datetime.strptime(date, self.date_format)
mint = time.timestamp()
maxt = (time + timedelta(days=365)).timestamp()
mint = maxt = time.timestamp()

coords = (minx, maxx, miny, maxy, mint, maxt)
self.index.insert(i, coords, filepath)

0 comments on commit 2a123a8

Please sign in to comment.