Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fireatlas_nrt
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gcorradini
fireatlas_nrt
Commits
e1fd503e
Commit
e1fd503e
authored
2 years ago
by
Eli Orland
Browse files
Options
Downloads
Patches
Plain Diff
Update FireGpkg.py
parent
f51dcd6c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!13
Rename Conus dps to Main
Pipeline
#5224
passed with stage
in 6 seconds
Changes
1
Pipelines
180
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
FireGpkg.py
+8
-9
8 additions, 9 deletions
FireGpkg.py
with
8 additions
and
9 deletions
FireGpkg.py
+
8
−
9
View file @
e1fd503e
...
...
@@ -94,14 +94,13 @@ def make_gdf_snapshot(allfires, regnm, layer="perimeter"):
# read or initialize the gdf
t_pt
=
FireTime
.
t_nb
(
allfires
.
t
,
nb
=
"
previous
"
)
#gdf = FireIO.load_gpkgobj(t_pt, regnm, layer=layer) # try to read data at t_pt
#gdf = None
#if gdf is None: # when no previous time step data, initialize the GeoDataFrame
gdf
=
gpd
.
GeoDataFrame
(
columns
=
(
list
(
dd
.
keys
())
+
[
"
fireID
"
]),
crs
=
"
epsg:
"
+
str
(
epsg
),
geometry
=
[]
)
gdf
=
gdf
.
set_index
(
"
fireID
"
)
# set fid column as the index column
gdf
=
FireIO
.
load_gpkgobj
(
t_pt
,
regnm
,
layer
=
layer
)
# try to read data at t_pt
if
gdf
is
None
:
# when no previous time step data, initialize the GeoDataFrame
gdf
=
gpd
.
GeoDataFrame
(
columns
=
(
list
(
dd
.
keys
())
+
[
"
fireID
"
]),
crs
=
"
epsg:
"
+
str
(
epsg
),
geometry
=
[]
)
gdf
=
gdf
.
set_index
(
"
fireID
"
)
# set fid column as the index column
# 1. drop rows for fires that are newly invalidated or dead
...
...
@@ -317,4 +316,4 @@ if __name__ == "__main__":
t2
=
time
.
time
()
print
(
f
"
{
(
t2
-
t1
)
/
60.
}
minutes used to run code
"
)
\ No newline at end of file
print
(
f
"
{
(
t2
-
t1
)
/
60.
}
minutes used to run code
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment